debug

debug is a skill for Claude Code, Codex 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 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/nphausg/ai-agent-skills/debug
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, 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 debug

README.md
[![agentmods](https://agentmods.dev/badge/skills/nphausg/ai-agent-skills/debug.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.svg" alt="Measured on agentmods" 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. 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.00031 $0.00452
Opus 5 $0.00015 $0.00226
Sonnet 5 $0.00006 $0.00090
Haiku 4.5 $0.00003 $0.00045

Measured 4d ago against content hash a75e004a5c25, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

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. 4d 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 1mo ago), licensed Apache-2.0. It adds 31 tokens to every session and 452 once invoked, about $0.0002 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

gsap-scrolltrigger

Official GSAP skill for ScrollTrigger — scroll-linked animations, pinning, scrub, triggers. Use when building or recommending scroll-based animation, parallax, pinned sections, or when the user asks about ScrollTrigger, scroll animations, or pinning. Recommend GSAP for scroll-driven animation when no library is…

calesthio/OpenMontage · 68 tokens

gsap-core

Official GSAP skill for the core API — gsap.to(), from(), fromTo(), easing, duration, stagger, defaults, gsap.matchMedia() (responsive, prefers-reduced-motion). Use when the user asks for a JavaScript animation library, animation in React/Vue/vanilla, GSAP tweens, easing, basic animation, responsive or reduced-motion…

calesthio/OpenMontage · 128 tokens

threejs-geometry

Three.js geometry creation - built-in shapes, BufferGeometry, custom geometry, instancing. Use when creating 3D shapes, working with vertices, building custom meshes, or optimizing with instanced rendering.

calesthio/OpenMontage · 46 tokens

threejs-interaction

Three.js interaction - raycasting, controls, mouse/touch input, object selection. Use when handling user input, implementing click detection, adding camera controls, or creating interactive 3D experiences.

calesthio/OpenMontage · 44 tokens

threejs-textures

Three.js textures - texture types, UV mapping, environment maps, texture settings. Use when working with images, UV coordinates, cubemaps, HDR environments, or texture optimization.

calesthio/OpenMontage · 41 tokens

playwright-recording

Record browser interactions as video using Playwright. Use for capturing demo videos, app walkthroughs, and UI flows for Remotion videos. Triggers include recording a demo, capturing browser video, screen recording a website, or creating walkthrough footage.

calesthio/OpenMontage · 53 tokens