try-works/recursive-mode/recursive-debugging
Claude Code and agent skill by try-works/recursive-mode
- community
Checking that the SKILL.md file is still in the repository.
Use when a recursive-mode requirement involves debugging a bug, test failure, or unexpected behavior. Insert Phase 1.5 between Phase 1 and Phase 2 to perform systematic root cause analysis before attempting any fixes. Trigger phrases: "debug", "investigate", "failing tests", "crash", "root cause".
Install
npx vskill@latest install try-works/recursive-mode/recursive-debuggingSKILL.md
recursive-debugging (Phase 1.5)
Overview
When a requirement involves fixing a bug or investigating unexpected behavior, ad-hoc fixes waste time and create new bugs. Systematic debugging finds the root cause before any fix is attempted.
Core Principle: ALWAYS find root cause before attempting fixes. Symptom fixes are failure.
The Iron Law for recursive-mode debugging:
Trigger examples
Tests are failing after the last change; debug itFix crash on empty inputInvestigate why the API returns wrong dataDo a root cause analysis before making changes
When to Use
Mandatory Phase 1.5 when:
- Requirement is a bug fix
- Test failures need investigation
- Unexpected behavior reported
- Performance problems
- Integration issues
Use ESPECIALLY when:
- Under time pressure (emergencies make guessing tempting)
- "Just one quick fix" seems obvious
- Previous fix attempts failed
- You don't fully understand the issue
Don't skip when:
- Issue seems simple (simple bugs have root causes too)
- You're in a hurry (rushing guarantees rework)
- Manager wants it fixed NOW (systematic is faster than thrashing)
Phase 1.5 Insertion
Phase 1.5 is inserted between Phase 1 (AS-IS) and Phase 2 (TO-BE Plan) when debugging is required:
The Four Phases of Systematic Debugging
Step 1: Root Cause Investigation
BEFORE attempting ANY fix:
1.1 Read Error Messages Carefully
- Don't skip past errors or warnings
- They often contain the exact solution
- Read stack traces completely
- Note line numbers, file paths, error codes
Record in Phase 1.5 artifact:
1.2 Reproduce Consistently
- Can you trigger it reliably?
- What are the exact steps?
- Does it happen every time?
- If not reproducible -> gather more data, don't guess
Record in Phase 1.5 artifact:
1.3 Check Recent Changes
- What changed that could cause this?
- Git diff, recent commits
- New dependencies, config changes
- Environmental differences
Record in Phase 1.5 artifact:
1.4 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.
Record in Phase 1.5 artifact:
1.5 Trace Data Flow
WHEN error is deep in call stack:
Trace backward:
- Where does bad value originate?
- What called this with bad value?
- Keep tracing up until you find the source
- Fix at source, not at symptom
Record in Phase 1.5 artifact:
Step 2: Pattern Analysis
Find the pattern before fixing:
2.1 Find Working Examples
- Locate similar working code in same codebase
- What works that's similar to what's broken?
2.2 Compare Against References
- If implementing pattern, read reference implementation COMPLETELY
- Don't skim - read every line
- Understand the pattern fully before applying
2.3 Identify Differences
- What's different between working and broken?
- List every difference, however small
- Don't assume "that can't matter"
2.4 Understand Dependencies
- What other components does this need?
- What settings, config, environment?
- What assumptions does it make?
Record in Phase 1.5 artifact:
Step 3: Hypothesis and Testing
Scientific method:
3.1 Form Single Hypothesis
- State clearly: "I think X is the root cause because Y"
- Write it down
- Be specific, not vague
3.2 Test Minimally
- Make the SMALLEST possible change to test hypothesis
- One variable at a time
- Don't fix multiple things at once
3.3 Verify Before Continuing
- Did it work? Yes -> Phase 4
- Didn't work? Form NEW hypothesis
- DON'T add more fixes on top
3.4 When You Don't Know
- Say "I don't understand X"
- Don't pretend to know
- Ask for help
- Research more
Record in Phase 1.5 artifact:
Step 4: Fix Summary (Handoff to Phase 2 Planning)
Fix the root cause, not the symptom:
4.1 Create Failing Test Case
- Simplest possible reproduction
- Automated test if possible
- One-off test script if no framework
- MUST have before fixing
- This becomes part of Phase 2's test strategy
4.2 Root Cause Summary for Phase 2
- Summarize root cause found
- Document the fix approach
- Reference evidence from Phase 1.5
Routing Awareness
If debugging uses delegated review, external log inspection, or any other routed model help, re-read:
/.recursive/config/recursive-router.json/.recursive/config/recursive-router-discovered.json
immediately before choosing the delegated CLI/model, and follow the current routed policy instead of a hardcoded model assumption.
Record in Phase 1.5 artifact:
Red Flags - STOP and Follow Process
If you catch yourself thinking:
- "Quick fix for now, investigate later"
- "Just try changing X and see if it works"
- "Add multiple changes, run tests"
- "Skip the test, I'll manually verify"
- "It's probably X, let me fix that"
- "I don't fully understand but this might work"
- Proposing solutions before tracing data flow
- "One more fix attempt" (when already tried 2+)
ALL of these mean: STOP. Return to Phase 1.5.
Common Process Shortcuts (STOP)
| 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" | Untested fixes don't stick. Test first proves it. | |
| "Multiple fixes at once saves time" | Can't isolate what worked. Causes new bugs. | |
| "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. |
If 3+ Fix Attempts Failed
Pattern indicating architectural problem:
- Each fix reveals new shared state/coupling/problem in different place
- Fixes require "massive refactoring" to implement
- Each fix creates new symptoms elsewhere
STOP and question fundamentals:
- Is this pattern fundamentally sound?
- Are we "sticking with it through sheer inertia"?
- Should we refactor architecture vs. continue fixing symptoms?
Document in Phase 1.5:
Phase 1.5 Artifact Template
File: /.recursive/run/<run-id>/01.5-root-cause.md
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/recursive-debugging/SKILL.md
Popularity
- Repository stars
- 119
- Repository forks
- 9
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/try-works/recursive-mode/recursive-debugging)