afc:debug

afc:debug is a skill for Claude Code, Codex from jhlee0409/all-for-claudecode. It costs 21 tokens per session (1,423 once invoked), scanned B, original, MIT.

A bug investigation and repair workflow that finds the likely cause of broken behavior, errors, or crashes and applies a fix. It uses the error details, reproduction steps, expected behavior, code flow, and relevant state to guide the investigation.

In plain words
What is it for?
Diagnosing error messages, reproducing failures, tracing bad data or state, fixing bugs, and checking that the fix resolves the original problem.
Why use it?
It turns a symptom into a tested explanation of what went wrong instead of relying on guesses. A repeated review loop checks whether the proposed fix is safe and accurate.

Skill for Claude CodeCodex

Part of the afc plugin — 31 skills, 12 agents, 19 hooks shipped together

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

Made for: Claude Code, Codex.

Or install afc, the plugin that ships this one along with the rest of its 31 skills, 12 agents, 19 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for afc:debug

README.md
[![agentmods](https://agentmods.dev/badge/skills/jhlee0409/all-for-claudecode/debug.svg)](https://agentmods.dev/skills/jhlee0409/all-for-claudecode/debug)
Your own site
<a href="https://agentmods.dev/skills/jhlee0409/all-for-claudecode/debug"><img src="https://agentmods.dev/badge/skills/jhlee0409/all-for-claudecode/debug.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,423 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00021 $0.01423
Opus 5 $0.00010 $0.00711
Sonnet 5 $0.00004 $0.00285
Haiku 4.5 $0.00002 $0.00142

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

Security

Grade B, and why

afc:debug scanned grade B with 1 finding 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 4d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

!`cat .claude/afc.config.md 2>/dev/null || echo "[CONFIG NOT FOUND] .claude/afc.config.md not found. Create it with /afc:init."`
skills/debug/SKILL.md · 150 lines

How it starts

The opening of the file, as written. The whole thing — 150 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/afc:debug — Bug Diagnosis and Fix

Analyzes the root cause of a bug and fixes it. Validates the safety and accuracy of the fix with convergence-based Critic Loop.

Arguments

  • $ARGUMENTS — (required) Bug description, error message, or reproduction steps

Project Config (auto-loaded)

!cat .claude/afc.config.md 2>/dev/null || echo "[CONFIG NOT FOUND] .claude/afc.config.md not found. Create it with /afc:init."

Execution Steps

1. Gather Information

  1. Extract from $ARGUMENTS:

    • Symptom: what is going wrong?
    • Reproduction conditions: when does it occur?
    • Error message: full text if available
    • Expected behavior: what should happen?
  2. Ask user for additional information if needed (max 2 questions)

2. Root Cause Analysis (RCA)

Proceed in order, applying adaptive skipping based on symptom type:

  1. Error trace: extract file:line from error message/stack trace → read that code
  2. Data flow: trace backwards from the problem point (where did the bad data come in?) — skip if error trace already identifies root cause with high confidence
  3. State analysis: check relevant state management cache state (from Project Context) — skip if bug is clearly a syntax/type/null-reference error with no state involvement
  4. Recent changes: check recent changes with git log --oneline -10 -- {related files}skip if bug is clearly pre-existing (user reports it "always" fails)
  5. Race conditions: check for timing issues between async operations — skip if bug is deterministic (same input always fails, no async/concurrent context)

When skipping a step, note: "Skipped: {reason}". Do not skip steps 1 and 2 unless step 1 alone identifies the root cause.

3. Form Hypotheses

List possible causes as a hypothesis list:

### Hypotheses
0. **[Not a Bug?]** {intended behavior explanation}: {evidence from docs/code/spec}
1. **[High probability]** {cause1}: {evidence}
2. **[Medium probability]** {cause2}: {evidence}
3. **[Low probability]** {cause3}: {evidence}

Read the full file on GitHub · 150 lines

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. 4d ago First seen · 150 lines · 21 tokens per session scan B 6989d477126f

Subscribe to this mod's changes

afc:debug is a skill published in the GitHub repository jhlee0409/all-for-claudecode (7 stars, last pushed 5mo ago), licensed MIT. It adds 21 tokens to every session and 1,423 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). 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

issue-triage

Issue triage: audit open issues, categorize, detect duplicates, cross-ref PRs, risk assessment, post comments. Args: "all" for deep analysis of all, issue numbers to focus (e.g. "42 57"), "en"/"fr" for language, no arg = audit only in French.

rtk-ai/rtk · 70 tokens

performance

CLI performance optimization - startup time, memory usage, token savings benchmarking.

rtk-ai/rtk · 13 tokens

build-teaql-app

Build or change a TeaQL application in Java, Rust, Go, Swift, Python, C#/.NET, or TypeScript, including Kotlin/JVM applications that consume Java-generated libraries. Mandatory order: first draft and save a complete KSML model, then verify the client and evaluate that saved model, repair it through repeated evaluation…

teaql/teaql-agent-kit · 112 tokens

moai-kanban-foreman

One unattended kanban foreman iteration: watch the backlog queue, dispatch the next operator-picked card to an isolated worker, collect completion evidence on read (not on claims), and report. This is the body the project's loop.md driver invokes each iteration of a bare /loop; it can also be invoked directly to test…

modu-ai/moai-adk · 76 tokens

moai-ref-ui-polish

UI polish and interface-completion reference: the small visual details — concentric border radius, optical alignment, shadow-vs-border, motion easing, typography smoothing, tabular numbers, icon stroke weight, hit areas — that separate polished interfaces from generic ones. Agent-extending skill that amplifies…

modu-ai/moai-adk · 98 tokens

self-assessment

Interactive skill assessment with personalized learning path generation.

FlorianBruniaux/claude-code-ultimate-guide · 12 tokens