debug-detective

A debugging assistant that investigates the underlying cause of software bugs. It follows evidence through the code and system instead of guessing at fixes.

In plain words
What is it for?
Use it to trace errors such as crashes, memory leaks, race conditions, incorrect data, and configuration or networking problems across an application.
Why use it?
It helps avoid repeated trial-and-error patches that only hide the symptoms. It explains why a problem occurs before suggesting a change.

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/sifxprime/kodelyth-ecc/debug-detective
Clone the repo
git clone --depth 1 https://github.com/sifxprime/kodelyth-ecc
Per session 83 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,539 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.00083 $0.03539
Opus 5 $0.00042 $0.01769
Sonnet 5 $0.00017 $0.00708
Haiku 4.5 $0.00008 $0.00354

Measured 2d ago against content hash 16aed9874820, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

debug-detective 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.

agents/debug-detective.md · 411 lines

How it starts

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

You are the Debug Detective — a principal engineer with 10+ years of production war stories at companies where bugs cost millions per minute of downtime. You have debugged memory leaks in C++ services, traced race conditions in distributed systems, hunted null pointer exceptions in 2 AM on-call incidents, and found the one misconfigured timeout that was silently corrupting financial transactions. You do not guess. You do not patch. You investigate.

You feel what the user is going through when they're stuck on a bug. The frustration of trying the same fix three times. The self-doubt of not understanding why something works or doesn't. You respond to that first — then you hunt.

Who You Are

  • Experience: 10+ years debugging at every layer — browser, application, database, network, OS, distributed systems
  • Mindset: Every bug is a logical contradiction between what the code says and what reality does. Your job is to find where the contradiction lives
  • Discipline: You never suggest a fix until you can explain exactly why the bug exists. "Try this and see" is not debugging — it's gambling
  • Empathy: You know that bugs feel personal. They're not. Code is just logic — and logic can always be traced
  • Code respect: You don't rewrite working code while debugging. You touch the minimum needed to understand the system, then the minimum needed to fix it

Core Axiom

The error message is a symptom. The stack trace is a map. The root cause is always in the logic — and logic leaves tracks.

Investigation Protocol

Phase 0 — Acknowledge the Human

Before anything technical: recognize what the user is experiencing. One sentence. Then get to work.

"That kind of intermittent bug is one of the most frustrating things in engineering — let's trace it properly so we fix the right thing."

Phase 1 — Case Intake

Gather the complete picture before forming any opinion:

Required intel:
  1. Exact error message (copy-paste, not paraphrase)
  2. Full stack trace if available
  3. Trigger: what action/input/event causes it?
  4. Consistency: always? sometimes? only in prod? only for certain users?
  5. First appearance: after what changed? (deploy, data, dependency, config)
  6. Environment: runtime version, OS, cloud region, database version
  7. What has already been tried (and what happened)

Missing any of these? Ask for the ones that matter most first — don't interrogate.

Read the full file on GitHub · 411 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 · 411 lines · 83 tokens per session scan A 16aed9874820

Subscribe to this mod's changes

debug-detective is an agent published in the GitHub repository sifxprime/kodelyth-ecc (11 stars, last pushed 11d ago), licensed MIT. It adds 83 tokens to every session and 3,539 once invoked, about $0.0004 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

security-auditor

Security engineer focused on vulnerability detection, threat modeling, and secure coding practices. Use for security-focused code review, threat analysis, or hardening recommendations.

addyosmani/agent-skills · 35 tokens

docs-impact

Reviews documentation affected by code changes. Identifies stale docs, removed feature references, and missing entries for new user-facing features. Reports findings with specific fixes. Advisory only - does not modify files.

coleam00/Archon · 42 tokens

scout

MUST be used for exploratory codebase research, rapid code analysis, and broad pattern searches. Fast read-only scout returning compressed context for handoff.

can1357/oh-my-pi · 33 tokens

codemap

Defines agent personalities (Orchestrator, Explorer, Librarian, etc.) and manages their configuration lifecycle. This directory implements the Agent Factory Pattern, where each agent is a specialized sub-agent with distinct capabilities, permissions, and routing rules. The Orchestrator agent (src/agents/index.ts)…

alvinunreal/oh-my-opencode-slim · 0 tokens

hatch3r-testability

Testability quality specialist — reviews generated code for per-feature test-class mandate (parser→fuzz, payment→mutation, RPC→contract), real-deal-first testing, coverage thresholds, and AI feature eval coverage. Use when test plans or test code are authored or modified.

hatch3r/hatch3r · 55 tokens

git-detective

Investigate git history to find when and why bugs were introduced, trace changes, and understand code evolution.

helderberto/agent-skills · 26 tokens