Agent skill

Systematic Debugging

by sangrokjung in sangrokjung/claude-forge

Structured debugging methodology — use before proposing fixes for any error or failure.

MITAuto-check passedDevelopment

Install Systematic Debugging

skills CLI
$ npx skills add sangrokjung/claude-forge --skill systematic-debugging -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sangrokjung/claude-forge systematic-debugging --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sangrokjung/claude-forge.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/systematic-debugging .claude/skills/systematic-debugging && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
systematic-debugging
GitHub stars
850
Token cost
~1.9k tokens
SKILL.md length
979 words
Files
3 (incl. references)
Skills in repo
24
Repo updated
First seen
Licence
MIT

At a glance

Structured debugging methodology — use before proposing fixes for any error or failure.

  • Works in 6 steps: Quick Assessment → Root Cause Investigation → Pattern Analysis → …
  • Previous fix attempts failed
  • SKILL.md covers Overview, Iron Law, When to Use and The Phases, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Systematic Debugging is an agent skill from sangrokjung/claude-forge. Structured debugging methodology — use before proposing fixes for any error or failure. Covers: code bugs, build errors, deploy failures, config conflicts, dependency issues, infra problems. Also use when previous fix attempts failed or root cause is unclear.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/external-research-guide.md` and `references/root-cause-tracing.md`).

It sits in Development, covering Debugging and Root cause analysis. The repository describes itself as: oh-my-zsh for Claude Code — 16 agents, 35 commands, 32 skills, 21 safety hooks in one install. v4.0 adds an adversarial review loop: a second agent that never sees the first… The licence is MIT.

When your agent uses it

  • Previous fix attempts failed
  • Root cause is unclear

Example prompts

  • “/systematic-debugging”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Quick Assessment
  2. Root Cause Investigation
  3. Pattern Analysis
  4. Hypothesis and Testing
  5. Implementation
  6. 5: Architecture Question

What it can do on your machine

Read from SKILL.md and the folder at commit 34d881d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Systematic Debugging loads about 1.9k tokens when it runs, and up to ~3.1k if it reads all its reference files. Until then it costs about 70 tokens; SKILL.md has 979 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~70
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from sangrokjung/claude-forge at commit 34d881d, republished under its MIT licence (© sangrokjung). 979 words, ~1,870 tokens.

Download SKILL.mdSave it as .claude/skills/systematic-debugging/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
systematic-debugging
description
Structured debugging methodology — use before proposing fixes for any error or failure. Covers: code bugs, build errors, deploy failures, config conflicts, dependency issues, infra problems. Also use when previous fix attempts failed or root cause is unclear.

Systematic Debugging

Overview

Guessing fixes wastes time and creates new bugs. Quick patches hide root problems.

Core principle: Never fix before finding the root cause. Symptom fixing is failure.

Iron Law

Never propose a fix without root cause investigation.

Phase 0 or Phase 1 must be completed before any fix is proposed. Phase 0 fixes are ONLY allowed when ALL of these are true:

  • External research found an official solution or known issue for this exact error
  • Change is single file, single point (config value, import, typo)
  • No logic changes

When to Use

All technical problems:

  • Test failures, build errors, deploy errors
  • Config conflicts, dependency issues
  • Infrastructure/environment problems
  • Unexpected behavior, performance issues

Especially when:

  • Under time pressure (urgency breeds guessing)
  • "Let me just quickly fix this" comes to mind
  • Multiple fix attempts have already been tried
  • Previous fixes didn't work
  • You don't fully understand the problem

The Phases

Each Phase must complete before proceeding to the next.

Phase 0: Quick Assessment

Run immediately when an error occurs. Before any fix attempt.

  1. Classify the error — read the error message/symptoms:

    • Same code works in different environment? → Environment issue
    • After recent dependency/version change? → Dependency issue
    • Only fails in specific code path? → Code issue
  2. External research (exact match, 5 min max) — check official docs and GitHub Issues for known issues. Don't rely on self-knowledge alone.

    • See: references/external-research-guide.md
  3. Branch decision:

    • All Iron Law conditions met → Fix in Phase 0
    • Any condition unmet → Enter Phase 1 full process
    • Phase 0 quick-fix fails: Undo (git checkout/undo), enter Phase 1. This attempt counts in the fix counter.
Phase 1: Root Cause Investigation

Before any fix attempt:

  1. Read the error carefully

    • Don't skip errors/warnings
    • Read the entire stack trace
    • Record line numbers, file paths, error codes
  2. Reproduce consistently

    • Get exact reproduction steps
    • Every time? If intermittent, collect more data
  3. Check recent changes

    • git diff, recent commits
    • New dependencies, config changes
    • Environment differences (env vars, Node/runtime version, OS)
  4. Research external sources (deep read)

    • Based on Phase 0 exact match results, investigate further
    • Read official docs for the failure mechanism
    • Check release notes for breaking changes
    • See: references/external-research-guide.md
  5. Collect evidence in multi-component systems

    • Log data in/out at each component boundary
    • Run once to find where it breaks
    • Then deep-dive into that component
  6. Trace data flow

    • Where does the wrong value originate?
    • Trace the call stack backwards to the source
    • See: references/root-cause-tracing.md
Phase 2: Pattern Analysis
  1. Find similar working code in the same codebase
  2. Compare with reference implementations — read the full reference docs, don't skim
  3. Identify all differences between working and broken — don't assume "that's irrelevant"
  4. Map dependencies — what config, environment, other components are needed
Phase 3: Hypothesis and Testing

Before entering Phase 3:

  • Verify clean state (git status)
  • If not clean: git stash or save checkpoint
  • On hypothesis failure: rollback to safe point, try new hypothesis (no cumulative fixes)
  1. Form a single hypothesis: "X is the root cause because Y" — specific, not vague
  2. Test minimally: smallest change to verify the hypothesis. One variable at a time.
  3. Verify before proceeding:
    • Success → Phase 4
    • Failure → New hypothesis (don't stack fixes on top of failed ones)
Phase 4: Implementation
  1. Write a failing test — simplest reproduction, automated if possible, before fixing
  2. Apply a single fix — only the identified root cause, one change at a time, no "while I'm at it"
  3. Verify the fix — test passes? No other tests broken? Problem actually resolved?
  4. If fix doesn't work:
    • How many fix attempts so far?
    • Under 3: return to Phase 1 with new information
    • 3 or more: proceed to Phase 4.5
Show full SKILL.md (384 more words)Show less
Phase 4.5: Architecture Question

Pattern of 3+ failed fixes:

  • Each fix reveals new problems elsewhere
  • Fix requires "major refactoring"
  • Each fix creates symptoms in other places

Stop immediately and ask fundamental questions:

  • Is this pattern itself sound?
  • Are we clinging to it out of inertia?
  • Should we refactor the architecture instead of fixing symptoms?

Report to user and discuss before any more fix attempts.

Red Flags — If you think this, STOP

  • "Let me quickly fix it and investigate later"
  • "Let me try changing X and see if it works"
  • "Let me bundle multiple changes and test once"
  • "Skip tests, just check manually"
  • "It's probably X, let me fix it"
  • "I don't fully understand but this might work"
  • "Let me just try one more fix" (after 2+ attempts)
  • "I don't need to check external docs for this one"
  • "This is definitely a code issue" (without checking environment)

Any of the above: STOP. Return to Phase 0/1. 3+ fix failures: Architecture Question (Phase 4.5)

Common Rationalizations

ExcuseReality
"Simple problem, don't need the process"Simple problems have root causes too. The process is fast for simple bugs.
"Too urgent for process"Systematic debugging is faster than guessing.
"Let me try this first, then investigate"First fix sets the pattern. Start right.
"I'll write tests after fixing"Fixes without tests don't last. Test first.
"Bundle changes to save time"Can't tell what worked. Creates new bugs.
"Docs are too long, I'll wing it"Partial understanding = guaranteed bugs. Read it all.
"I can see the problem, just fix it"Seeing symptoms ≠ understanding root cause.
"One more fix" (2+ failures)3+ failures = architecture problem. Ask, don't fix.
"I know this error, no need to check docs"LLM confidence ≠ accuracy. Verify externally.

Supporting Techniques

See references in this directory:

  • references/external-research-guide.md — External docs/GitHub Issues lookup procedure
  • references/root-cause-tracing.md — Call stack backtracing to find bug origins

Quick Reference

PhaseKey ActivitySuccess Criteria
0. Quick AssessmentError classification, external research (exact match)Error type classified + 1+ external search done
1. Root CauseRead errors, reproduce, check changes, deep researchUnderstand what breaks and why
2. PatternFind working similar code, compareDifferences identified
3. HypothesisSingle hypothesis, minimal testConfirmed or new hypothesis
4. ImplementationWrite test, fix, verifyBug fixed, tests pass
4.5. ArchitectureStop after 3 failures, reportArchitecture review decision

© sangrokjung, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/systematic-debugging of sangrokjung/claude-forge.

  • SKILL.md
  • references/external-research-guide.md
  • references/root-cause-tracing.md

Open the folder on GitHubat commit 34d881d

Compare with similar skills

Systematic Debugging next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Systematic Debugging compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Systematic Debugging this skillsangrokjung/claude-forge850—~1.9kAutomated safety check: PassMIT
OpenLogi macOS Permissions TriageAprilNEA/OpenLogi23k—~2.5kAutomated safety check: NotesApache-2.0
Bug Finder for daisyUIsaadeghi/daisyui43k—~2.3kAutomated safety check: PassMIT
Root Cause Debugginggarrytan/gstack136k—~1.4kAutomated safety check: PassMIT
Graph-Based Bug Tracingtirth8205/code-review-graph32k1 repos~287Automated safety check: PassMIT
Systematic DebuggingChrisWiles/claude-code-showcase6.1k3 repos~1.2kAutomated safety check: PassNone

Similar skills

  • Decides whether an OpenLogi device problem on macOS is a privacy-permission (TCC) problem, using agent log lines, and says which identity needs which grant.

    23k GitHub stars~2.5k tokensUpdated 5 days ago
    DevelopmentAuto-check: notes
  • Bug Finder for daisyUI

    saadeghi/daisyui

    Investigates suspected bugs in the daisyUI monorepo through read-only analysis, then writes a decision-ready fix plan in tmp/bugs without changing any product code.

    43k GitHub stars~2.3k tokensUpdated 8 days ago
    DevelopmentAuto-check passed
  • Root Cause Debugging

    garrytan/gstack

    Investigates bugs, errors and stack traces in phases and requires a root-cause hypothesis to be confirmed before any fix is written.

    136k GitHub stars~1.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Graph-Based Bug Tracing

    tirth8205/code-review-graph

    Traces a bug through a code knowledge graph, following callers, callees and execution flow before opening source files, within a small token budget.

    32k GitHub starsUsed in 1 repo~287 tokens
    DevelopmentAuto-check passed
  • Systematic Debugging

    ChrisWiles/claude-code-showcase

    Applies a four-phase debugging routine that finds the root cause of a bug or failing test before any fix is written.

    6.1k GitHub starsUsed in 3 repos~1.2k tokens
    DevelopmentAuto-check passed
  • Debugging and Error Recovery

    addyosmani/agent-skills

    Applies a stop-the-line rule and a step-by-step triage when tests fail, builds break or something stops working, aiming at the root cause instead of guesses.

    103k GitHub starsUsed in 1 repo~2.6k tokens
    DevelopmentAuto-check passed

More from sangrokjung/claude-forge

All 24 skills in this repo
  • Debugging Strategies

    sangrokjung/claude-forge

    Master systematic debugging techniques, profiling tools, and root cause analysis to efficiently track down bugs across any codebase or technology stack.

    850 GitHub starsUsed in 13 repos~3.1k tokens
    Auto-check passed
  • Dependency Upgrade

    sangrokjung/claude-forge

    Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing.

    850 GitHub starsUsed in 12 repos~2.3k tokens
    Auto-check passed
  • Skill Factory

    sangrokjung/claude-forge

    Analyze session work and automatically convert reusable patterns into Claude Code skills.

    850 GitHub stars~2.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Cc Dev Agent

    sangrokjung/claude-forge

    A skill your agent uses when starting Claude Code projects, writing CLAUDE.md/spec.md, dispatching subagents, or requesting Agent Teams parallel development.

    850 GitHub stars~771 tokensUpdated 1 mo ago
    Auto-check passed
  • Continuous Learning V2

    sangrokjung/claude-forge

    Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents.

    850 GitHub starsUsed in 6 repos~1.8k tokens
    Auto-check passed
  • Harness Diet

    sangrokjung/claude-forge

    Measure and shrink the always-loaded context of a Claude Code harness (CLAUDE.md + rules without paths frontmatter) back under budget — migrate narrative to reference files, convert rules to…

    850 GitHub stars~1.9k tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Systematic Debugging

What does Systematic Debugging do?

Structured debugging methodology — use before proposing fixes for any error or failure. Systematic Debugging is an agent skill from sangrokjung/claude-forge. Structured debugging methodology — use before proposing fixes for any error or failure.

When should I use Systematic Debugging?

Systematic Debugging fits situations like: previous fix attempts failed; root cause is unclear.

How do I install Systematic Debugging in Claude Code?

Run `npx skills add sangrokjung/claude-forge --skill systematic-debugging -a claude-code`. Or copy the skill folder (skills/systematic-debugging in sangrokjung/claude-forge) into .claude/skills/systematic-debugging in your project. Claude Code loads it when a task matches its description.

How do I install Systematic Debugging in Codex?

Run `npx skills add sangrokjung/claude-forge --skill systematic-debugging -a codex`. Or copy the skill folder (skills/systematic-debugging in sangrokjung/claude-forge) into .agents/skills/systematic-debugging in your project. Codex loads it when a task matches its description.

Can I use Systematic Debugging in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sangrokjung/claude-forge --skill systematic-debugging -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/systematic-debugging, .gemini/skills/systematic-debugging, .github/skills/systematic-debugging and .opencode/skills/systematic-debugging in your project.

What does Systematic Debugging need to run?

SKILL.md names no scripts, command-line tools or credentials: Systematic Debugging is instructions for the agent only.

Does Systematic Debugging access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Systematic Debugging safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Systematic Debugging use?

Systematic Debugging is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Systematic Debugging use?

About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.2k tokens, read only when the agent opens those files.

What are the alternatives to Systematic Debugging?

Skills that share tags, products or a category with Systematic Debugging: OpenLogi macOS Permissions Triage (AprilNEA/OpenLogi, 23k stars), Bug Finder for daisyUI (saadeghi/daisyui, 43k stars), Root Cause Debugging (garrytan/gstack, 136k stars) and Graph-Based Bug Tracing (tirth8205/code-review-graph, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Systematic Debugging?

sangrokjung (a GitHub user) maintains it in sangrokjung/claude-forge, which has 850 GitHub stars. The repository holds 24 skills in this directory. The repository was last updated on September 3, 2026.

Source: sangrokjung/claude-forge on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.