# investigation

Builds a dated folder under scratch/ with a README and checklist for one code investigation. Useful when you need to follow data flow or map an unfamiliar system.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 1 install · ★ 624 repo stars
- Author: talmolab
- License: BSD-3-Clause-Clear · policy=link-only · description only; the file stays with the author
- Source: https://github.com/talmolab/sleap/tree/HEAD/.claude/skills/investigation/SKILL.md
- Updated: 2026-10-20
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/investigation

## What it does

The skill creates `scratch/{YYYY-MM-DD}-{descriptive-name}` inside your repo and puts a `README.md` there: what you are looking into, the background, and a checklist you tick off as answers appear. Scripts and data files land in the same folder. A big job can be split into numbered sub-documents.

Investigations come in a few loose shapes that often overlap. Tracing follows calls or data forward and backward from one component. Architecture work starts at entry points and walks every layer. Bugs go through reproduction, root-cause tracing and a proposed fix. Feasibility work writes throwaway scripts to see whether an idea holds. Design research compares options and records the trade-offs, with numbered design questions (DQ1, DQ2) when decisions come in rounds.

Standalone scripts are meant to run through `uv` with inline dependencies; code that imports the project is called with `python` directly. External packages get cloned into `scratch/repos/` when you need to read their source. The catch: `scratch/` sits in `.gitignore`, so nothing there reaches a commit. Findings have to be pasted into the PR description, since a PR that points at scratch files is not self-contained.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add talmolab/sleap --skill investigation -a claude-code
```

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

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add talmolab/sleap --skill investigation -a codex
```

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

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add talmolab/sleap --skill investigation -a cursor
```

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install talmolab/sleap .claude/skills/investigation
```

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

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add talmolab/sleap --skill investigation -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/talmolab/sleap --path .claude/skills/investigation
```

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add talmolab/sleap --skill investigation -a opencode
```

### 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/talmolab/sleap/tree/HEAD/.claude/skills/investigation/SKILL.md

## When to use it
- trace where a value comes from and where it goes
- map an unfamiliar codebase layer by layer
- reproduce a bug and pin down its root cause
- test whether an idea is feasible with a throwaway script
- compare API design options before writing code

## Example prompts
- Start an investigation: trace from `load_labels` to the file write.
- Figure out why `test_predict` fails and keep the notes in an investigation folder.
- Gather context on the export API and lay out the design alternatives.

## Similar
- [code-researcher](https://affpapa.org/en/nevibecode/skills/code-researcher.md) — skill · ★ 452 repo stars
- [multi-source-research](https://affpapa.org/en/nevibecode/skills/multi-source-research.md) — skill · 1 install
- [perf-investigation-logger](https://affpapa.org/en/nevibecode/skills/perf-investigation-logger.md) — skill · 2300 installs
- [documenting-legacy-codebases](https://affpapa.org/en/nevibecode/skills/documenting-legacy-codebases.md) — skill · 26600 installs
- [acquire-codebase-knowledge](https://affpapa.org/en/nevibecode/skills/acquire-codebase-knowledge.md) — skill · 2200 installs
- [deepinit](https://affpapa.org/en/nevibecode/skills/deepinit.md) — skill · 1100 installs

---
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
