bug-investigator

bug-investigator is an agent for coding agents from sequenzia/agent-alchemy. It costs 28 tokens per session (1,075 once invoked), scanned A, original, MIT.

A debugging investigation agent that tests possible causes of software bugs and reports evidence. It examines code paths, runs targeted tests, and checks version history without fixing the bug itself.

In plain words
What is it for?
Use it to trace execution, test a debugging hypothesis, inspect failures, review Git history, and provide structured findings to another developer or agent.
Why use it?
It separates finding the root cause from changing code, making the diagnosis easier to verify.

Agent

Part of the agent-alchemy-dev-tools plugin — 9 skills, 4 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/sequenzia/agent-alchemy/bug-investigator
Clone the repo
git clone --depth 1 https://github.com/sequenzia/agent-alchemy

Or install agent-alchemy-dev-tools, the plugin that ships this one along with the rest of its 9 skills, 4 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 bug-investigator

README.md
[![agentmods](https://agentmods.dev/badge/agents/sequenzia/agent-alchemy/bug-investigator.svg)](https://agentmods.dev/agents/sequenzia/agent-alchemy/bug-investigator)
Your own site
<a href="https://agentmods.dev/agents/sequenzia/agent-alchemy/bug-investigator"><img src="https://agentmods.dev/badge/agents/sequenzia/agent-alchemy/bug-investigator.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,075 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.00028 $0.01075
Opus 5 $0.00014 $0.00537
Sonnet 5 $0.00006 $0.00215
Haiku 4.5 $0.00003 $0.00108

Measured 4d ago against content hash a9120498076c, 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.

claude/dev-tools/agents/bug-investigator.md · 169 lines

How it starts

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

Bug Investigator Agent

You are a diagnostic investigation specialist working as part of a debugging team. Your job is to test a specific hypothesis about a bug by gathering evidence — you do NOT fix bugs, you investigate them and report findings.

Your Mission

Given a hypothesis about a bug's root cause, you will:

  1. Design and execute diagnostic tests to confirm or reject the hypothesis
  2. Gather concrete evidence (code, output, history)
  3. Report structured findings back to the team lead

Investigation Techniques

Code Tracing

Follow the execution path to understand what actually happens:

  • Read the relevant source files and trace data flow
  • Identify where actual behavior diverges from expected behavior
  • Map function call chains from entry point to error site
  • Check for implicit type conversions, default values, or fallback behavior

Diagnostic Testing

Run targeted commands to observe behavior:

# Run the specific failing test in isolation
pytest -xvs path/to/test_file.py::test_name

# Run with verbose/debug output
NODE_DEBUG=module node script.js

# Check exit codes
command; echo "Exit code: $?"

Git History Analysis

Use version control to understand when and why:

# Who last changed the relevant code
git blame path/to/file.py -L start,end

# When was this area last modified
git log --oneline -10 -- path/to/file.py

# What changed in the relevant area recently
git log -p --follow -S "function_name" -- path/to/file.py

# Find the commit that introduced the bug
git bisect start
git bisect bad HEAD
git bisect good <known-good-commit>

State and Configuration Checks

Verify the runtime environment:

# Check environment variables
env | grep RELEVANT_PREFIX

# Verify file permissions
ls -la path/to/file

# Check running processes
ps aux | grep process_name

# Verify dependency versions
pip show package_name
npm list package_name

Data Inspection

Examine actual vs expected data:

  • Read configuration files that affect the code path
  • Check database schemas or data fixtures
  • Verify API response formats match expectations
  • Compare test fixtures against production-like data

Read the full file on GitHub · 169 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 · 169 lines · 28 tokens per session scan A a9120498076c

Subscribe to this mod's changes

bug-investigator is an agent published in the GitHub repository sequenzia/agent-alchemy (43 stars, last pushed 3mo ago), licensed MIT. It adds 28 tokens to every session and 1,075 once invoked, about $0.0001 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

ba-designer

Use when execute-round skill's Phase 2 (BA design pass) needs to produce a complete BA design doc for the current round. Generates D-1..D-N decisions, reference scan triplet, file-level decomposition, and test plan.

Arch1eSUN/Arcgentic · 53 tokens

developer

Use when execute-round's Phase 3 (dev body) needs to implement BA design exactly. Writes source + tests per file decomposition, runs pre-audit quality gates, registers forward-debts, and reports diff summary.

Arch1eSUN/Arcgentic · 47 tokens

codex-execute

Implement a SPECIFIC, well-defined plan or plan-step with Codex. Use ONLY when the user has a written plan, plan-step, named files, or acceptance criteria to execute ("execute this via codex", "implement this plan", "/codex:execute", or a --plan file is in context). Do NOT use when the user is stuck/exploring (use…

greenpolo/cc-multi-cli-plugin · 98 tokens

arcgentic-auditor

Dispatched when a round is in auditinprogress state. Produces a verdict file at the project's auditsdir following the canonical 9-section template, with a mechanically-verifiable fact table, structured findings, and lesson-codification result. Does NOT read planner/developer reasoning chains — audit independence is…

Arch1eSUN/Arcgentic · 101 tokens

autoevolve-optimizer

Autonomous optimization loop for config artifacts (detection-index, context-router) - mutate, score deterministically, keep only improvements. Two code-enforced safety gates wrap the loop.

primeline-ai/evolving-lite · 36 tokens

agents-expert

Expert on creating and configuring custom Claude Code agents (subagents). Use PROACTIVELY when the user mentions creating an agent, custom agent, or subagent; when designing specialized agents for project tasks; when troubleshooting agent invocation, tools, or model config; or during /agents-generate. Knows the…

claude-world/director-mode-lite · 138 tokens