# investigate-bug

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.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 1120 repo stars
- Author: rerun-build
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/rerun-build/rerun/tree/HEAD/.claude/skills/investigate-bug/SKILL.md
- Updated: 2026-11-16
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/investigate-bug

## What it 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.

## Requirements
- Works with: Notion

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add rerun-build/rerun --skill investigate-bug -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/investigate-bug/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/investigate-bug/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add rerun-build/rerun --skill investigate-bug -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/investigate-bug/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add rerun-build/rerun --skill investigate-bug -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/investigate-bug/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install rerun-build/rerun .claude/skills/investigate-bug
```

2. **Manually: put the files in place**
- File: `.github/skills/investigate-bug/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add rerun-build/rerun --skill investigate-bug -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/rerun-build/rerun --path .claude/skills/investigate-bug
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/investigate-bug/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/rerun-build/rerun/tree/HEAD/.claude/skills/investigate-bug/SKILL.md

## When to use it
- 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
- 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/`.

## Similar
- [debugger](https://affpapa.org/en/nevibecode/agents/rohit-ghumare-debugger.md) — subagent · ★ 2966 repo stars
- [bug-hunt-swarm](https://affpapa.org/en/nevibecode/skills/bug-hunt-swarm.md) — skill · 767 installs
- [diagnose](https://affpapa.org/en/nevibecode/skills/legendapp-diagnose.md) — skill · 429 installs
- [bug-reproduction](https://affpapa.org/en/nevibecode/skills/bug-reproduction.md) — skill · 1800 installs
- [scout](https://affpapa.org/en/nevibecode/skills/simota-scout.md) — skill · 101 installs
- [bug-reproduction-brief](https://affpapa.org/en/nevibecode/skills/bug-reproduction-brief.md) — skill · 62 installs

From the same set: [rerun-build/rerun](https://affpapa.org/en/nevibecode/by/rerun-build/rerun.md) — 25 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
