Agent skill

Systematic Debugging

by GanyuanRan in GanyuanRan/Aegis

A skill your agent uses when encountering a bug, test failure, or unexpected behavior, before proposing fixes

MITAuto-check passedTesting & QA

Install Systematic Debugging

skills CLI
$ npx skills add GanyuanRan/Aegis --skill systematic-debugging -a claude-code

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

GitHub CLI
$ gh skill install GanyuanRan/Aegis 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/GanyuanRan/Aegis.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
1.3k
Used in
1 other repo
Token cost
~2.8k tokens
SKILL.md length
1,316 words
Files
9
Skills in repo
21
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when encountering a bug, test failure, or unexpected behavior, before proposing fixes

  • Works in 5 steps: Isolate — read error, reproduce, inspect… → Identify owner — compare working… → Decide before editing — Before fixing,… → …
  • Encountering a bug
  • SKILL.md covers Core invariant, Quick bug lane, Diagnose before repair and Repair and proportional…, plus 1 more section
  • Runs TypeScript and Shell scripts from its folder; calls python

What it does

Systematic Debugging is an agent skill from GanyuanRan/Aegis. Use when encountering a bug, test failure, or unexpected behavior, before proposing fixes

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files (for example `advanced-debugging-governance.md`, `condition-based-waiting-example.ts` and `condition-based-waiting.md`).

It sits in Testing & QA, covering Debugging and Failing and flaky tests. The repository describes itself as: Make AI coding agents architecture-aware: baseline-first, evidence-verified, drift-checked, and safe across long tasks. The licence is MIT.

When your agent uses it

  • Encountering a bug
  • Unexpected behavior
  • Before proposing fixes

Example prompts

  • “/systematic-debugging”

Requirements

  • Python 3
  • Node.js
  • A Bash shell

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Isolate — read error, reproduce, inspect the diff, and drill upward through diagnostic layers
  2. Identify owner — compare working behavior, trace the bad value, locate the
  3. Decide before editing — Before fixing, run Patch-Shape Triage and Ripple Signal Triage when shared logic,
  4. Prove — test one hypothesis with the smallest reproduction or
  5. Repair and close — fix minimally at the canonical owner, verify in

What it can do on your machine

