Skip to main content
skill CX Codex

systematic-debugging · autohandai — Claude Code skill: what it does, how to install

Stops AI agents from guessing fixes when tests fail. Forces root-cause discovery, hypothesis verification, and regression tests before any code patch.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add autohandai/code-cli --skill systematic-debugging -a claude-code
Open on GitHub

What systematic-debugging does

The skill splits the debugging workflow into four mandatory phases. First, the model inspects stack traces and reproduces the error using run_command. It then inspects recent updates via git_diff or git_log and locates an existing working reference in the repository to catch subtle differences.

Fixes remain blocked until phase three proves the underlying cause. Each hypothesis must follow a single sentence: 'X causes Y because Z', tested with one variable at a time. The agent writes a failing regression test before patching and avoids incidental refactoring. Crucially, after three failed attempts, the agent must halt and question the architecture with the developer instead of cycling through patches.

What it helps with

  • pinpoint the root cause of failing test suites without trial-and-error edits
  • diagnose unexpected CI failures using git history and environment checks
  • write targeted regression tests before touching production code
  • instrument multi-layer systems to see where data breaks before it surfaces

Example prompts for the agent

  • The auth.spec.ts test fails in CI, investigate systematically and find the root cause.
  • The worker hangs during queue polling, inspect recent changes with git_diff and test one hypothesis.
  • The /api/orders endpoint throws a 500 error on empty carts; write a failing regression test and prepare a single fix.

How to install systematic-debugging

1Skills CLI (Vercel)

npx skills add autohandai/code-cli --skill systematic-debugging -a claude-code

2Manually: put the files in place

~/.claude/skills/systematic-debugging/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/systematic-debugging/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about systematic-debugging

How to install systematic-debugging in Claude Code?

Run npx skills add autohandai/code-cli --skill systematic-debugging -a claude-code. The skill will be installed to ~/.claude/skills/systematic-debugging/SKILL.md.

What does systematic-debugging do?

It prevents premature patches by requiring a confirmed reproduction, an explicit hypothesis, and a failing regression test before changing code.

What happens after three failed fixes?

The skill orders the agent to stop generating code and discuss the broader architecture with the user.

Source text

SKILL.md · Apache-2.0
---
name: systematic-debugging
description: Find the root cause before proposing any fix. Use when something fails, throws, hangs, flakes, or behaves unexpectedly, including failing tests and CI. Auto-activates for bug reports.
allowed-tools: read_file find_grep fff_find list_tree git_diff git_log git_status run_command search_with_context
---

# Debug systematically

A fix without a confirmed cause is a guess, and guesses cost more than they save.
Work the four phases in order; do not propose code before Phase 3 confirms a cause.

## Phase 1 — Reproduce and read

- Read the whole error: message, stack, exit code, the lines around it. The
  answer is often already there.
- Reproduce on purpose. Run the failing command, test, or scenario yourself with
  `run_command`. If it cannot be reproduced, gather more evidence instead of guessing.
- Note what changed: `git_log` and `git_diff` for the touched area, new
  dependencies, config, environment (CI vs local, OS, shell, terminal, load).
- For multi-layer systems, add cheap instrumentation at each boundary and run
  once to see where the data goes wrong. Fix where it originates, not where it surfaces.

## Phase 2 — Compare with what works

- Find the nearest working example in the same codebase and list every difference,
  however small. Do not assume a difference cannot matter.
- Read the reference implementation completely before adapting a pattern.

## Phase 3 — One hypothesis, one test

- Write the hypothesis down in one sentence: "X causes Y because Z."
- Test it with the smallest possible change or probe. One variable at a time.
- If it fails, form a new hypothesis. Do not stack fixes. After three failed
  fixes, stop and question the design with the user; that is an architecture
  problem, not a bug.

## Phase 4 — Fix with a regression test

