Codebase Detective — AI skill for Claude Code
AI agent skill: investigate first, modify later.
How to install Codebase Detective
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open marselmarselyt-png/codebase-detective and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Codebase Detective does
AI agent skill: investigate first, modify later. Map codebases, trace cross-file root causes, analyse blast radius before editing, run real tests, report evidence with honest confidence. Python stdlib only. Step-by-step setup: github.com/marselmarselyt-png/codebase-detective/blob/main/docs/getting-started.md
Alternatives in AI
- Skill Seekers Roadmap — Transform Skill Seekers into the easiest way to create Claude AI skills from any knowledge source - documentat 11.1k ★
- Cartographer — Claude Code plugin that maps and documents codebases of any size using parallel AI subagents 518 ★
- Ultimate Debugger Prompt For Claude 3 — A professional-grade debugging AI prompt designed for Claude 3.5 Sonnet that meticulously examines errors, gen 172 ★
README
Codebase Detective
**Investigate First. Modify Later.**
An AI agent skill that behaves like a software detective instead of a guess-driven code editor. It maps an unfamiliar repository, traces root causes across files, analyses the blast radius of a change, runs the tests that actually exist, and reports what it knows — and what it does not.
Works with opencode, Claude Code, and any agent that can load a `SKILL.md`. Python 3 standard library only — no `pip install`, nothing added to your repo.
# install (opencode, all projects)
git clone https://github.com/marselmarselyt-png/codebase-detective.git \
~/.config/opencode/skills/codebase-detective
**Requirements:** Python 3.9+. **31+ automated tests.** **MIT.**
**[Step-by-step install and first run →](docs/getting-started.md)**
Why this exists
Coding agents fail in a predictable way: they see a stack trace, form a hypothesis within thirty seconds, and start editing. The edit is usually plausible. Sometimes it is even correct. But nothing in the transcript shows whether the agent understood the system, whether the change breaks something else, or whether the tests were ever run — and the failure is invisible, because a confident summary reads exactly like a correct one.
This skill inverts the order of operations and makes the reasoning auditable.
The six rules
| # | Rule |
|---|---|
| 1 | No edit before investigation. No code change until a root-cause hypothesis with evidence and an impact assessment exist. |
| 2 | Every diagnosis cites file:line. No citation means the claim is labelled a guess. |
| 3 | The user's work is protected. Snapshot before editing, verify after, never revert what you did not write. |
| 4 | Tests are run or not claimed. Real command, real exit code. "Should pass" is not evidence. |
| 5 | Uncertainty is reported. CAUSE NOT FOUND with a hypothesis table is a valid outcome. |
| 6 | Risky actions need approval. Deletions, public A |
Related Skills
Living Codebase Cartographer
Offline codebase cartographer: language-agnostic repo maps, dependency/call graphs, blast-radius impact analys
Who Broke It
Open-source coordination layer for AI-native engineering teams: one repo, many humans and coding agents. Task
Autonomous Debugger
Evidence-driven debugging skill for Claude Code and AI coding agents. Investigates codebases, reproduces failu
Graqle
Persistent organisational intelligence for AI agents. Turn codebases, documents, policies and decisions into a
Architecture AI Workflows
AI assistants can support architectural work by helping analyse trade-offs, document decisions, explore design
Critical Thinking For Humans
A gym for your critical thinking — the AI is the coach, you do the work. Four modes: drill, scene, expedition,
Related Agents
Tp Impact Analyzer
PROACTIVELY use this when the user asks "what will break if I change X", "who depends on this", or is about to
Deep Review
High-effort read-only reviewer for security-sensitive, architecture-critical, or high-blast-radius reviews — d
Analyse
Use for deep analysis tasks — break down problems, evaluate options, find root causes, surface insights from d