Back to Skills

ce-debug

Diagnosis loop for bugs and failing behavior. Use for errors, stack traces, regressions, failed tests, issue-tracker bugs, stuck investigations after failed fixes, or asks to debug/fix a bug.

21,992stars1,623forksUpdated 6/25/2026

Security Assessment

Safe(90/100)

Detected risks:

Sensitive File Access([references/investigation-techniques.md] .env)
Security Score90/100

About ce-debug

A systematic debugging skill that finds the root cause of a bug and then optionally fixes it. It is used when debugging errors, investigating test failures, reproducing bugs from issue trackers such as GitHub, Linear, or Jira, or when a problem persists after failed fix attempts, including when the user pastes stack traces or error messages or says things like 'debug this', 'why is this failing', or 'fix this bug'. Its central discipline is to investigate before fixing: no fix is proposed until the full causal chain from trigger to symptom can be explained with no gaps, and 'somehow X leads to Y' counts as a gap.

Work proceeds through a defined execution flow. Phase 0 triages the input, fetching issue content when a tracker is referenced (for GitHub it uses gh issue view with title, body, comments, and labels) and reading the full comment thread, since later comments often carry updated reproduction steps or prior failed attempts. A trivial-bug fast-path can present an obvious one-line fix, but still runs the fix-or-diagnose user-choice gate before editing. Phase 1 reproduces the bug, verifies environment sanity (correct branch, installed dependencies, expected runtime version, required env vars, no stale build artifacts), and traces the code path backward from the symptom to where valid state first became invalid using observed rather than assumed values.

Phase 2 forms hypotheses with predictions for uncertain links — if a fix appears to work but the prediction is wrong, only a symptom was found, not the cause — and changes one thing at a time to avoid shotgun debugging. Phase 3 implements the fix only if the user chose to, with test-first discipline and workspace safety checks such as confirming uncommitted work and prompting to create a branch off a default branch. Phase 4 produces a structured handoff summary and prompts for the next action. Throughout, it avoids asking questions by default, investigating first and asking only when genuine ambiguity blocks progress.

FAQ

When should I reach for this skill?

When debugging errors, investigating test failures, reproducing bugs from issue trackers, or when you are stuck after failed fix attempts. It also triggers on phrases like 'debug this', 'why is this failing', or pasted stack traces and error messages.

Does it apply a fix automatically?

Only if you choose to. After diagnosing, it runs a 'fix it now / diagnosis only' user-choice gate, and even the trivial-bug fast-path runs that gate before editing. If you pick diagnosis only, it writes a summary and stops.

How does it avoid treating a symptom as the root cause?

It refuses to propose a fix until it can explain the full causal chain with no gaps, and for uncertain links it forms a prediction about something that must also be true. If the prediction is wrong but a fix appears to work, it concludes a symptom was found, not the cause.

Can it pull in bug details from GitHub or other trackers?

Yes. For GitHub it fetches the issue with gh issue view including comments and labels; for Linear, Jira, or other trackers it uses available MCP tools or fetches the URL, and asks you to paste content if the fetch fails. It reads the full comment thread, not just the opening description.

What does it check before deep code tracing?

Environment sanity: the correct branch with no unintended uncommitted changes, installed and up-to-date dependencies, the expected interpreter/runtime version, required env vars, no stale build artifacts, and relevant local services running when the bug plausibly involves them.

All Files

4 files
references/anti-patterns.md6.0 KB
View
references/defense-in-depth.md2.8 KB
View
SKILL.md22.1 KB
View
references/investigation-techniques.md22.3 KB
View

Install ce-debug

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill