debugging

debugging is a skill for Claude Code, Codex from tamnguyendinh/Anvien. It costs 11 tokens per session (1,658 once invoked), scanned A, original, MIT.

A step-by-step method for fixing software bugs from the first symptom to a verified correction. It requires reproducing the problem, finding its underlying cause, planning the change, and checking the result with new evidence.

In plain words
What is it for?
Reproducing failures, tracing their root causes, planning fixes, adding safeguards, and verifying changes in code repositories.
Why use it?
It reduces guesswork by requiring evidence before a fix and verification before declaring the work complete.

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/tamnguyendinh/anvien/debugging
Any agent
npx skills add tamnguyendinh/Anvien --skill debugging
Clone the repo
git clone --depth 1 https://github.com/tamnguyendinh/Anvien

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 debugging

README.md
[![agentmods](https://agentmods.dev/badge/skills/tamnguyendinh/anvien/debugging.svg)](https://agentmods.dev/skills/tamnguyendinh/anvien/debugging)
Your own site
<a href="https://agentmods.dev/skills/tamnguyendinh/anvien/debugging"><img src="https://agentmods.dev/badge/skills/tamnguyendinh/anvien/debugging.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,658 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.1 $0.00011 $0.01658
Opus 5 $0.00005 $0.00829
Sonnet 5 $0.00002 $0.00332
Haiku 4.5 $0.00001 $0.00166

Measured 5d ago against content hash 9d3abaa21bb0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

debugging 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 5d 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.

internal/aicontext/skills/debugging/SKILL.md · 173 lines

How it starts

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

Debugging With Anvien

Use this skill to debug from symptom to verified fix in repositories where Anvien rules or Anvien evidence apply. The workflow is continuous: capture the failure, reproduce it, locate the owner, trace the root cause, write a plan, check impact, fix the source, add defenses when needed, and verify with fresh evidence.

Iron Laws

  • MUST understand the root cause before fixing.
  • MUST write a plan before fixing.
  • MUST run a full build before testing when active repository rules require it.
  • MUST verify with fresh evidence before claiming completion.
  • MUST follow active repository rules, including Anvien rules when present.

Phase 1: Capture The Symptom

Record the failing command, log, stack trace, screenshot, test, route, input, output, or runtime behavior.

Do not propose a fix yet.

Phase 2: Reproduce

Reproduce the failure consistently.

If the failure is not reproducible, gather more evidence instead of guessing:

  • run the failing command again
  • isolate the input
  • capture logs
  • add temporary diagnostic instrumentation when appropriate
  • compare local, CI, browser, runtime, and environment differences

Phase 3: Locate Candidate Owner

Use source inspection, logs, tests, and repository tools to identify the likely owner.

When active repository rules require Anvien:

  • Run anvien analyze --force before graph-based investigation.
  • Unknown owner: anvien query "<symptom>" --repo <repo>
  • Candidate files: anvien query files "<symptom>" --repo <repo>
  • Suspect file: anvien file-detail <path> --repo <repo> --json
  • Suspect symbol: anvien context symbol "<symbol>" --repo <repo>
  • Ambiguous symbol: anvien context symbol "<symbol>" --file <path> --repo <repo>
  • Route, tool, consumer, or contract behavior: anvien query api, anvien api route-map, anvien api tool-map, anvien api shape-check, or anvien api impact
  • Graph, index, resolution, source-site, or retrieval quality issue: anvien graph-health summary --repo <repo> --json, anvien graph-health files --repo <repo> --json, anvien graph-health explain "File:<path>" --repo <repo> --json, anvien resolution-inventory --graph .anvien/graph.json, anvien source-site-accuracy --graph .anvien/graph.json, or anvien query-health --repo <repo>
  • Stuck analyze, stale MCP server, lock, or runtime process issue: anvien doctor locks --repo <repo> --json or anvien doctor processes --json

Read the full file on GitHub · 173 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. 5d ago First seen · 173 lines · 11 tokens per session scan A 9d3abaa21bb0

Subscribe to this mod's changes

debugging is a skill published in the GitHub repository tamnguyendinh/Anvien (9 stars, last pushed 2d ago), licensed MIT. It adds 11 tokens to every session and 1,658 once invoked, about $0.0001 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

swarm-orchestrate

Optional autonomy control plane — configure, plan, launch, monitor, recover, or stop local CLI-agent workers through SwarmVault's durable supervisor. Use for fit/budget-aware platform + model + reasoning-effort routing; a consistent pre-start/live/boundary/on-demand board with ticket drill-down; TOLD/MEASURED/EST…

AnmarHani/SwarmVault · 109 tokens

swarm-design-deep

The developer-driven design lane — the user commits to each approach before anything is written, then the design goes to pseudocode, algorithms, invariants, sequence diagrams and test vectors in their chosen design language. Use when the user wants to own the system rather than receive it: "developer mode"…

AnmarHani/SwarmVault · 94 tokens

swarm-flow

The SDLC router — figures out where a project stands and runs the right phase. Use at the START of any work in a SwarmVault project: continuing/resuming a project, starting a new one, "what's next", or before writing any feature code, spec, design, or ticket. Also use when unsure which phase (requirements, design…

AnmarHani/SwarmVault · 91 tokens

swarm-design-ui

UI/UX design phase — propose an intentional design system (pattern, brand, color, typography, spacing, atomic components) with the user, offering distinct directions and per-page layout options, for any interface type: Web, Mobile, Desktop, TUI, or CLI. Use when the SRS declares a user interface, when defining a…

AnmarHani/SwarmVault · 90 tokens

swarm-vault

The vault contract — how any agent reads, writes, and queries the SwarmVault. Use at the start of work in any vault-connected project, before exploring the repo, when deciding where to record memory/plans/decisions/sessions, when handing off between sessions or agents, or whenever unsure how the vault works.

AnmarHani/SwarmVault · 70 tokens

swarm-init

Start a new project connected to the SwarmVault — register it, wire platform adapters, offer git init, set vault-as-default. Use when starting a new project, connecting a project to the vault, or when the user asks to set up SwarmVault in a directory.

AnmarHani/SwarmVault · 60 tokens