investigate-bug — Claude Code skill for bug investigation
investigate-bug — a skill for Claude Code that gathers evidence and traces a bug to its cause before a fix is written. It starts on bug reports, incidents, customer complaints, or requests to reproduce an issue.
AGPL-3.0 ★ 1,120 updated 2026-11-16
npx skills add rerun-build/rerun --skill investigate-bug -a claude-codeWhat investigate-bug does
The skill reviews a bug report, checks whether the issue was already fixed, gathers logs and records, then tries to reproduce it and trace the faulty code path. Its report covers the symptoms, earlier fixes, reproduction steps, and a proposed minimal patch. The same findings are saved to .context/bugs/<slug>/report.md.
It searches Git history, pull requests, Notion cards, and data from PostHog, Dokploy, Trigger.dev, and Supabase. Local reproduction uses pnpm db:start and pnpm cloud env:local. Production and staging are read-only: the skill does not restart services or alter data. If the investigation points to a vulnerability, it switches to the security-fix skill.
What it helps with
- check whether a bug already has a fix
- collect logs and records related to an incident
- reproduce an issue on the local stack
- trace symptoms to a specific code line
- write an investigation report with a minimal patch
Example prompts for the agent
- Investigate why opening the project triggers an error and collect evidence.
- Check this customer complaint, search for related bugs, and try to reproduce it.
- Find the incident's root cause and save a report under
.context/bugs/.
How to install investigate-bug
1Skills CLI (Vercel)
npx skills add rerun-build/rerun --skill investigate-bug -a claude-code2Manually: put the files in place
~/.claude/skills/investigate-bug/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/investigate-bug/
1Skills CLI (Vercel)
npx skills add rerun-build/rerun --skill investigate-bug -a codex2Manually: put the files in place
.agents/skills/investigate-bug/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add rerun-build/rerun --skill investigate-bug -a cursor2Manually: put the files in place
.cursor/skills/investigate-bug/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install rerun-build/rerun .claude/skills/investigate-bug2Manually: put the files in place
.github/skills/investigate-bug/SKILL.md1Skills CLI (Vercel)
npx skills add rerun-build/rerun --skill investigate-bug -a gemini-cli2Platform CLI
gemini skills install https://github.com/rerun-build/rerun --path .claude/skills/investigate-bugManually: put the files in place
.devin/skills/investigate-bug/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about investigate-bug
How do I install investigate-bug in Claude Code?
Run npx skills add rerun-build/rerun --skill investigate-bug -a claude-code. The skill file is placed at ~/.claude/skills/investigate-bug/SKILL.md.
What does investigate-bug do?
It gathers evidence, looks for earlier fixes, attempts to reproduce the issue, and traces it to the responsible code. It then writes a report and suggests a minimal patch.
What does investigate-bug need to work?
Local reproduction uses pnpm db:start and pnpm cloud env:local. An investigation can also query Notion, PostHog, Dokploy, Trigger.dev, Supabase, and the engine API; production and staging access must remain read-only.