debug skill
Debug a stubborn bug with a deterministic reproduction, hypothesis ledger, one-variable fixes, and a regression test. Use after the first obvious look fails, reproduction is unclear, or a fix attempt failed. Not for routine obvious failures; use for "ไล่บั๊ก".
- GitHub stars
- 6
- Files
- 1
- Last commit
- Nov 12, 2026
- License
- MIT
- Allowed tools
- —
What does the debug skill do?
debug is an agent skill. Debug a stubborn bug with a deterministic reproduction, hypothesis ledger, one-variable fixes, and a regression test. Use after the first obvious look fails, reproduction is unclear, or a fix attempt failed. Not for routine obvious failures; use for "ไล่บั๊ก".
How to install the debug skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the debug skill in Plugin
/plugin marketplace add ohm41321/luciazero /plugin install luciazero@luciazero
Install the debug skill in Claude Code
~/.claude/skills/debug/SKILL.md
$ npx degit ohm41321/luciazero/skills/debug ~/.claude/skills/debugInstall the debug skill in Claude Code (project)
.claude/skills/debug/SKILL.md
$ npx degit ohm41321/luciazero/skills/debug .claude/skills/debugInstall the debug skill in Codex
~/.agents/skills/debug/SKILL.md
$ npx degit ohm41321/luciazero/skills/debug ~/.agents/skills/debugInstall the debug skill in Gemini CLI
~/.gemini/skills/debug/SKILL.md
$ npx degit ohm41321/luciazero/skills/debug ~/.gemini/skills/debugInstall the debug skill in Claude.ai
npx degit ohm41321/luciazero/skills/debug debug && zip -r debug.zip debug # claude.ai → Customize → Skills → + → Create skill → Upload a skill → debug.zip
SKILL.md
View on GitHubDebug
For bugs that resist the first obvious look: debugging starts with a hypothesis, not an edit. Reality, not a plausible patch, decides.
1. Reproduce first
Find one command that shows the failure deterministically. It is ground truth. Do not theorize about causes of a failure you cannot trigger.
For intermittent failures, fix the seed, pin the time/timezone, run it in a loop, and identify the trigger before proceeding.
2. Minimize
Shrink to smaller input, fewer flags, one test instead of the suite. Stop when further reduction costs more than it clarifies.
3. Hypothesis ledger
Before inventing causes, search the symptom in:
- repo ledger
docs/lessons.md; - configured harness
luciazero-heuristics.mdunder${CLAUDE_CONFIG_DIR:-$HOME/.claude}or${CODEX_HOME:-$HOME/.codex}.
A match becomes H1, but must pass its proven-by observation.
H<N>: <suspected cause> — refutable by: <command / observation> → <refuted|confirmed|pending>
Run the observation, not the edit. Choose the cheapest discriminating log, query, debugger stop, grep, or bisect. Trust real state. Dead hypotheses stay in the ledger marked refuted. Keep the ledger visible in the conversation.
4. One variable per iteration
Change one thing, re-run the reproduction, and record the result. A failed fix gets reverted before the next attempt. Two consecutive failed fixes on the same hypothesis means the hypothesis is dead; widen to environment, versions, input, concurrency, or a wrong test.
5. Close out
- Commit a regression test. Run it both ways and quote both results: red before
the fix, green after. Use the done skill's
revert-probe.cjswhen applicable; once the fix is committed, pass the pre-fix commit as its base ref. - Remove all instrumentation: prints, sleeps, debug flags.
- Run the full verify tier.
- If the cause, footgun, or null result is not obvious from code, run
/retro; debugged failures go todocs/lessons.mdas symptom → cause → proof → fix.
Files in this skill
1debug skill questions
How do I install the debug skill in Claude Code?
Run npx degit ohm41321/luciazero/skills/debug ~/.claude/skills/debug. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the debug skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.