bug-investigator

bug-investigator is a skill for Claude Code, Codex from GrishaAngelovGH/gemini-cli-agent-skills. It costs 46 tokens per session (643 once invoked), scanned A, original, MIT.

A troubleshooting guide for finding the cause of software bugs, proving them with tests, and checking that fixes do not break anything else.

In plain words
What is it for?
Use it to reproduce failures, trace data through a codebase, write failing tests, identify root causes, and verify bug fixes.
Why use it?
It turns vague reports and unexpected behavior into a repeatable investigation with evidence for the fix.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to reproduce failures, trace data through a codebase, write failing tests, identify root causes, and verify bug fixes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/grishaangelovgh/gemini-cli-agent-skills/bug-investigator
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.

Any agent
npx skills add GrishaAngelovGH/gemini-cli-agent-skills --skill bug-investigator
Clone the repo
git clone --depth 1 https://github.com/GrishaAngelovGH/gemini-cli-agent-skills

Made for: Claude Code, Codex.

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/skills/grishaangelovgh/gemini-cli-agent-skills/bug-investigator/github.svg)](https://agentmods.dev/skills/grishaangelovgh/gemini-cli-agent-skills/bug-investigator)
Your own site
<a href="https://agentmods.dev/skills/grishaangelovgh/gemini-cli-agent-skills/bug-investigator"><img src="https://agentmods.dev/badge/skills/grishaangelovgh/gemini-cli-agent-skills/bug-investigator/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bug-investigator

Your own site · 80×15
<a href="https://agentmods.dev/skills/grishaangelovgh/gemini-cli-agent-skills/bug-investigator"><img src="https://agentmods.dev/badge/skills/grishaangelovgh/gemini-cli-agent-skills/bug-investigator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 643 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00046 $0.00643
Opus 5 $0.00023 $0.00321
Sonnet 5 $0.00009 $0.00129
Haiku 4.5 $0.00005 $0.00064

Measured 12d ago against content hash cded9563818e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, 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 12d 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.

bug-investigator/SKILL.md · 41 lines

How it starts

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

Bug Investigation & Resolution Protocol

You are now operating as an Expert Bug Investigator. Your goal is to move from a vague symptom to a verified fix using a rigorous, scientific approach.

1. Symptom Analysis & Information Gathering

  • Identify the "What": What is the observed behavior? What is the expected behavior?
  • Identify the "Where": Which components, services, or files are involved?
  • Trace the Data: Follow the flow of data leading up to the failure. Use grep or search_file_content to find where relevant variables or error messages are defined.

2. Reproduction (The Golden Rule)

  • NEVER attempt a fix without a reproduction case.
  • Create a Minimal Reproduction: Try to isolate the bug in a small, standalone script or a new test case.
  • Automate the Failure: Write a failing unit or integration test that demonstrates the bug. This ensures the bug is real and provides a way to verify the fix later.
  • Technology-Specific Testing:
    • React: Use React Testing Library to simulate user interactions.
    • Java: Use JUnit/Mockito for unit tests.
    • Python: Use pytest or unittest.
    • Node.js: Use jest or mocha.

3. Root Cause Analysis (RCA)

  • Consult the Checklist: Read references/checklist.md to quickly rule out common pitfalls like race conditions, memory leaks, or configuration errors.
  • The "5 Whys": Ask why the failure occurred, then why that happened, until you reach the fundamental flaw.
  • Check Boundary Conditions: Look for nulls, empty arrays, off-by-one errors, or unexpected types.
  • State Analysis: Examine the state of the application at the moment of failure. Use logging or debug statements if necessary.
  • Review Recent Changes: Use git log or check recent modifications in the affected files to see if a recent change introduced the regression.

4. Implementation & Verification

  • Apply the Fix: Make the most targeted, minimal change necessary to resolve the root cause.
  • Verify the Fix: Run the reproduction test created in Step 2. It should now pass.
  • Check for Regressions: Run the full test suite (or at least all tests in the affected module) to ensure no other functionality was broken.
  • Refactor (Optional): If the fix revealed a deeper architectural flaw, consider a clean refactor now that you have tests protecting the logic.

Read the full file on GitHub · 41 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago First seen · 41 lines · 46 tokens per session scan A cded9563818e

Subscribe to this mod's changes

bug-investigator is a skill published in the GitHub repository GrishaAngelovGH/gemini-cli-agent-skills (16 stars, last pushed 6mo ago), licensed MIT. It adds 46 tokens to every session and 643 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-30.