atomic-debug

atomic-debug is a skill for Claude Code, Codex from damusix/atomic-claude. It costs 114 tokens per session (1,650 once invoked), scanned A, original, MIT.

A debugging workflow that investigates bugs, crashes, test failures, and unexpected behavior by forming and testing hypotheses. It starts with the exact symptom and tests the cheapest likely explanation first.

In plain words
What is it for?
Use it after an error, regression, failing test, crash, or report that something does not work, especially when the affected code or cause is unclear.
Why use it?
It reduces guesswork and discourages temporary fixes that hide the real cause. The process narrows the failure to its source before proposing a change.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it after an error, regression, failing test, crash, or report that something does not work, especially when the affected code or cause is unclear.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/damusix/atomic-claude/atomic-debug
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.

Any agent
npx skills add damusix/atomic-claude --skill atomic-debug
Clone the repo
git clone --depth 1 https://github.com/damusix/atomic-claude

Made for: Claude Code, Codex.

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 atomic-debug

README.md
[![agentmods](https://agentmods.dev/badge/skills/damusix/atomic-claude/atomic-debug/github.svg)](https://agentmods.dev/skills/damusix/atomic-claude/atomic-debug)
Your own site
<a href="https://agentmods.dev/skills/damusix/atomic-claude/atomic-debug"><img src="https://agentmods.dev/badge/skills/damusix/atomic-claude/atomic-debug/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for atomic-debug

Your own site · 80×15
<a href="https://agentmods.dev/skills/damusix/atomic-claude/atomic-debug"><img src="https://agentmods.dev/badge/skills/damusix/atomic-claude/atomic-debug.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,650 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00114 $0.01650
Opus 5.5 $0.00046 $0.00660
Sonnet 5.5 $0.00023 $0.00330
Haiku 4.5 $0.00011 $0.00165

Measured 14d ago against content hash 68cfeba3abad, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

atomic-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 14d 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.

context/skills/atomic-debug/SKILL.md · 121 lines

How it starts

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

Debug by hypothesis, not by guessing. Cheapest test first. Root cause, not symptom.

Auto-trigger on:

  • Error message or stack trace pasted
  • "broken", "doesn't work", "failing", "crash", "regression", "flaky"
  • Test failure output

Explicit: /atomic-debug or "let's debug X".

Flow

A fix is written only after a test confirms a hypothesis; a refuted one moves to the next open test, and a surprise sends you back to the symptom.

flowchart TD
    S["State the symptom"] --> M{"Surface needs<br/>locating?"}
    M -->|no| H["Hypothesis table"]
    M -->|yes| L["Locate the surface"]
    L --> H
    H --> T["Run the cheapest<br/>open test"]
    T --> O{"Observation?"}
    O -->|confirmed| C["Root cause,<br/>fix at the root"]
    O -->|refuted| N{"Hypothesis left?"}
    N -->|yes| T
    N -->|no| A["Stop, ask for<br/>more context"]
    O -->|surprise| S
  • State the symptom: one sentence. Quote the exact error. Note what changed recently (commit, dep, env) if known.

    Symptom: `POST /users` returns 500 since commit abc1234. Stack: `TypeError: Cannot read 'id' of undefined at users.ts:42`.
    
  • Surface needs locating?: yes when the suspect code is not mapped in the conversation (no file:line references, no recent reads of the relevant module). No when the symptom names the exact file:line (e.g. the stack trace pinpoints it), the bug is in code already in context, or the symptom is too abstract to map (e.g. "the build is slow" — there's no surface yet, hypotheses come first).

  • Locate the surface: code-intel first when an index is present. Try atomic code explore "<symptom as a natural-language query>" for a one-shot digest of the failure neighborhood, or atomic code callers <suspect-fn> when the symptom names a symbol. One shell command is cheaper than spawning an investigator, and it returns caller-graph context grep would have to reconstruct. When the index is absent or the query returns nothing useful, dispatch atomic-investigator before forming the hypothesis table. It is read-only, so it is cheap. Give it a focused brief:

    Locate <symptom-relevant surface>. Report file:line table.
    
    Example: "Locate the request pipeline for POST /users — middleware order, body parsing, auth check. Report file:line table."
    

    Use its file:line — what table as the evidence base for the hypothesis table. The investigator runs in its own context, so the session running this skill keeps its context for the hypothesis work instead of spending it on grep.

  • Hypothesis table: 3-5 candidates ranked by likelihood × cheapness to test, highest (likelihood / cost) first. Don't list more than 5 — if you have more, you're guessing.

    | # | Hypothesis | Likelihood | Test cost | Test |
    |---|-----------|-----------|-----------|------|
    | 1 | req.body missing `user` after middleware reorder | high | 1m | log req.body at line 40 |
    | 2 | DB returns null for new user before commit | med | 5m | run failing test in isolation |
    | 3 | Type widening hides null in TS 5.5 upgrade | low | 10m | revert tsconfig strict change |
    
  • Run the cheapest open test: execute the test for the top hypothesis not yet crossed off. Report the observation, exact and unedited. A refuted hypothesis is crossed off and the table updated.

  • Observation?: a surprise means the mental model is wrong: stop and re-state the symptom.

  • Root cause, fix at the root: write the root cause as a causal chain:

    Root cause: middleware order change (commit abc1234) moved `parseBody` after `requireAuth`,
    so `requireAuth` accesses `req.body.user` before it's populated → `undefined` →
    `.id` throws TypeError.
    

    ASCII flow diagram if the chain has ≥3 hops:

    parseBody (moved after) → requireAuth runs → req.body = {} → req.body.user undefined → .id throws
    

    If the root cause is a shared symbol, run atomic code callers <fn> (when an index is present) to check for other callers that assume the old behavior. A fix that ignores the blast radius leaves related callers broken — list any non-trivial callers in the root-cause statement.

Read the full file on GitHub · 121 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. 14d ago Changed · -4 lines 68cfeba3abad
  2. 3mo ago First seen · 125 lines · 114 tokens per session scan A becc4cd2545a

Subscribe to this mod's changes

atomic-debug is a skill published in the GitHub repository damusix/atomic-claude (117 stars, last pushed yesterday), licensed MIT. It adds 114 tokens to every session and 1,650 once invoked, about $0.0005 per session on Opus 5.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-30.

Related

atomic-debug compared with skills from other repositories

atomic-debug next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
atomic-debugdamusix/atomic-claudeSkill117yesterdayMITA114Claude Code, Codex
sipcode-regressAnuj7411/sipcodeSkill471mo agoMITA105Claude Code
debugSpaceMalamute/ai-rulesSkill29mo agononeA8Claude Code
fix-issueSpaceMalamute/ai-rulesSkill29mo agononeA14Claude Code
stuckQwenLM/qwen-codeSkill31ktodayApache-2.0A57Claude Code
structured-debuggingQwenLM/qwen-codeSkill31ktodayApache-2.0A85Claude Code, Codex
test-failure-explorerQwenLM/qwen-codeSkill31ktodayApache-2.0A32Claude Code, Codex