code-debug

A debugging workflow that investigates a bug or failing test, finds its root cause with evidence, and applies the smallest fix. A root cause is the underlying reason something fails, rather than just the visible error.

In plain words
What is it for?
Use it when a test fails, a build is blocked, or an existing feature stops working.
Why use it?
It prevents changes based on guesses by reproducing the problem, testing possible explanations, and checking the result afterward.

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/alexeyshishin/as-skill/code-debug
Any agent
npx skills add alexeyshishin/as-skill --skill code-debug
Clone the repo
git clone --depth 1 https://github.com/alexeyshishin/as-skill

Made for: Claude Code, Codex.

Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 421 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.00067 $0.00421
Opus 5 $0.00034 $0.00211
Sonnet 5 $0.00013 $0.00084
Haiku 4.5 $0.00007 $0.00042

Measured 2d ago against content hash b43f07537deb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-debug 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 2d ago.

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.

domains/code/skills/code-debug/SKILL.md · 30 lines

What it actually says

Skill: /code-debug

ORCHESTRATOR. One debugger subagent. It diagnoses before it touches anything.

Invocation

/code-debug "<error text / failing test / what broke>" (optionally /code-debug <slug> to tie it to a feature build)

Steps

  1. Gather the symptom: the error/stack/failing-test name from the user, plus the build report swarm-report/<slug>-build.md if a slug was given.
  2. Spawn 1 debugger (Task, general-purpose). Prompt:

    Answer TERSE. Read .claude/agents/debugger.md and follow it exactly. Symptom: <verbatim error / failing test>. Feature slug (if any): .

  3. Report the debugger's return verbatim: root cause, evidence, fix, and the re-run output.
  4. Route the outcome:
    • fixed → suggest /code-review <slug> to check the fix.
    • root_cause_found (found but not fixed) or stuck → show the hypothesis ladder; the user decides the fix, or re-run /code-build <slug> with the root cause as input.
    • cannot_reproduce → ask the user for exact repro steps; do not guess-patch.

Where it sits in the loop

/code-plan → /code-build → /code-review. If a test fails or review says rework/code-debug → back to /code-build. The Stop test-gate hook blocks "done" until tests actually run.

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 30 lines · 67 tokens per session scan A b43f07537deb

Subscribe to this mod's changes

code-debug is a skill published in the GitHub repository alexeyshishin/as-skill (4 stars, last pushed 13d ago), licensed MIT. It adds 67 tokens to every session and 421 once invoked, about $0.0003 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

review-loop

Iterative code review — fix all P1/P2/P3 findings until clean.

swDomass/AI_orchestrator · 19 tokens

plannotator-annotate

Open Plannotator's annotation UI for a file, folder, or URL, then address the returned annotations.

backnotprop/plannotator · 29 tokens

golang-testing

Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI…

samber/cc-skills-golang · 115 tokens

obsidian-bases

Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries. Use when working with .base files, creating database-like views of notes, or when the user mentions Bases, table views, card views, filters, or formulas in Obsidian.

kepano/obsidian-skills · 63 tokens

livecodes/sdk-methods

Use SDK methods to interact with playgrounds: run, getCode, setConfig, getConfig, watch, runTests, format, getShareUrl, show, destroy. Load this skill when programmatically controlling embedded playgrounds, reacting to code changes, or retrieving compiled output.

live-codes/livecodes · 62 tokens

livecodes/language-support

Work with 90+ supported languages, compilers, CSS processors, and WASM-compiled languages for markup, style, and script editors. Load this skill when configuring languages, setting up CSS processors, or working with WASM-based languages like Python, Ruby, or Go.

live-codes/livecodes · 62 tokens