investigate-bug

A bug-investigation workflow that traces a reported problem to its likely root cause and writes a test-driven fix plan. TDD, or test-driven development, means defining a failing test before implementing the fix.

In plain words
What is it for?
Use it to triage an issue, assess its security impact, analyze the relevant code and history, and save a TDD-based plan under specs/bugs/BUG-*.md.
Why use it?
It separates diagnosis from coding and preserves the reasoning behind the proposed change. It also checks previous bug records to identify recurrences or related problems.

Skill for Claude CodeCodex

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 skills/danielvm-git/bigpowers/investigate-bug
Any agent
npx skills add danielvm-git/bigpowers --skill investigate-bug
Clone the repo
git clone --depth 1 https://github.com/danielvm-git/bigpowers

Made for: Claude Code, Codex.

Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,252 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.00064 $0.01252
Opus 5 $0.00032 $0.00626
Sonnet 5 $0.00013 $0.00250
Haiku 4.5 $0.00006 $0.00125

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

Security

Grade A, and why

investigate-bug 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 2d 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.

.cline/skills/investigate-bug/SKILL.md · 128 lines

How it starts

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

Investigate Bug

Boundary: End-to-end bug entry point — history check → RCA (via diagnose-root) → fix approach → TDD plan → bug file. Delegates the 4-phase RCA to diagnose-root; does not re-implement it.

Investigate a reported problem, find its root cause, and write a TDD fix plan to specs/bugs/BUG-*.md. This is a mostly hands-off workflow — minimize questions to the user.

Process

0. Read previous bug history

Before starting diagnosis:

  1. Read specs/bugs/registry.yaml (if it exists) — check for prior bugs in the same scope or with similar symptoms.
  2. If a relevant prior bug is found, read the corresponding specs/bugs/BUG-*.md file to understand previous root cause analysis and fix approach.
  3. Note in your investigation whether this is a recurrence, a related issue, or novel.

1. Capture the problem

Get a brief description of the issue from the user. If they haven't provided one, ask ONE question: "What's the problem you're seeing?"

Do NOT ask follow-up questions yet. Start investigating immediately.

Security-impact assessment — After capturing the problem, assess and document: Security impact: NONE / LOW / MEDIUM / HIGH / CRITICAL. If HIGH or CRITICAL, assign bug severity HIGH and document the exploit path in findings. If MEDIUM+, include exploit path in the bug file. Document "no security exploit path identified" for NONE/LOW.

2. Explore and diagnose (4-phase RCA)

Run the 4-phase root-cause analysis via the diagnose-root skill (Reproduce → Isolate → Hypothesize → Verify). That skill is the canonical RCA engine — do not re-implement the phases here.

Also look at:

  • Recent changes to affected files (git log --oneline <file>)
  • Existing tests (what's tested, what's missing)
  • Similar patterns elsewhere in the codebase that work correctly

HARD GATE — Do NOT proceed to Step 3 (Fix Approach) until diagnose-root Phase 4 produces a verified root cause. "It probably is X" is not verified.

3. Identify the fix approach

Read the full file on GitHub · 128 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. 2d ago First seen · 128 lines · 64 tokens per session scan A 5354cd9022a8

Subscribe to this mod's changes

investigate-bug is a skill published in the GitHub repository danielvm-git/bigpowers (156 stars, last pushed 26d ago), licensed MIT. It adds 64 tokens to every session and 1,252 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-30.