- Write the failing test first; it must fail for the reason you found.
- Apply the single fix. No bundled refactors or "while I am here" edits.
- Run the test, the neighbouring suites, lint, and the project's proof command.
- Report what the cause was, what you changed, and what you verified. If the
  cause was environmental (load, disk, timing), say so with the evidence.

## Red flags that mean "back to Phase 1"

"Quick fix for now", "just try changing X", "I do not fully understand but this
might work", "one more attempt" after two failures.

© autohandai · Apache-2.0 · autohandai/code-cli

Similar skills

All skills for Testing and QA →

systematic-debugging by other authors comes first.

systematic-debugging Jesse Vincent Makes the agent investigate the cause of a failure before it suggests a patch. Use it for failing tests, build errors, and behaviour that does not match expectations. CX Codex 306,118installs systematic-debugging Hermes Agent (adapted from obra/superpowers) A four-phase skill that moves from a reproducible symptom to its root cause. Use it for test failures, build errors, integration issues, and unexpected behavior. CX Codex +1 471installs systematic-debugging spencerpauly Enforces a structured debugging workflow on your AI assistant instead of random edits. It helps isolate elusive bugs and verify root causes with evidence. CX Codex +1 545installs systematic-debugging bobmatnyc This skill guides an agent from reproducing a bug to checking the fix. Use it when an error or unexpected behavior has no clear cause. CX Codex +1 382installs systematic-debugging GanyuanRan This skill guides bug and test-failure investigations before code changes. Use it to trace a symptom to the logic that owns the cause. CX Codex +1 ★ 1,388repo stars improve-codebase-architecture Matt Pocock This skill scans a codebase for architectural friction, then builds a visual HTML report with refactoring candidates. Use it before a deeper architecture review. 1,163,035installs design-taste-frontend Leonxlnx This skill directs the design of public pages and work screens, then checks the result in a browser through screenshots. Use it when an interface feels generic or unfinished. CX Codex +1 678,700installs tdd Matt Pocock Guides the red-green TDD loop: ensures tests are written first, keep them at public interfaces, and avoid coupling to implementation details. 1,141,062installs skill-creator official anthropics Creates and refines skills, then tests them with prompts, evaluations, and performance checks. 414,180installs agent-browser vercel-labs A CLI skill for browser control: it opens pages, fills forms, clicks buttons, and tests web apps. Use it when an agent needs to act inside a website. CX Codex +1 1,200,000installs prototype Matt Pocock Creates throwaway prototypes for checking state logic or exploring UI before committing the decision to the main codebase. 986,201installs

From the same set14

workflow-discovery This skill scores proposed workflows against observed repositories, skills and recurring requests, then returns a ranked JSON object. CX Codex +1 ★ 211repo stars root-cause-analysis Investigate outages, regressions, and recurring failures with a skill that traces evidence to underlying design flaws. Use it to draft a postmortem with a timeline and prevention tasks. CX Codex +1 ★ 211repo stars pull-request-review A skill that reviews a pull request or branch diff: checks the change against the issue, hunts correctness and security defects, and returns prioritized comments. CX Codex +1 ★ 211repo stars performance-analysis Guides coding agents to measure latency or memory usage before editing code. Pinpoints performance bottlenecks with reproducible numbers. CX Codex +1 ★ 211repo stars goal-writer Turns a rough request into a verifiable objective for /goal mode. Use it when an agent needs to work with less supervision and a clear condition for stopping. CX Codex +1 ★ 211repo stars git-analysis Answers questions about git history: what changed, who wrote a line, where a regression crept in. Useful for review, bisect-style narrowing and changelogs. CX Codex +1 ★ 211repo stars extension-builder Builds, ports, and tests Autohand Code extensions from natural language prompts or Pi packages. Essential for writing custom tools, agents, and CLI hooks. CX Codex +1 ★ 211repo stars deep-research This skill investigates a topic across multiple sources and saves a cited report. Use it when claims need checking, comparison, and a documented trail. CX Codex +1 ★ 211repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor