debug

A systematic guide for diagnosing bugs, error messages, and unexpected software behavior.

In plain words
What is it for?
Use it to analyze an error trace, narrow down one or two possible root causes, and determine the code changes needed to fix the problem.
Why use it?
It helps replace guesswork with a comparison of expected and actual behavior, likely causes, and evidence from the relevant code and logs.

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/dongduong2001/pudo-code-system/debug
Any agent
npx skills add DongDuong2001/pudo-code-system --skill debug
Clone the repo
git clone --depth 1 https://github.com/DongDuong2001/pudo-code-system

Made for: Claude Code, Codex.

Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 462 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.00000 $0.00462
Opus 5 $0.00000 $0.00231
Sonnet 5 $0.00000 $0.00092
Haiku 4.5 $0.00000 $0.00046

Measured 2d ago against content hash 3e08da3bb95d, 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 2d 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.

skills/debug/SKILL.md · 54 lines

How it starts

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

Troubleshooting & Debugging Skill

Skill, Debugging, SRE, Bug Fixing

Context

Use this prompt when you are facing a bug, error trace, or unexpected behavior. This skill forces the AI to act as a troubleshooter, analyzing root causes systematically rather than just guessing solutions.

Variables

  • {{error_message}}: The exact error trace or log output.
  • {{behavior_description}}: What you expected to happen vs what actually happened.
  • {{context_code}}: The snippet of code where the error is occurring.

Prompt

Adopt the persona of a Senior Site Reliability Engineer (SRE) / Troubleshooter. I am encountering a bug and need your help to diagnose and fix it systematically.

Error Message / Stack Trace:
{{error_message}}

Expected vs Actual Behavior:
{{behavior_description}}

Relevant Code Context:
{{context_code}}

Please follow this debugging methodology:
1. **Root Cause Analysis:** Analyze the error and the code to explain exactly *why* this error is happening at a technical level.
2. **Hypotheses:** Provide 1-2 probable reasons if the root cause isn't 100% obvious from the snippet.
3. **The Fix:** Provide the exact code changes required to resolve the issue. 
4. **Regression Prevention:** Briefly explain how this fix ensures the bug won't happen again (e.g., edge case handling).

Do not guess blindly. If you need more information to diagnose the issue accurately, ask for it.

Example Usage

Input:

Adopt the persona of a Senior Site Reliability Engineer (SRE) / Troubleshooter. I am encountering a bug and need your help to diagnose and fix it systematically.

Error Message / Stack Trace:
TypeError: Cannot read properties of undefined (reading 'map') at UserList.tsx:24

Expected vs Actual Behavior:
I expected the list of users to render, but instead the app crashes when the API takes too long to respond.

Relevant Code Context:
const UserList = ({ users }) => {
  return <div>{users.map(u => <span key={u.id}>{u.name}</span>)}</div>
}

Please follow this debugging methodology:
[...rest of prompt...]

Read the full file on GitHub · 54 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 54 lines · 0 tokens per session scan A 3e08da3bb95d

Subscribe to this mod's changes

debug is a skill published in the GitHub repository DongDuong2001/pudo-code-system (5 stars, last pushed 26d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 462 tokens. 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

scale-to-millions

Use this skill whenever the user is designing, reviewing, debugging, or answering interview questions about system/software architecture and scalability — e.g. "scale my app", "how do I handle more traffic", "design a URL shortener / news feed / chat system", "my API is slow under load", "should I shard my database"…

Rudra-narayan-muduli-001/Scale-to-Millions · 130 tokens

conductor-implement

Execute tasks from a track's implementation plan following TDD workflow.

rmyndharis/antigravity-skills · 17 tokens

antigravity-skills-manager

Global skills manager for Google Antigravity. Explore, search, install, and manage 300+ agent skills from the rmyndharis/antigravity-skills catalog using pure stdlib CLI tools.

rmyndharis/antigravity-skills · 49 tokens

backend-development-feature-development

Orchestrate end-to-end backend feature development from requirements to deployment. Use when coordinating multi-phase feature delivery across teams and services.

rmyndharis/antigravity-skills · 31 tokens

architect-review

Master software architect specializing in modern architecture patterns, clean architecture, microservices, event-driven systems, and DDD. Reviews system designs and code changes for architectural integrity, scalability, and maintainability. Use PROACTIVELY for architectural decisions.

rmyndharis/antigravity-skills · 51 tokens

dependabot-review

Analyzes a Dependabot PR to determine what actually changed in each bumped package and whether those changes affect this repo. Reports changed APIs/methods, which doc pages use them, and the realistic probability of any visible impact on the docs site.

cloudflare/cloudflare-docs · 53 tokens