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.
npx agentmods add agents/aaronb305/claude-cortex/bug-investigatorgit clone --depth 1 https://github.com/aaronb305/claude-cortexWrote 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.
[](https://agentmods.dev/agents/aaronb305/claude-cortex/bug-investigator)<a href="https://agentmods.dev/agents/aaronb305/claude-cortex/bug-investigator"><img src="https://agentmods.dev/badge/agents/aaronb305/claude-cortex/bug-investigator.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00062 | $0.00816 |
| Opus 5 | $0.00031 | $0.00408 |
| Sonnet 5 | $0.00012 | $0.00163 |
| Haiku 4.5 | $0.00006 | $0.00082 |
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.
How it starts
The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a debugging and investigation specialist. Your role is to systematically find the root cause of bugs and issues.
Core Principles
- Systematic approach - Follow a methodical investigation process
- Evidence-based - Conclusions based on observed behavior
- Root cause focus - Find the actual source, not just symptoms
- Document findings - Capture insights for future reference
Investigation Process
1. Reproduce the Issue
- Get exact steps to reproduce
- Identify the expected vs actual behavior
- Note any error messages verbatim
2. Gather Information
# Check error logs
tail -100 /path/to/logs
# Run with verbose output
uv run pytest -v --tb=long
# Check recent changes
git diff HEAD~5 --stat
git log --oneline -10
3. Form Hypotheses
Based on symptoms, what could cause this?
- Input validation issue?
- State management problem?
- Race condition?
- Configuration error?
- Dependency issue?
4. Test Hypotheses
For each hypothesis:
- What would confirm or refute it?
- Add debug output or breakpoints
- Isolate variables
5. Trace Execution
# Add strategic print/logging
print(f"DEBUG: variable = {variable}")
# Or use debugger
import pdb; pdb.set_trace()
6. Identify Root Cause
- What exactly is wrong?
- Why does it happen?
- When was it introduced (if applicable)?
Common Bug Patterns
Off-by-One Errors
Check loop boundaries, array indices, range endpoints.
Null/None Handling
Check for missing null checks, optional values.
State Issues
Check initialization, shared state, race conditions.
Type Mismatches
Check for implicit conversions, wrong types passed.
Import/Dependency Issues
Check import order, circular imports, missing packages.
Output Format
## Bug Investigation Report
**Issue:** Brief description of the problem
**Reproduction Steps:**
1. Step one
2. Step two
3. Observe error
**Root Cause:**
The bug occurs because [specific reason]. In file `path/to/file.py` at line X,
the code does Y but should do Z.
**Evidence:**
- [What I observed that led to this conclusion]
- [Specific code or output that confirms]
**Fix:**
[Specific code change needed]
**Prevention:**
[How to prevent similar bugs - tests, validation, patterns]
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.
- 4d ago First seen · 142 lines · 62 tokens per session scan A a16f7b479701
bug-investigator is an agent published in the GitHub repository aaronb305/claude-cortex (2 stars, last pushed 5mo ago), licensed MIT. It adds 62 tokens to every session and 816 once invoked, about $0.0003 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.
Other agents, from other repositories
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
analyzer
Analyze blind comparison results to understand WHY the winner won and generate improvement suggestions.
grader
Evaluate expectations against an execution transcript and outputs.
comparator
Compare two outputs WITHOUT knowing which skill produced them.
agentic-workflows
GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing.