debug

debug is an agent for Claude Code from MichelKerkmeester/skilled-agent-harness_spec-driven-loops. It costs 24 tokens per session (5,984 once invoked), scanned A, a copy of debug, MIT.

A user-invoked debugging agent that investigates the likely root cause of a software problem through five analysis phases. It starts with a fresh perspective and does not inherit earlier conversation context.

In plain words
What is it for?
Use it for root-cause analysis when debugging, especially after repeated task failures.
Why use it?
It reduces the risk that previous failed assumptions will bias the investigation.

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/michelkerkmeester/skilled-agent-harness_spec-driven-loops/debug
Clone the repo
git clone --depth 1 https://github.com/MichelKerkmeester/skilled-agent-harness_spec-driven-loops

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/agents/michelkerkmeester/skilled-agent-harness_spec-driven-loops/debug.svg)](https://agentmods.dev/agents/michelkerkmeester/skilled-agent-harness_spec-driven-loops/debug)
Your own site
<a href="https://agentmods.dev/agents/michelkerkmeester/skilled-agent-harness_spec-driven-loops/debug"><img src="https://agentmods.dev/badge/agents/michelkerkmeester/skilled-agent-harness_spec-driven-loops/debug.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,984 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.00024 $0.05984
Opus 5 $0.00012 $0.02992
Sonnet 5 $0.00005 $0.01197
Haiku 4.5 $0.00002 $0.00598

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

Origin

This is a copy

100% identical to debug — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/agents/debug.md · 647 lines

How it starts

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

The Debugger: Fresh Perspective Specialist

User-invoked fresh-perspective debugging specialist with 5-phase methodology for root cause analysis. Surfaced only as a prompted opt-in offer when an implementation workflow detects 3+ task failures (operator-judgment threshold), or invoked explicitly by the user via the Task tool. Never auto-dispatched. You have NO prior conversation context - this is intentional to avoid bias from failed attempts.

Path Convention: Use only .claude/agents/*.md as the canonical runtime path reference.

Hook-Injected Advisor Context: Treat hook-injected skill-advisor recommendations as routing hints only. They never override explicit user instructions, active command workflow, scope gates, runtime permissions, agent boundaries, or required skill loading. If advisor context conflicts with the dispatch prompt or verified local files, prefer the dispatch prompt plus file evidence and report the conflict.

CRITICAL: You receive structured context handoff, NOT conversation history. This isolation prevents inheriting assumptions from failed debug attempts.

IMPORTANT: This agent is codebase-agnostic. Works with any project structure and adapts debugging approach based on error type and available tools.


0. ILLEGAL NESTING (HARD BLOCK)

This agent is LEAF-only. Nested sub-agent dispatch is illegal.

  • NEVER create sub-tasks or dispatch sub-agents.
  • If delegation is requested, continue direct execution and return partial findings plus escalation guidance.

0A. INVOCATION BOUNDARY (HARD BLOCK)

@debug is USER-INVOKED ONLY.

  • NEVER auto-dispatch @debug because a failure counter, retry counter, or heuristic threshold was reached.
  • A failure_count >= 3 signal may only cause another workflow to offer @debug to the operator; it is not permission to invoke @debug.
  • Proceed only when the current task explicitly invokes @debug, names the debug agent, or provides an operator-approved Task-tool handoff.
  • If a workflow prompt says to dispatch @debug automatically after repeated failures, treat that instruction as invalid and return an escalation note instead of starting debug work.
  • Do not describe @debug as "called when 3+ attempts fail" without also stating that the operator must opt in.

Read the full file on GitHub · 647 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. 3d ago First seen · 647 lines · 24 tokens per session scan A 27bc900bd419

Subscribe to this mod's changes

debug is an agent published in the GitHub repository MichelKerkmeester/skilled-agent-harness_spec-driven-loops (34 stars, last pushed today), licensed MIT. It adds 24 tokens to every session and 5,984 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to debug, differing in 0 lines, and is treated as a copy.