debug-investigator

debug-investigator is an agent for coding agents from yonatangross/orchestkit. It costs 22 tokens per session (3,762 once invoked), scanned B, original, MIT.

A debugging assistant that investigates software bugs by tracing how code runs and examining logs and stack traces. A stack trace is a record of the function calls that led to an error.

In plain words
What is it for?
Use it to analyse errors, follow execution paths, investigate crashes, inspect logs and stack traces, and identify the verified root cause of a bug.
Why use it?
It helps separate the visible symptom from the actual cause before suggesting a fix. Its conclusions are based on the supplied code and error evidence rather than guesses.

Agent

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the ork plugin — 35 commands, 15 agents shipped together

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/yonatangross/orchestkit/debug-investigator
Clone the repo
git clone --depth 1 https://github.com/yonatangross/orchestkit

Or install ork, the plugin that ships this one along with the rest of its 35 commands, 15 agents.

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-investigator

README.md
[![agentmods](https://agentmods.dev/badge/agents/yonatangross/orchestkit/debug-investigator.svg)](https://agentmods.dev/agents/yonatangross/orchestkit/debug-investigator)
Your own site
<a href="https://agentmods.dev/agents/yonatangross/orchestkit/debug-investigator"><img src="https://agentmods.dev/badge/agents/yonatangross/orchestkit/debug-investigator.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 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,762 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 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.00022 $0.03762
Opus 5 $0.00011 $0.01881
Sonnet 5 $0.00004 $0.00752
Haiku 4.5 $0.00002 $0.00376

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

Security

Grade B, and why

debug-investigator scanned grade B with 2 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 4d 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.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

curl -X POST https://api.localhost/api/v1/analyses -d '{"url": "https://example.com"}'

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -X POST https://api.localhost/api/v1/analyses -d '{"url": "https://example.com"}'
plugins/ork/agents/debug-investigator.md · 389 lines

How it starts

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

Directive

Perform systematic root cause analysis on bugs using scientific method. Trace execution paths, analyze logs, and isolate the exact cause before recommending fixes.

Use local memory to track findings within the current session. Do not persist sensitive security findings to shared project memory. <investigate_before_answering> Read error messages, stack traces, and relevant code before forming hypotheses. Do not speculate about causes you haven't verified with evidence. Ground all findings in actual log output and code inspection. </investigate_before_answering>

Grounding Protocol (ground before you diagnose a root cause)

Diagnose AGAINST retrieved evidence, not recall alone. A controlled A/B (OrchestKit, 2026-06) showed an ungrounded reviewer missed subtle, knowledge-dependent issues — symptom-vs-cause confusion, a race condition, a heisenbug, an off-by-one in retry/backoff, a swallowed exception — that a grounded reviewer caught (subtle recall 2/4 → 4/4 on a cheap model, control-validated; Δ0 on Opus). This agent runs on a cheaper tier (model: sonnet), so grounding pays. Before classifying any root cause:

  1. Current debugging practice & known failure modesWebSearch/WebFetch (if available) for documented bugs, gotchas, and failure modes of the specific stack and pinned versions actually in scope (read the lockfile/manifest first). Version-specific footguns — a known off-by-one in a retry library, a documented race in a runtime's scheduler — are exactly the kind of cause recall alone misses.
  2. Library-specific gotchascontext7 (if configured) for official docs on the libraries in the failing path. Cite what you retrieve.
  3. The actual code + logs — read them; never speculate. Ground every hypothesis result in a real file:line, log timestamp, or command output. Be source-agnostic and degrade gracefully: treat every external source as optional ("if available/configured"), assume no fixed CLI or library path. If NO external source is reachable, proceed on your existing skills and the methodology below — but say so explicitly and do not claim currency (version/CVE accuracy, "latest known issue") you could not verify. Cite retrieved evidence (doc IDs, library versions, CVE numbers) in the investigation report.

Read the full file on GitHub · 389 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. 4d ago First seen · 389 lines · 22 tokens per session scan B 58bd8ea0c3d9

Subscribe to this mod's changes

debug-investigator is an agent published in the GitHub repository yonatangross/orchestkit (225 stars, last pushed today), licensed MIT. It adds 22 tokens to every session and 3,762 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 2 findings (sends data to an external url, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.