session-debug
Skill3 starsChanged 5 months agoMITView on GitHub
Use when the user reports a bug, a failing test, or unexpected behaviour and wants it diagnosed before it is fixed. Finds the root cause, tests one hypothesis at a time, and stops to question the design after three failed fixes.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- microsoft/amplifier-bundle-skillstheir own version, first seen Mar 23, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- microsoft/amplifier-bundle-skills★ 12same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- security-liability-auditSkill
- session-add-taskSkill
- session-brainstormSkill
- session-delegationSkill
- session-gatekeeperSkill
- session-groomSkill
- session-initSkill
- session-nextSkill
- session-post-implementationSkill
- session-releaseSkill
- session-repairSkill
- session-research-designSkill
- session-task-planningSkill
- session-verifySkill
- update-architectureSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 9 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Three failed fixes means the design is in question: Stop, say so, and discuss the architecture with the user before a fourth attempt.
- Distinctive: line 28
Read the error completely: message, stack trace, line numbers, codes.
- Distinctive: line 31
Check what changed: recent commits, dependencies, configuration, environment.
- Very specific: line 35
When the error is deep in a call stack, trace the bad value backwards to where it originates and fix it there.
- Distinctive: line 41
If the broken code follows a reference pattern, read the reference fully before judging the deviation.
- Distinctive: line 48
Write the hypothesis down: "X is the cause because Y."
- Distinctive: line 49
Test it with the smallest possible change.
- Distinctive: line 66
Run the reproduction and the surrounding tests.
- Distinctive: line 67
Keep the regression test where the project keeps tests for this kind of change.
- Distinctive: line 71
If the fix does not hold, count the attempts.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Session Debug
Find the cause before changing anything. A change that addresses a symptom is not a fix.
Open with one sentence saying what you are about to do and what it will produce.
Rules
- No fix before the cause is known. Finish the investigation before proposing a change, however obvious the change looks. Simple bugs have causes too, and rushing produces rework.
- One hypothesis, one change, one result. State the hypothesis, make the smallest change that tests it, and read the result before doing anything else. Do not stack changes.
- Three failed fixes means the design is in question. Stop, say so, and discuss the architecture with the user before a fourth attempt.
- Say what you do not know. "I do not understand X yet" is a valid state; guessing is not.
- No fix before the work item exists. A confirmed cause becomes a captured work item before
Phase 4 changes anything. Capture is not permission: the item lands in
captured, and the user's report of the bug is what authorizes fixing it — not the record. Investigation itself needs no work item; a change to the codebase does.
Phase 1: Investigate
- Read the error completely: message, stack trace, line numbers, codes. The answer is often in it.
- Reproduce it. If it does not reproduce reliably, gather more data before forming a hypothesis.
- Check what changed: recent commits, dependencies, configuration, environment.
- In a system with several components, instrument the boundaries before guessing where it breaks: log what enters and leaves each component, run once, and let the evidence point at the failing one. Then investigate that component.
- When the error is deep in a call stack, trace the bad value backwards to where it originates and
fix it there.
references/root-cause-tracing.mddescribes the technique.
Phase 2: Compare
- Find working code that does something similar in the same codebase.
- If the broken code follows a reference pattern, read the reference fully before judging the deviation.
- List every difference between working and broken, however small.
- Note the dependencies and assumptions the broken path relies on.
Phase 3: Hypothesis
- Write the hypothesis down: "X is the cause because Y."
- Test it with the smallest possible change. One variable at a time.
- Confirmed: go to Phase 4. Not confirmed: form a new hypothesis, and do not leave the failed change in place.
Phase 4: Fix
- Capture the work item first. Hand
/session-add-taskthe confirmed cause, in Mode A: the reporter's words verbatim asoriginal_request, the root cause you established as the interpreted intent, the corrected behaviour as the scope, and the reproduction as theTest. It allocates the identity and writes the record with the runtime. Report theSEQ-NNNbefore you change a line, so the fix, its evidence, and its cause share one home. A bug filed as an issue carries its URL intosourceandannotations; one reported in conversation carries neither, and no URL is invented for it. - Reproduce the bug in the smallest form you can: an automated test where the project has a framework, otherwise a one-off script.
- Make the one change that addresses the cause. No unrelated improvements, no bundled refactoring.
- Run the reproduction and the surrounding tests. Report what you ran and what it printed.
- Keep the regression test where the project keeps tests for this kind of change; drop the scratch script.
- Record the outcome against the captured identity: what the cause was, what the fix was, and what the test printed. The record is where the next session reads this, not the transcript.
- If the fix does not hold, count the attempts. Fewer than three: return to Phase 1 with what you learned. Three: rule 3 applies.
When there is no root cause
Sometimes a completed investigation shows the issue is environmental, timing-dependent, or external. Then document what was checked in the captured item — the investigation is the outcome even when no cause was found — add the handling that fits (a retry, a timeout, a clearer error) and the logging that would catch the next occurrence. Most "no root cause" conclusions are incomplete investigations; make sure this one is not.
Signals you have left the process
- "Quick fix now, investigate later."
- "Let me just try changing X."
- Several changes before a single test run.
- Proposing fixes before tracing the data flow.
- A second fix that reveals a new problem somewhere else.
Any of these means: return to Phase 1.
Derived from the systematic-debugging skill in superpowers by Jesse Vincent (MIT); see
THIRD_PARTY_NOTICES.md. Chain context: references/workflow-overview.md.
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.

