systematic-debugging

systematic-debugging is a skill for Claude Code from SethGammon/Citadel. It costs 45 tokens per session (1,276 once invoked), scanned A, original, MIT.

A four-phase method for finding the root cause of a software bug: observe, form hypotheses, verify them, and fix the cause.

In plain words
What is it for?
Use it to reproduce an issue, isolate the failing code, test up to three possible causes, and stop after two unsuccessful fixes.
Why use it?
It prevents repeated trial-and-error changes that can create new bugs or hide the original problem.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the citadel plugin — 48 skills, 7 agents, 2 MCP servers shipped together

Good fit Use it to reproduce an issue, isolate the failing code, test up to three possible causes, and stop after two unsuccessful fixes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sethgammon/citadel/systematic-debugging
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add SethGammon/Citadel --skill systematic-debugging
Clone the repo
git clone --depth 1 https://github.com/SethGammon/Citadel

Made for: Claude Code.

Or install citadel, the plugin that ships this one along with the rest of its 48 skills, 7 agents, 2 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for systematic-debugging

README.md
[![agentmods](https://agentmods.dev/badge/skills/sethgammon/citadel/systematic-debugging/github.svg)](https://agentmods.dev/skills/sethgammon/citadel/systematic-debugging)
Your own site
<a href="https://agentmods.dev/skills/sethgammon/citadel/systematic-debugging"><img src="https://agentmods.dev/badge/skills/sethgammon/citadel/systematic-debugging/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for systematic-debugging

Your own site · 80×15
<a href="https://agentmods.dev/skills/sethgammon/citadel/systematic-debugging"><img src="https://agentmods.dev/badge/skills/sethgammon/citadel/systematic-debugging.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,276 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.01276
Opus 5.5 $0.00018 $0.00510
Sonnet 5.5 $0.00009 $0.00255
Haiku 4.5 $0.00005 $0.00128

Measured 1mo ago against content hash f673e7bf5f8e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

systematic-debugging scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/systematic-debugging/SKILL.md · 144 lines

How it starts

The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/systematic-debugging — Root Cause Before Fix

Orientation

Use when: root cause is unknown and premature fixes keep failing -- enforces observe -> hypothesize -> verify before touching code. Don't use when: root cause is already known (use /marshal to implement the fix); the bug is shallow and the stack trace is enough (use /do).

Protocol

Phase 1: OBSERVATION & REPRODUCTION

  1. Read the error message, stack trace, or bug description
  2. Reproduce the issue:
    • If it's a type error: run typecheck and read the full error
    • If it's a runtime error: identify the triggering conditions
    • If it's a behavioral bug: document expected vs actual behavior
  3. Isolate the failing component/function:
    • What file? What function? What line?
    • What are the inputs when it fails?
    • Does it fail consistently or intermittently?

Output: A clear problem statement: "{Component} does {X} when it should do {Y}, triggered by {condition}"

Phase 2: HYPOTHESIS & VERIFICATION

  1. Formulate up to 3 hypotheses for WHY the bug exists:

    • H1: {most likely cause} — because {evidence}
    • H2: {second candidate} — because {evidence}
    • H3: {third candidate} — because {evidence}
  2. For each hypothesis, define a verification step:

    • Add a console.log / diagnostic read / breakpoint
    • Check a specific value at a specific point
    • DO NOT change any logic yet — only observe
  3. Run the verification:

    • Which hypothesis was confirmed?
    • Which were eliminated?
    • If none confirmed: formulate new hypotheses with the new information

CRITICAL: Do not skip this phase. Do not "just try" a fix. Verify first.

Phase 3: ROOT CAUSE ANALYSIS

Once a hypothesis is confirmed:

  1. Explain WHY the bug happens, not just WHERE:
    • Trace the data flow backward from the symptom to the source
    • Identify the specific incorrect assumption or logic error
    • Document the causal chain: "A calls B with X, B assumes X > 0, but A passes -1 when {condition}"

Read the full file on GitHub · 144 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 144 lines · 45 tokens per session scan A f673e7bf5f8e

Subscribe to this mod's changes

systematic-debugging is a skill published in the GitHub repository SethGammon/Citadel (923 stars, last pushed today), licensed MIT. It adds 45 tokens to every session and 1,276 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

zapier-status

Check the health of your Zapier MCP setup. Three modes — health check (dashboard view), audit (find waste and duplicates), diagnose (systematic troubleshooting). Use when asking "is my MCP working?", "check my tools", "audit my setup", "what's broken?", or "zapier status".

zapier/zapier-mcp · 66 tokens

audit-project

Run an iterative multi-agent code audit until critical and high findings are resolved. Use when the user says "audit my code", "find all the bugs", "deep code audit", "iterative review", or "review until clean".

OutlineDriven/odin-claude-plugin · 50 tokens

root-cause

Find the mechanism behind a failure instead of patching its symptom - reproduce first, one variable per experiment with the prediction written before the run, exit by naming the mechanism and pinning it with a failing test. Use for a bug, an unexplained red test, or a failure that will not reproduce.

jjanczur/tyran · 61 tokens

discovery

Use this skill when running systematic quality discovery and issue detection. Runs modular probes adapted to the project's tech stack, presents findings interactively for user triage, and creates VCS issues for confirmed problems. Invoked standalone via /discovery or embedded in session-end.

Kanevry/session-orchestrator · 56 tokens

claude-md-drift-check

Use when detecting drift between CLAUDE.md (or AGENTS.md, the Codex CLI alias) / meta narrative and live repository state. Ten checks: absolute-path resolution, 01-projects/ count claims, issue-reference freshness, session-file existence, command-count sync, session-config-parity (mandatory template keys = error…

Kanevry/session-orchestrator · 196 tokens

debug

Use when encountering any bug, test failure, build break, or unexpected behavior — runs a 4-phase systematic debugging process before proposing any fix. Iron Law: NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST. Produces a .orchestrator/debug/ artifact the fixer agent must reference.

Kanevry/session-orchestrator · 62 tokens