Systematic debugging protocol for bugs, test failures, and unexpected behavior. Guides root cause investigation before proposing fixes.
Ships in talents. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Random fixes waste time and create new bugs, and a quick patch hides the cause.
Find the root cause before you change code. Propose a fix only after Phase 1 names the root cause.
Use for ANY technical issue:
Use this ESPECIALLY when:
Don't skip when:
You MUST complete each phase before proceeding to the next.
BEFORE attempting ANY fix:
Read Error Messages Carefully
Reproduce Consistently — on the reporter's reality
Rule Out the Harness Before the Product
Check Recent Changes
Gather Evidence in Multi-Component Systems
WHEN system has multiple components (CI → build → signing, API → service → database):
BEFORE proposing fixes, add diagnostic instrumentation:
For EACH component boundary:
- Log what data enters component
- Log what data exits component
- Verify environment/config propagation
- Check state at each layer
Run once to gather evidence showing WHERE it breaks
THEN analyze evidence to identify failing component
THEN investigate that specific component
Example (multi-layer system):
# Layer 1: Workflow
echo "=== Secrets available in workflow: ==="
echo "IDENTITY: ${IDENTITY:+SET}${IDENTITY:-UNSET}"
# Layer 2: Build script
echo "=== Env vars in build script: ==="
env | grep IDENTITY || echo "IDENTITY not in environment"
# Layer 3: Signing script
echo "=== Keychain state: ==="
security list-keychains
security find-identity -v
# Layer 4: Actual signing
codesign --sign "$IDENTITY" --verbose=4 "$APP"
This reveals: Which layer fails (secrets → workflow ✓, workflow → build ✗)
Trace Data Flow
WHEN error is deep in call stack:
See references/root-cause-tracing.md for the complete backward tracing technique.
Quick version:
Find the pattern before fixing:
Find Working Examples
Compare Against References
Identify Differences
Understand Dependencies
Scientific method:
Form Single Hypothesis
Test Minimally
Verify Before Continuing
When You Don't Know
Fix the root cause, not the symptom:
Create Failing Test Case
Implement Single Fix
Verify Fix
If Fix Doesn't Work
If 3+ Fixes Failed: Question Architecture
Pattern indicating architectural problem:
STOP and question fundamentals:
Discuss with your human partner before attempting more fixes
This is NOT a failed hypothesis - this is a wrong architecture.
If you catch yourself thinking:
ALL of these mean: STOP. Return to Phase 1.
If 3+ fixes failed: Question the architecture (see Phase 4.5)
Watch for these redirections:
When you see these: STOP. Return to Phase 1.
| Excuse | Reality |
|---|---|
| "Issue is simple, don't need process" | Simple issues have root causes too. Process is fast for simple bugs. |
| "Emergency, no time for process" | Systematic debugging is FASTER than guess-and-check thrashing. |
| "Just try this first, then investigate" | First fix sets the pattern. Do it right from the start. |
| "I'll write test after confirming fix works" | Untested fixes don't stick. Test first proves it. |
| "Multiple fixes at once saves time" | Can't isolate what worked. Causes new bugs. |
| "Reference too long, I'll adapt the pattern" | Partial understanding guarantees bugs. Read it completely. |
| "I see the problem, let me fix it" | Seeing symptoms ≠ understanding root cause. |
| "One more fix attempt" (after 2+ failures) | 3+ failures = architectural problem. Question pattern, don't fix again. |
| Phase | Key Activities | Success Criteria |
|---|---|---|
| 1. Root Cause | Read errors, reproduce, check changes, gather evidence | Understand WHAT and WHY |
| 2. Pattern | Find working examples, compare | Identify differences |
| 3. Hypothesis | Form theory, test minimally | Confirmed or new hypothesis |
| 4. Implementation | Create test, fix, verify | Bug resolved, tests pass |
If systematic investigation reveals issue is truly environmental, timing-dependent, or external:
But: 95% of "no root cause" cases are incomplete investigation.
These techniques are part of systematic debugging and available in this directory:
references/root-cause-tracing.md - Trace bugs backward through call stack to find original triggerWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
debugging, root-cause-analysis, troubleshooting, bug-hunting
/talents:debugfrom talents
npx claudepluginhub heyjordanparker/dotfiles --plugin talents33 skills in this plugin
/architectureTRIGGER when presenting Architectural options, Architecting systems, or discussing tradeoffs. Append to any Prompt./buildThe build mode's contract — the Agent does every edit and run itself, with no Subagents, deep full-file reads, and research before acting. TRIGGER when the session enters build mode, on the /build command, and when build mode is re-injected after compaction. DO NOT TRIGGER for orchestrate mode, where Subagents do the work (that is /orchestrate)./ccWrite and fix Claude Code Prompts — skills, agents, commands, hooks, rules files, Claude.md, and plugin distribution. TRIGGER when the task says "cc"/"claude code"/"claude-code", or asks to build, edit, test, or share a skill/agent/hook/command, tune a description's triggering, write or prune a Claude.md, or cut prompt bloat. DO NOT TRIGGER to name a Claude.md's identifiers (that is /naming) or to record domain vocabulary (that is /domain-design)./commitMandatory contract for every commit. The Architect authorizes a commit by typing /commit, for that turn only, and the classifier then injects "Skills to execute: /commit". Holds the whole commit job: commit your own changes, write the message, commit, and verify, plus the commit-message format (type prefix, Capability subject, Problem and Solution body, file tree). TRIGGER on every turn where the Architect typed /commit, or when the Architect asks to write or revise a commit message. DO NOT TRIGGER on any other turn: "commit this", applying changes, deploying, shipping, and replacing files authorize nothing.
/critical-pathProcess for changes with a large blast radius: files many others import or with critical complexity, and actions that are destructive, hard to reverse, or visible outside the repo. TRIGGER before editing a file whose facts show `imported_by` of 20 or more or a `complexity_rank` of `critical`, and before any delete, force-push, schema drop, process kill, push, pull-request operation, shared-infrastructure change, or third-party upload./delegateFramework for dispatching one-shot Subagents that complete a Task and return. Covers Prompting (WHY -> WHAT -> HOW), the Story/Business/Goal/Verification/Process Prompt Template, and Evidence directories. TRIGGER when dispatching or resuming Subagents, when Orchestration needs the dispatch Prompt Template, or when the Architect says "/delegate this to ...". DO NOT TRIGGER for judging what a Subagent returned (that is /orchestrate), or for work the Agent does itself with no Subagents; use /build.Other plugins' skills for the same job