systematic-debugging

A step-by-step method for investigating software bugs, failed tests, and unexpected behavior when the real cause is not yet known. It requires reproducing the problem, tracing the faulty value back to its source, fixing that source, and adding a regression test.

In plain words
What is it for?
Use it before proposing a permanent fix for an unexplained failure. It helps inspect error messages, reproduce the issue, compare recent changes, follow data across system boundaries, find working examples, and verify the final fix.
Why use it?
It reduces the risk of applying a plausible fix to the visible symptom while leaving the underlying defect in place. It is especially useful when a previous fix failed or the problem crosses several components.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/chipfighter/coding-discipline/systematic-debugging
Any agent
npx skills add chipfighter/coding-discipline --skill systematic-debugging
Clone the repo
git clone --depth 1 https://github.com/chipfighter/coding-discipline

Made for: Claude Code, Codex.

Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 852 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00092 $0.00852
Opus 5 $0.00046 $0.00426
Sonnet 5 $0.00018 $0.00170
Haiku 4.5 $0.00009 $0.00085

Measured yesterday against content hash e6a6ca5a05b1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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.

plugins/coding-discipline/skills/systematic-debugging/SKILL.md · 41 lines

How it starts

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

Hard rule: do not package a guess as a permanent fix before locating the root cause. If the user explicitly needs emergency containment, you may apply a reversible temporary mitigation first, but you must state its risks and that the root cause is not fixed, then continue investigating.

1. Reproduce

  • Read the error message and full stack trace carefully—the answer is often there. Do not skip them. Note the line number, file, and error code.
  • Establish a reliable reproduction first: which steps trigger it every time? If you cannot reproduce it reliably, gather data before proceeding. Do not guess.
  • Inspect recent changes: git diff, recent commits, new dependencies, and configuration or environment differences.

2. Trace backward to the root cause

  • Follow the bad value backward: where did it come from → who called something with it → continue to the source. Fix it at the source, not at the symptom.
  • In a multi-component system (CI→build→signing, API→service→library), record what enters and leaves each boundary. Run it once to see which layer fails, then investigate that layer. Do not guess based on intuition.
  • Find a similar working example and list every difference from the broken one. Do not assume that "this difference cannot matter."
  • Example: an amount on a page has two extra decimal places. Trace it backward: the display layer receives the wrong value → it came from the API → the value read from the database is correct → the API returned cents as dollars. Fix the API layer; do not compensate with display formatting.

3. One hypothesis at a time

  • Write it down: "I believe the root cause is X because Y."
  • Test it with the smallest change, varying only one thing at a time. Do not stack new fixes on an unverified one.
  • If you do not understand X, say so. Do not pretend and guess.

4. Fix the root + add a regression test

  • Write a failing test that reproduces the bug before fixing it (see tdd).
  • Make one fix in one place. Do not opportunistically refactor or change anything else.
  • Verify that the test passes, nothing else broke, and the problem is actually gone (see verify-before-done).

Read the full file on GitHub · 41 lines

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. yesterday First seen · 41 lines · 92 tokens per session scan A e6a6ca5a05b1

Subscribe to this mod's changes

systematic-debugging is a skill published in the GitHub repository chipfighter/coding-discipline (6 stars, last pushed 1mo ago), licensed MIT. It adds 92 tokens to every session and 852 once invoked, about $0.0005 per session on Opus 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-31.

Related

Other skills, from other repositories

rulesync

Generates and syncs AI rule configuration files (.cursorrules, CLAUDE.md, copilot-instructions.md) across 20+ coding tools from a single source. Use when syncing AI rules, running rulesync commands, importing or generating rule files, or managing shared AI coding configurations.

dyoshikawa/rulesync · 64 tokens

establishing-project-context

Use when the user asks to establish shared project language, or project work exposes a conflicting, renamed, or deprecated domain term that needs active semantic modeling. Routine small tasks stay on the fast path.

GanyuanRan/Aegis · 45 tokens

autoprompt

Explicit-only useful-first orchestration. Invoke /autoprompt to turn a mission into one executable roadmap, build dependency-safe lanes, and verify the result with independent reviewers. Never infer invocation from ordinary requests. Never resume from leftover artifacts without an explicit resume instruction.

Spielewoy/autoprompt-skill · 56 tokens

office-hours

YC Office Hours — two modes. Startup mode: six forcing questions that expose demand reality, status quo, desperate specificity, narrowest wedge, observation, and future-fit. Builder mode: design thinking brainstorming for side projects, hackathons, learning, and open source. Saves a design doc. Use when asked to…

GCWing/BitFun · 168 tokens

memstack-business-gdpr

Use this skill when the user says 'GDPR', 'data protection', 'privacy compliance', 'DPA', 'DSAR', 'data subject request', 'cookie consent', 'privacy audit', 'CCPA', or asks 'do I need GDPR for this repo'. Scans the repository to detect what personal data is collected, classifies sensitivity, determines whether GDPR…

cwinvestments/memstack · 121 tokens

echo

Use when the user references past sessions, asks 'what did we do', 'do you remember', 'last session', 'recall', or 'continue from'.

cwinvestments/memstack · 35 tokens