ai-debug
Skill60 starsChanged 3 months agoApache-2.0View on GitHub
Finds the root cause of broken behaviour and names it at file:line, then writes the check that fails for that reason before changing anything. Also resolves merge and rebase conflicts by intent rather than by taking a side. Trigger for "it's not working", "this used to work", "I'm getting an error", "CI is failing", "why is X happening", "I have conflicts", "the rebase failed". Not for adding test coverage to working code — use /ai-verify. Not for exploring an unfamiliar area — use /ai-explore. Not for designing the fix — once the cause is named, use /ai-orchestrator. Not for reporting the fault to outsiders — use /ai-issue-report.
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ai-adversarial-loopSkill
- ai-agents-mdSkill
- ai-architectSkill
- ai-audit-codeSkill
- ai-audit-designSkill
- ai-audit-docsSkill
- ai-brainstormSkill
- ai-codegraphSkill
- ai-code-reviewSkill
- ai-config-to-projectSkill
- ai-design-md-plannerSkill
- ai-exploreSkill
- ai-git-cleanupSkill
- ai-github-triageSkill
- ai-issue-reportSkill
- ai-noteSkill
- ai-orchestratorSkill
- ai-prototypeSkill
- ai-prSkill
- ai-read-docsSkill
- ai-researchSkill
- ai-review-uiSkill
- ai-securitySkill
- ai-stress-testSkill
- ai-test-plannerSkill
- ai-verifySkill
- ai-visual-recapSkill
- ai-writeSkill
- ai-writing-behaviorSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Read the failing output in full.
- Distinctive: line 30
Before the fix, write the check that fails for this reason.
- Distinctive: line 34
Run the check. Then run the suite.
- Distinctive: line 36
If you are two attempts in and it is still not fixed, stop and say so.
- Distinctive: line 41
Read both sides for intent before touching either.
- Distinctive: line 72
Not for: no diagnosis yet but the fault must reach outsiders (/ai-issue-report), the fix needs a design (/ai-orchestrator), the fix needs …
- Distinctive: line 80
Read by: n/a Dies: n/a — the check it writes outlives the session Next: none
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
ai-debug — find the cause, not the symptom
What it produces
A named cause at file:line, a check that fails because of it, and only then a fix.
Steps
- Reproduce it. If you cannot reproduce it, say so plainly and stop guessing: the next useful thing is a way to reproduce it, not a change.
- Read the failing output in full. The first error is usually the real one and the rest are its consequences; the last error is the one people paste.
- Name a cause you can point at.
file:line, and one sentence on why that line produces this symptom. "Probably a race" is not a cause. If two causes are plausible, say which observation would tell them apart, then go and make that observation. - Before the fix, write the check that fails for this reason. A fix with no failing check before it is a change with an opinion attached.
- Fix the cause, at the place all the callers go through. Patching the one path the report named leaves every sibling caller broken, and the shared fix is usually the smaller diff.
- Run the check. Then run the suite. Then say what you changed and why it fixes the cause you named, not the symptom that was reported.
- If you are two attempts in and it is still not fixed, stop and say so. That is a rule, not a suggestion: the third attempt is where the guessing starts.
Conflicts
Read both sides for intent before touching either. Lock files and generated files are regenerated, never merged by hand. Migrations are ordered, not combined. If two people meant different things, that is a conversation, not a resolution.
What this is not
- "I know what the bug is even though I cannot reproduce it" — a cause you cannot reproduce is a guess: the next useful thing is a way to reproduce it, not a change.
Done when
- The cause is named at
file:lineand a person could disagree with it. - A check exists that fails without the fix and passes with it.
- You said what you changed, in a sentence somebody could act on.
The ai-engineering seam
- The failing check you write in step 4 is the proof the fix holds. If a checkpoint plan is open, add that check as a verify command on the checkpoint.
- Long-running reproduction (a dev server, a watcher, a REPL) belongs to a supervised process, never a fire-and-forget shell call: name it, drive it over stdin, and stop it when the diagnosis ends.
- Grounding duty (§11.6): every file:line you name was opened in this session. Never cite from memory — /ai-explore and /ai-read-docs are the lenses for that.
- The verdict on WHY it broke belongs to the
decidetier of the model pin (.ai-engineering/config.toml); mechanical checks (does it fail, does it pass) belong toverify.
Routing
In scope: broken behaviour with a reproducible symptom, failing CI, merge/rebase conflicts. Not for: no diagnosis yet but the fault must reach outsiders (/ai-issue-report), the fix needs a design (/ai-orchestrator), the fix needs proof it satisfies the ask (/ai-verify), a recurring pitfall worth remembering (/ai-note).
Lifecycle
Lane: any Writes: nothing Read by: n/a Dies: n/a — the check it writes outlives the session Next: none
Source: ai-engineering (own), Apache-2.0.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

