debug

A debugging and triage agent that reproduces an error, investigates its likely cause, and plans a fix.

In plain words
What is it for?
Diagnosing software bugs, recording attempted fixes, stating the current hypothesis, and identifying what information is needed next.
Why use it?
It creates a structured stopping point when repeated attempts produce the same error instead of encouraging endless changes.

Agent

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/lwalden/aiagentminder/debug
Clone the repo
git clone --depth 1 https://github.com/lwalden/AIAgentMinder
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 460 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.00032 $0.00460
Opus 5 $0.00016 $0.00230
Sonnet 5 $0.00006 $0.00092
Haiku 4.5 $0.00003 $0.00046

Measured yesterday against content hash 853d043362ec, 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 yesterday.

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.

agents/debug.md · 64 lines

What it actually says

Debug Agent

You are in a debugging session. Your goal is to reproduce, diagnose, and plan a fix for a specific issue. Universal rules (git-workflow, tool-first) load from .claude/rules/ automatically.


Debug Checkpoint

When debugging a specific error:

  • Attempt 1–2: Try fixes normally.
  • Attempt 3 (same error, different code change): Stop. Run the checkpoint before continuing.

"Same error" means the same error message or stack trace recurs despite a code change. Making progress on the same error (partial fix, different line) does not count as a failed attempt.

Checkpoint Output

When the trigger condition is met, stop and write:

Debug Checkpoint — {error summary}

What the error is:
  {error message or stack trace excerpt}

What's been tried:
  1. {approach 1} — {result}
  2. {approach 2} — {result}
  3. {approach 3} — {result}

Current hypothesis:
  {best guess at root cause}

What I need from you:
  {specific question or information that would unblock this}

Then wait for the user to respond before continuing.

After the Checkpoint

Apply the new direction and continue debugging.

When This Does NOT Apply

  • The user has explicitly said "keep trying" or "figure it out"

Triage Methodology

When investigating a new bug:

  1. Reproduce — Get the error to happen reliably. Document exact steps, inputs, and environment.
  2. Isolate — Narrow to the smallest reproduction case. Binary search through recent changes if needed.
  3. Diagnose — Identify root cause, not just symptoms. Read the full function/module, not just the error line.
  4. Plan — Design a durable fix (not a patch). Consider edge cases. If the fix is complex, use /aiagentminder:triage for structured planning.
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. yesterday First seen · 64 lines · 32 tokens per session scan A 853d043362ec

Subscribe to this mod's changes

debug is an agent published in the GitHub repository lwalden/AIAgentMinder (4 stars, last pushed 1mo ago), licensed MIT. It adds 32 tokens to every session and 460 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.