Read from SKILL.md and the folder at commit 4edf34e. 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

    Ships script files (TypeScript and Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    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 2.8k tokens when it runs. Until then it costs about 28 tokens; SKILL.md has 1,316 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~28
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k

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 GanyuanRan/Aegis at commit 4edf34e, republished under its MIT licence (© GanyuanRan). 1,316 words, ~2,765 tokens.

Download SKILL.mdSave it as .claude/skills/systematic-debugging/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
name
systematic-debugging
description
Use when encountering a bug, test failure, or unexpected behavior, before proposing fixes

Execute

Bug, failure, or unexpected behavior:

  1. Isolate — read error, reproduce, inspect the diff, and drill upward through diagnostic layers: L1 symptom → L2 logic → L3 system → L4 architecture → L5 cross-system contract → L6 platform → L7 spec gap. Layers are observation altitudes, not one causal chain; the causal shape at the stop altitude is classified explicitly before any root claim. Stop only when causal proof accounts for the recurrence generator or reaches a T-class boundary.
  2. Identify owner — compare working behavior, trace the bad value, locate the canonical owner, and treat duplicate owners as a finding.
  3. Decide before editing — Before fixing, run Patch-Shape Triage and Ripple Signal Triage when shared logic, contracts, fallbacks, adapters, producer/consumer seams, or source-of-truth boundaries are involved. Surface Change Necessity for any new source-code path or non-trivial source edit. Run Minimality Check for a new branch, fallback, adapter, owner, or compatibility path, and Pre-Edit Complexity Check for an overloaded owner or complexity growth. After Change Necessity selects code-change and before the first repair edit, own the TDD Route for the repair slice per test-driven-development (off default; strict on behavior/bugfix/shared/contract/persistence/permission/migration risk).
  4. Prove — test one hypothesis with the smallest reproduction or verification. A failing test first is required only by a recorded TDD Route: strict; with TDD Mode: off, do not require a failing test or RED/GREEN cycle. Three failed fixes means stop and question architecture.
  5. Repair and close — fix minimally at the canonical owner, verify in proportion to risk, review architecture, and close both repair and retirement tracks. If any symptom remains, stop and diagnose it separately.

Done: confidence ≥ B, causal status matches recurrence evidence or an external terminal, tracks explicit, no H signal, and required D evidence passes.

Core invariant

Find root cause and fix the bug class at its canonical owner. A minimal fix is not the smallest textual diff; it is the smallest sufficient owner-level repair.

Quick bug lane

For a low-risk, reproducible, single-owner bug with no patch-shape signal, keep the readback compact: Symptom, Reproduction, Root Cause, Change Necessity, Fix Boundary, and Verification. Skip the causal card only when the causal-proof owner's Quick Exit Proof passes. Quick bug lane must surface Change Necessity before source edits. One sentence may cover the user-visible need, no-change/non-code option, why code must change, minimum boundary, and an explicit decision token such as Decision: code-change. If shared logic, a contract, fallback, duplicate owner, consumer patch, or cross-module behavior appears, leave this lane.

Aegis Visibility names the evidence/owner/patch-shape/verification effect. Pass root cause, avoided misfix, boundary, evidence, complexity, and risk to verification-before-completion; no separate receipt.

Diagnose before repair

For UI/interaction defects, compose ui-ux-governance for relevant state and recovery rules at the user-visible seam. Keep reproduction/root-cause ownership here; a proposed manual check is not executed evidence.

  1. Read the complete error/stack and record inputs, environment, versions, and success criteria.
  2. Reproduce consistently. If unstable, read feedback-loop-construction.md only when evidence shows intermittent or timing-dependent reproduction and build a bounded loop. Shrink the repro to load-bearing elements as the test input, never the fix scope: still drill upward; test at the correct seam.
  3. Inspect recent changes and compare a working example. Code is evidence; if authority, glossary, code, and tests disagree, compose establishing-project-context rather than silently redefining a term.
  4. Instrument component boundaries, then trace the bad value toward its source. Read root-cause-tracing.md only when the observed bad value is several calls or components downstream from its origin.
  5. State one hypothesis and falsify it with one-variable evidence. Do not stack speculative fixes. End each loop with Goal | DeeperCause | Evidence | Risk/Unknown | Decision.
Canonical-owner and patch-shape gate

Before editing, continue upward unless evidence proves the local site is the canonical owner when the candidate is any of these signals:

  • keyword, phrase, regex, negation-word list, or sample-text exception;
  • local guard, extra conditional, try/catch, early return, or one-off branch;
  • fallback, adapter, compatibility branch, prompt branch, or legacy path expansion;
  • consumer/caller/readiness/presentation-layer patch;
  • downstream logic re-parses raw text or re-infers action/state while typed intent, normalized state, contract, or another source-of-truth exists;
  • artifact/download/export/readback/cache patch without producer/owner proof.
text
PatchShape:
CanonicalOwner:
UpwardDrillSignal:
Decision: fix owner | continue investigation | escalate

A locally green test does not erase triage; a renamed carrier is not a new direction.

When a repair may reinterpret or retire existing semantics, responsibility, contract, or relationship, name the behavior to preserve, highest-risk counterexample, and material unknown. For each known explicit anchor or upstream/downstream reference, state its role and disposition: preserve, rebind to the canonical owner, retire with reason, or reject because of conflict. Leave unresolved relationships unknown; do not re-infer them downstream. Bind role before value and retire invalid responsibility, not evidenced carrier capability. This bounded reminder is not a behavior matrix, relationship graph, referential-integrity proof, or exhaustive discovery claim. It adds no artifact, TDD risk signal, or regression scope; the existing TDD route owner and configured/default mode still apply.

If the diagnosis crosses L3, a patch-shape signal fires, a user disputes the root claim, a prior fix leaves a symptom, compound/root topology is plausible, two or more anchored manifestations of one incident exist, reproduction conditions diverge across occurrences, or an upstream producer/config/default/contract/spec remains unexcluded, read root-cause-claim-contract.md before claiming a root cause. It is the sole owner of the Pre-Claim Gate, causal-closure/falsifier proof, layer-ceiling proof, and Causal Topology Gate.

Show full SKILL.md (455 more words)Show less
Change Necessity

This decision is behavior-triggered, not prompt-triggered. It applies to any new source-code path. Before that path or a non-trivial source edit, expose the Change Necessity decision (no-change | docs/config-only | code-change | needs-clarification); field detail lives in advanced-debugging-governance.md.

Minimality and owner fit

For any proposed branch, fallback, adapter, compatibility path, or new owner, run Minimality Check (fields in advanced-debugging-governance.md) with verdict sufficient repair | local patch | needs first-principles review, and retire invalid responsibility: a local patch needs a retention reason and retirement trigger. For a new non-ordinary repair surface, run the Existence Check in docs/current/AEGIS_MINIMALITY_REFERENCE.md. If retirement involves old code, external compatibility, or persistent-state risk, compose anti-entropy-governance; it chooses the retirement path but never grants destructive authority.

Before editing an overloaded or mixed-purpose owner, complete Pre-Edit Complexity Check and Pre-Edit Owner-Fit Decision (templates in advanced-debugging-governance.md).

Use using-aegis/references/complexity-governance.md for pressure signals. Do not add new-responsibility in place by default. If the safer boundary changes the approved shape, update the plan/spec first.

Repair and proportional verification

Implement one owner fix; no bundled “while here” work. Under strict TDD, create the smallest failing test first. With TDD off, a reproduction is diagnostic evidence, not a RED gate or a prerequisite for production edits.

Verification must match the risk:

  • local single-owner repair: original reproduction plus focused regression;
  • shared/contract/cross-module repair: canonical owner plus affected consumers and compatibility boundary;
  • fallback/owner retirement: main-path, lingering-reference, negative, and boundary checks;
  • timing/concurrency repair: read condition-based-waiting.md only when evidence identifies polling, sleeps, or race timing as part of the cause;
  • invalid state crossing several trusted boundaries: read defense-in-depth.md only after the root repair is known and evidence shows a second independent validation boundary is required.

Read advanced-debugging-governance.md before another fix for failed/ persistent / divergent repair or three failures; for unclear/disputed stop / Layer Stop Card / intervention; or plausible compound root. Closeout triggers: repair-added patch-shape; multi-site/one-regression; remaining pattern/anomaly/duplicate/wrong-owner/downstream repair; uninspected same-symptom fix; open recurrence/unsupported root status; missing compound topology-specific member/anti-disguise proof; outside-repo authority; unmigrated published-contract break; undefined spec; missing permission/info. They route H/T/D; detail is not causal proof.

For non-trivial debugging with configured workspace support:

bash
python <aegis-workspace-helper> init --root <target-project-root>
python <aegis-workspace-helper> new-work --root <target-project-root> ...
python <aegis-workspace-helper> add-evidence --root <target-project-root> --work <YYYY-MM-DD-slug> ...
python <aegis-workspace-helper> check --root <target-project-root>

Failed attempts use <aegis-workspace-helper> add-attempt; add-evidence is terminal-only.

Fast bug fix or quick bug fix pressure does not skip this: if Ripple Signal Triage fires, record it before editing and verify the canonical owner plus affected downstream path. Records are advisory, not completion authority.

Closure

Always report:

  • Repair — cause, owner, smallest change, compatibility, verification.
  • Retirement — invalid responsibility status, carrier/capability disposition, retention reason/trigger, removal check.

Confirm the reproduction, same-pattern handling, authority, complexity, and retirement. Prefix debug logs (e.g. [DEBUG-a4f2]); confirm one-grep removal before close. Confidence: A = direct regression evidence; B = strong evidence with bounded unknowns; C = partial and not resolved.

Trace Digest may summarize audit evidence; never expose chain-of-thought or replace root-cause, rule-effect, and verification evidence.

© GanyuanRan, 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 8 other files in skills/systematic-debugging of GanyuanRan/Aegis.

  • SKILL.md
  • advanced-debugging-governance.md
  • condition-based-waiting-example.ts
  • condition-based-waiting.md
  • defense-in-depth.md
  • feedback-loop-construction.md
  • find-polluter.sh
  • root-cause-claim-contract.md
  • root-cause-tracing.md

Open the folder on GitHubat commit 4edf34e

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in GanyuanRan/Aegis, which our catalogue first saw on October 7, 2026.

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 skillGanyuanRan/Aegis1.3k1 repos~2.8kAutomated safety check: PassMIT
Pester Failure AnalysisPowerShell/PowerShell56k—~5.1kAutomated safety check: PassMIT
Testingkortix-ai/suna20k—~3.6kAutomated safety check: NotesCustom licence
OpenLogi Change VerificationAprilNEA/OpenLogi23k—~1.4kAutomated safety check: PassApache-2.0
RustPython Test Failure InvestigationRustPython/RustPython22k—~467Automated safety check: PassMIT
Issue To Regression Testbrunosabot/streamline-card269—~529Automated safety check: PassMIT

Similar skills

  • Pester Failure Analysis

    PowerShell/PowerShell

    Investigates failing Pester tests in PowerShell CI jobs by following a six-step workflow from pull request status to documented fix recommendations.

    56k GitHub stars~5.1k tokensUpdated today
    Testing & QAAuto-check passed
  • Testing

    kortix-ai/suna

    A skill your agent uses for every Kortix test task, behavior change, bug fix, refactor, API route change, CLI change, SDK change, browser journey, test failure, coverage question, local benchmark…

    20k GitHub stars~3.6k tokensUpdated today
    Testing & QAAuto-check: notes
  • Plans the smallest check that could disprove a code change in the OpenLogi project, then escalates through reproduction, focused tests and a final gate before a push.

    23k GitHub stars~1.4k tokensUpdated 4 days ago
    Testing & QAAuto-check passed
  • Investigates a failing RustPython test by comparing it with CPython, then either fixes it or gathers the details for an incompatibility report.

    22k GitHub stars~467 tokensUpdated today
    Testing & QAAuto-check passed
  • Issue To Regression Test

    brunosabot/streamline-card

    A skill your agent uses when the user asks to fix a bug, references a GitHub issue number, or describes an issue and wants a fix.

    269 GitHub stars~529 tokensUpdated 4 mo ago
    Testing & QAAuto-check passed
  • Ue Test Authoring

    JasonMa0012/MooaToon

    A skill your agent uses when writing or modifying UE automated tests (Automation, CQTest, Functional, Gauntlet, LowLevel) with Rider MCP available.

    749 GitHub stars~2.1k tokensUpdated 19 days ago
    Testing & QAAuto-check: notes

More from GanyuanRan/Aegis

All 21 skills in this repo
  • Anti Entropy Governance

    GanyuanRan/Aegis

    A skill your agent uses when touching retiring old logic, collapsing duplicate owners, removing fallbacks, or schema/persistence/source-of-truth boundaries; identify opportunities automatically…

    1.3k GitHub starsUsed in 1 repo~3.1k tokens
    Auto-check passed
  • Executing Plans

    GanyuanRan/Aegis

    A skill your agent uses when executing a written implementation plan across sessions or with review checkpoints.

    1.3k GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed
  • First Principles Review

    GanyuanRan/Aegis

    A skill your agent uses when asked for first-principles or Occam's-razor review, or when high-risk decisions involve competing constraints, fallback growth, duplicate owners, or architecture…

    1.3k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Goal Framing

    GanyuanRan/Aegis

    A skill your agent uses when the user explicitly sets an Aegis goal with /aegis-goal, Aegis goal:, or asks to define goal, success evidence, stop condition, or task boundaries before work.

    1.3k GitHub starsUsed in 1 repo~1.2k tokens
    Auto-check passed
  • A skill your agent uses 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.

    1.3k GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check: warnings
  • A skill your agent uses when the user asks to create, write, update, amend, supersede, or evaluate an ADR, architecture decision record, durable architecture decision, decision log, or baseline sync…

    1.3k GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed

Questions about Systematic Debugging

What does Systematic Debugging do?

A skill your agent uses when encountering a bug, test failure, or unexpected behavior, before proposing fixes. Systematic Debugging is an agent skill from GanyuanRan/Aegis.

When should I use Systematic Debugging?

Systematic Debugging fits situations like: encountering a bug; unexpected behavior; before proposing fixes.

How do I install Systematic Debugging in Claude Code?

Run `npx skills add GanyuanRan/Aegis --skill systematic-debugging -a claude-code`. Or copy the skill folder (skills/systematic-debugging in GanyuanRan/Aegis) 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 GanyuanRan/Aegis --skill systematic-debugging -a codex`. Or copy the skill folder (skills/systematic-debugging in GanyuanRan/Aegis) 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 GanyuanRan/Aegis --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?

Going by SKILL.md and its folder, Systematic Debugging needs TypeScript and a shell for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3; Node.js; A Bash shell.

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 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Systematic Debugging?

Skills that share tags, products or a category with Systematic Debugging: Pester Failure Analysis (PowerShell/PowerShell, 56k stars), Testing (kortix-ai/suna, 20k stars), OpenLogi Change Verification (AprilNEA/OpenLogi, 23k stars) and RustPython Test Failure Investigation (RustPython/RustPython, 22k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Systematic Debugging?

GanyuanRan (a GitHub user) maintains it in GanyuanRan/Aegis, which has 1,322 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on October 3, 2026.

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