Investigator
A scientific debugging protocol for persistence failures and integration mismatches.
What it does
For a bug where the failure point is unclear across layers: a value that saves but reverts on reload, a controller that reports success but nothing persists, a fix that was applied but the symptom stays. It gathers evidence before forming a hypothesis, tests at least three candidate causes before committing to one, verifies against the running system rather than the source code, and does not close until the fix is applied everywhere the same pattern exists.
Say "it's not saving" or "keeps reverting" — it triggers on the symptom, no slash command.
The seven steps
- Trace the code path. Write the exact data flow end to end, with file paths and line numbers, before forming any opinion.
- Verify the write/read contract. Confirm the component and its backend agree on the data shape, including edge cases like 0, false and empty string.
- Map the full lifecycle. Widen scope to auth, middleware, caching and serialisation, not just the obvious failure point.
- Generate at least three hypotheses. The obvious cause, a systemic cause and a type or serialisation cause, ranked by testability, before testing any of them.
- Check every adjacent component. A confirmed failure mode gets audited across every component that shares the same mechanism, not just the one that surfaced.
- Verify against the running system. Direct requests, the actual stored value, real HTTP status and Content-Type, not what the code claims.
- Patch every occurrence. The investigation closes only when the root cause is fixed everywhere it exists, not just where it was first seen.
Install
Claude
Copies the skill file straight from GitHub into your skills folder.
mkdir -p ~/.claude/skills/investigator && curl -fsSL https://raw.githubusercontent.com/Kaikhalid/investigator-skill/main/SKILL.md -o ~/.claude/skills/investigator/SKILL.mdCodex
The Codex version is a folder, so this clones the repo and copies it out.
git clone https://github.com/Kaikhalid/investigator-skill.git /tmp/investigator-skill && mkdir -p ~/.codex/skills && cp -R /tmp/investigator-skill/codex-plugin/skills/investigator ~/.codex/skills/ && rm -rf /tmp/investigator-skill