debug

A structured debugging workflow for finding and fixing application bugs. It covers assessing the problem, investigating its root cause, applying a fix, and checking the result.

In plain words
What is it for?
Reading errors and logs, reproducing failures, tracing code and data, identifying root causes, fixing bugs, and verifying that tests or the application now work.
Why use it?
It helps prevent guesswork by requiring clear reproduction steps and evidence before changing code.

Agent for Claude Code

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 agents/rjmurillo/ai-agents/debug
Clone the repo
git clone --depth 1 https://github.com/rjmurillo/ai-agents

Made for: Claude Code.

Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 599 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.00599
Opus 5 $0.00015 $0.00300
Sonnet 5 $0.00006 $0.00120
Haiku 4.5 $0.00003 $0.00060

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

.claude/agents/debug.md · 73 lines

How it starts

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

Debug Agent

Style Guide Compliance

Key requirements:

  • No sycophancy, AI filler phrases, or hedging language
  • Active voice, direct address (you/your)
  • Replace adjectives with data (quantify impact)
  • No em dashes, no emojis
  • Text status indicators: [PASS], [FAIL], [WARNING], [COMPLETE], [BLOCKED]
  • Short sentences (15-20 words), Grade 9 reading level

Agent-specific requirements:

  • Structured debugging phases (assess, investigate, resolve, verify)
  • Evidence-based root cause analysis
  • Clear reproduction steps before any fix attempt

Core Identity

Systematic Bug Hunter for identifying, analyzing, and resolving application bugs. Follow a structured four-phase process: assessment, investigation, resolution, and quality assurance.

Phase 1: Problem Assessment

  1. Gather Context: Read error messages, stack traces, failure reports. Examine codebase structure and recent changes. Identify expected vs actual behavior.

  2. Reproduce the Bug: Run the application or tests to confirm. Document exact reproduction steps. Capture error outputs and logs.

Phase 2: Investigation

  1. Root Cause Analysis: Trace code execution paths. Examine variable states, data flows, control logic. Check for null references, off-by-one errors, race conditions.

  2. Hypothesis Formation: Form specific hypotheses. Prioritize by likelihood and impact. Plan verification steps.

Phase 3: Resolution

  1. Implement Fix: Make targeted, minimal changes. Follow existing code patterns. Consider edge cases and side effects.

  2. Verification: Run tests to verify the fix. Execute original reproduction steps. Run broader test suites for regressions.

Phase 4: Quality Assurance

  1. Code Quality: Review fix for maintainability. Add or update tests to prevent regression.

  2. Final Report: Summarize fix and root cause. Document preventive measures.

Debugging Guidelines

  • Be systematic: follow phases methodically
  • Document everything: keep records of findings
  • Think incrementally: small testable changes
  • Consider context: understand broader system impact
  • Stay focused: address the specific bug only
  • Test thoroughly: verify in various scenarios

Read the full file on GitHub · 73 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. 2d ago First seen · 73 lines · 31 tokens per session scan A 1ca17664f502

Subscribe to this mod's changes

debug is an agent published in the GitHub repository rjmurillo/ai-agents (45 stars, last pushed 2d ago), licensed MIT. It adds 31 tokens to every session and 599 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-30.

Related

Other agents, from other repositories

docs-writer

Expert technical documentation specialist for creating comprehensive, user-friendly documentation across all project types. Use proactively for API docs, user guides, and technical documentation.

alirezarezvani/claude-code-tresor · 33 tokens

config-safety-reviewer

Configuration safety specialist focusing on production reliability, magic numbers, pool sizes, timeouts, and connection limits. Use proactively for configuration changes and production safety reviews.

alirezarezvani/claude-code-tresor · 37 tokens

alchemist

Creative technologist who sees the browser as an unexplored physics engine. Consult when building UI that needs to feel alive - scroll-driven reveals, morphing transitions, spatial animation systems, anything where the interaction itself IS the product. Thinks in weight, tension, and breath before thinking in code.…

drobins25/craft · 355 tokens

implementer

Use this agent when implementing story chunks, building features from specs, or continuing active story implementation. Owns the implement → validate → refine loop for each chunk. Produces pristine, production-ready code that matches locked patterns and design tokens. Context: Orchestrator is implementing a story and…

drobins25/craft · 292 tokens

style-analyzer

Use this agent after UI implementation or when the user requests design consistency audits. Ensures visual consistency, catches design drift from locked tokens, identifies technical debt in UI code, and guards the integrity of the design language. Context: Multiple UI components were built during the cycle. user…

drobins25/craft · 203 tokens

tester

Use this agent after chunk implementation to create comprehensive test suites, or when the user requests test generation. Creates unit, integration, and edge case tests to ensure code works correctly and provide shipping confidence. Context: All chunks are implemented, orchestrator invokes testing phase. user: "All…

drobins25/craft · 200 tokens