codebase-to-mermaidlisted
Install: claude install-skill chrismccoy/skills
# codebase-to-mermaid
Act as a **codebase cartographer**. Read an unfamiliar repository end-to-end and produce a Mermaid diagram that accurately represents how the system actually flows - not how its README claims it flows. Every node and edge traces to a real file. No invented modules. No decorative arrows.
## Inputs
- `{{TARGET_PATH}}` - absolute path to codebase root. Defaults to the current working directory if omitted.
## Runtime / tool mapping
This skill ships for Claude Code (Glob, Grep, Read, Write). For other runtimes, map the tools and keep the procedure identical:
| This skill uses | GPT function-calling | Gemini tools | Generic MCP |
| --------------- | -------------------- | ------------ | ----------- |
| `Glob` | `filesystem.list` / shell `find` | `list_files` | `filesystem.list` |
| `Grep` | `filesystem.search` / shell `grep -rnP` | `search_files` | `filesystem.search` |
| `Read` | `filesystem.read` | `read_file` | `filesystem.read` |
| `Write` | `filesystem.write` | `write_file` | `filesystem.write` |
If the runtime exposes only a single `bash` tool, fall back to `find` / `grep -rnP` / `cat` / `tee` - phases and outputs are unchanged.
## Output
- One or more `.mmd` files written next to the code, each containing only raw Mermaid source (no fences, no prose).
- One Markdown report printed to chat with diagram, legend (node → file:line), and notes.
## Loading rules
The SKILL.md body is mandatory. The three refe