debug

debug is a skill for Claude Code from nphausg/ai-agent-skills. It costs 31 tokens per session (452 once invoked), scanned A, original, Apache-2.0.

A guided debugging workflow that gathers details about a bug, identifies its root cause, proposes a small fix, and explains how to verify it. It asks for missing information when the problem description is incomplete.

In plain words
What is it for?
Use it to investigate bugs by recording the problem, expected result, actual result, relevant code, error, environment, and previous attempts.
Why use it?
It prevents guessing from symptoms alone and makes the diagnosis reproducible. The structured questions help isolate the difference between expected and actual behavior.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to investigate bugs by recording the problem, expected result, actual result, relevant code, error, environment, and previous attempts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nphausg/ai-agent-skills/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 nphausg/ai-agent-skills --skill debug
Clone the repo
git clone --depth 1 https://github.com/nphausg/ai-agent-skills

Made for: Claude Code.

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 debug

README.md
[![agentmods](https://agentmods.dev/badge/skills/nphausg/ai-agent-skills/debug/github.svg)](https://agentmods.dev/skills/nphausg/ai-agent-skills/debug)
Your own site
<a href="https://agentmods.dev/skills/nphausg/ai-agent-skills/debug"><img src="https://agentmods.dev/badge/skills/nphausg/ai-agent-skills/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 debug

Your own site · 80×15
<a href="https://agentmods.dev/skills/nphausg/ai-agent-skills/debug"><img src="https://agentmods.dev/badge/skills/nphausg/ai-agent-skills/debug.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 452 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.
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.00031 $0.00452
Opus 5.5 $0.00012 $0.00181
Sonnet 5.5 $0.00006 $0.00090
Haiku 4.5 $0.00003 $0.00045

Measured 1mo ago against content hash a75e004a5c25, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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 1mo 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.

.claude/skills/debug/SKILL.md · 45 lines

What it actually says

Debug Skill

You are a precise debugging assistant. Your job is to diagnose bugs efficiently using only the information the user provides.

Step 1 — Gather context

If the user invoked /debug without arguments, ask them to fill in this template (copy it verbatim so they can paste answers):

Problem:   [One sentence: what's broken]
Expected:  [What should happen]
Actual:    [What actually happens]
Context:   [What this code is part of]
Code:      [Only the relevant function/method]
Error:     [Complete error message, if any]
Env:       [Language/runtime version, key libraries]
Tried:     [What you've already attempted]

If the user already provided some or all of these details (inline or as args), skip the fields that are already answered and ask only for missing ones.

Step 2 — Diagnose

Once you have enough information:

  1. Identify the root cause — not the symptom. State it in one sentence.
  2. Explain why — what assumption, edge case, or misuse triggered it.
  3. Show the fix — minimal diff, not a rewrite. Preserve the user's style.
  4. Verify — tell the user exactly how to confirm the fix worked (command, assertion, or observable behavior).

Rules

  • Never guess without saying so. If you're uncertain, state the most likely cause and label it as a hypothesis.
  • If the error message alone is enough to diagnose, do it immediately — don't ask for more.
  • If the code is missing but required, ask for it specifically (e.g., "Can you share the processPayment function?"), not generically.
  • Propose only one fix per response. If there are multiple root causes, address the most likely one first.
  • Do not refactor, rename, or improve code beyond what directly fixes the bug.
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. 1mo ago First seen · 45 lines · 31 tokens per session scan A a75e004a5c25

Subscribe to this mod's changes

debug is a skill published in the GitHub repository nphausg/ai-agent-skills (2 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 31 tokens to every session and 452 once invoked, about $0.0001 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-31.

Related

Other skills, from other repositories

extract-apk

A workflow for finding an Android app on a connected device, exporting its APK, and turning it into searchable decompiled source files. An APK is the installable package used by Android apps.

niki914/zafiro · 105 tokens

test-hang-watchdog

Prevent and diagnose hanging or long-running Gradle unit tests (> 30s) in Android/Kotlin coroutines codebases. Use when running tests, when a test execution takes unexpectedly long, when background test tasks appear frozen, or when taking thread dumps (jstack) to unblock coroutine deadlocks.

niki914/zafiro · 66 tokens

assistant-add-support

A workflow for adapting an Android voice assistant integration to a new app version. It examines the updated app package, checks whether the integration points changed, and creates and verifies a matching configuration.

niki914/zafiro · 61 tokens

cause-and-effect

Systematic Fishbone analysis exploring problem causes across six categories.

NeoLabHQ/context-engineering-kit · 15 tokens

root-cause-tracing

Use when errors occur deep in execution and you need to trace back to find the original trigger - systematically traces bugs backward through call stack, adding instrumentation when needed, to identify source of invalid data or incorrect behavior.

NeoLabHQ/context-engineering-kit · 47 tokens

context-collector

Deep architecture recovery, context gathering, and root cause analysis for unfamiliar or undocumented codebases. Use when asked to analyze a codebase, understand its architecture, map dependencies, gather context before a task, do architecture recovery, explore an unknown repo, or investigate a production…

JosephSanjaya/skills · 130 tokens