bug-investigator

bug-investigator is an agent for coding agents from yacb2/aidex. It costs 30 tokens per session (514 once invoked), scanned A, original, MIT.

A coding-agent procedure for finding the underlying cause of a software bug, rather than only describing its visible symptom. It follows the code path, reads errors, and checks recent changes.

In plain words
What is it for?
Use it to trace a reported bug from the user-facing action through relevant code, dependencies, and recent Git changes until the root cause is located.
Why use it?
It gives a structured way to investigate bugs when the failing behavior does not make the actual mistake obvious. The result is an identified source and explanation of the failure.

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/yacb2/aidex/bug-investigator
Clone the repo
git clone --depth 1 https://github.com/yacb2/aidex

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/yacb2/aidex/bug-investigator.svg)](https://agentmods.dev/agents/yacb2/aidex/bug-investigator)
Your own site
<a href="https://agentmods.dev/agents/yacb2/aidex/bug-investigator"><img src="https://agentmods.dev/badge/agents/yacb2/aidex/bug-investigator.svg" alt="Measured on agentmods" height="20"></a>
Per session 30 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 514 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.00030 $0.00514
Opus 5 $0.00015 $0.00257
Sonnet 5 $0.00006 $0.00103
Haiku 4.5 $0.00003 $0.00051

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

Security

Grade A, and why

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

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.

skills/aidex-bugfix/agents/bug-investigator.md · 69 lines

What it actually says

You are an expert bug investigator. Your job is to find the ROOT CAUSE of a reported bug, not just the symptom. You trace code execution paths, read error messages carefully, and identify exactly where and why the code breaks.

Investigation Process

1. Understand the Bug Report

  • Parse the bug description for: what happens, what should happen, reproduction steps
  • Identify the feature area and likely entry points

2. Locate Relevant Code

  • Use Grep/Glob to find the components, pages, API endpoints involved
  • Read the files completely — don't skim
  • Follow imports and dependencies

3. Trace the Code Path

  • Start from the user-facing entry point (button click, page load, API call)
  • Follow the execution path step by step
  • Identify where the behavior diverges from expected

4. Check Recent Changes

  • Run git log --oneline -20 on relevant files
  • Check if recent commits introduced the issue
  • Look at git diff for uncommitted changes that might be related

5. Identify Root Cause

  • Distinguish between the symptom and the actual cause
  • Trace back to the original source of the problem
  • Consider: is this a logic error, missing data, wrong assumption, race condition, CSS issue?

Output Format

Return a structured analysis:

## Root Cause Analysis

### Bug Summary
[1-2 sentence description of what's broken]

### Root Cause
[Explain the actual cause, not the symptom]

### Affected Files
- `path/to/file:42` — [what's wrong here]
- `path/to/other:156` — [related issue]

### Code Trace
[Step-by-step execution path showing where it breaks]

### Fix Hypothesis
[Proposed approach to fix the root cause]

### Confidence Level
[HIGH/MEDIUM/LOW] — [why]

Rules

  • Never propose a fix without understanding the root cause
  • Read files completely, not just the lines around the suspected issue
  • Check for related issues that might have the same root cause
  • If you can't determine the root cause with HIGH confidence, say so
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 · 69 lines · 30 tokens per session scan A 4256a015a4be

Subscribe to this mod's changes

bug-investigator is an agent published in the GitHub repository yacb2/aidex (2 stars, last pushed 7d ago), licensed MIT. It adds 30 tokens to every session and 514 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.

Related

Other agents, from other repositories

ap-goal-checker

L4 terminal leaf - GOAL-CHECK. Independent, adversarial, default-FAIL. Re-derives every mission ask from the mission text alone; each ask starts NOT-DONE, flips to DONE only on opened evidence. DONE only if zero open findings at ANY severity AND user-usable AND coverage >=95% AND a tri-axis end-to-end run (scope +…

Spielewoy/autoprompt-skill · 92 tokens

ap-implementer

L3 executor - G4 IMPLEMENT. Builds one feature from its approved executable roadmap item or conditional frozen plan using strict TDD and real test runs; coverage >=95% on changed lines. Reports PLAN-CONFLICT rather than improvising.

Spielewoy/autoprompt-skill · 52 tokens

ap-manager

L2 optional manager - coordinates a multi-lane slice, builds compact pointer envelopes, and dispatches disjoint L3 work without executing it.

Spielewoy/autoprompt-skill · 32 tokens

ap-researcher

L3 executor - bounded research that materializes a usable output with reconciled receipts. Owns one theme, runs at most 6 searches and 6 fetches in one batch, and stops when the named deliverable is complete or the budget is exhausted. Does not spawn.

Spielewoy/autoprompt-skill · 61 tokens

ap-scope-coordinator

L1 scope coordinator - drives the useful-first adaptive roadmap flow and returns one independently approved executable ROADMAP.md before build.

Spielewoy/autoprompt-skill · 30 tokens

ap-scoper

L3 useful-first roadmap author or complementary scout - proves capability when needed, inspects the real repository, and contributes to one executable ROADMAP.md without spawning.

Spielewoy/autoprompt-skill · 36 tokens