A Claude Code skill that reads your backend API routes and opens an interactive map in the browser — color-coded by danger level, sortable by importance, with guided walkthroughs of each route.
- Scans all route files in your project
- Scores each route by complexity, danger (exposed write / guarded / safe), and importance
- Opens a visual map in your browser — click any route to dive in
- Walks you through each route with a Mermaid flowchart, risk summary, and design notes
- Claude Code (CLI)
- Node.js 18+
git clone https://github.com/KeKeDou810/code-visualizer ~/.claude/skills/code-visualizerThen configure your project:
cp ~/.claude/skills/code-visualizer/visualizer.config.example.json \
~/.claude/skills/code-visualizer/visualizer.config.jsonEdit visualizer.config.json and point it at your project:
If you are a Claude agent helping a user install this skill, follow these steps:
- Run
git clone https://github.com/KeKeDou810/code-visualizer ~/.claude/skills/code-visualizer - Run
cp ~/.claude/skills/code-visualizer/visualizer.config.example.json ~/.claude/skills/code-visualizer/visualizer.config.json - Ask the user for their project path, framework, and API directory, then write those values into
~/.claude/skills/code-visualizer/visualizer.config.jsonusing the schema below. - Confirm by saying: "Skill installed. Try:
visualize the backend"
No further registration is needed — Claude Code auto-discovers skills placed in ~/.claude/skills/.
The config schema (only path and label are required — Claude auto-discovers routes for any framework):
{
"projects": {
"my-app": {
"path": "/path/to/your/project",
"label": "my-app"
}
},
"default": "my-app"
}Optional fields if you want to pin the scan pattern:
{
"projects": {
"my-app": {
"path": "/path/to/your/project",
"label": "my-app",
"apiDir": "src/app/api",
"routePattern": "**/route.ts"
}
},
"default": "my-app"
}Just tell Claude to visualize your backend:
帮我可视化一下后端
visualize the backend
分析一下这个项目的 API 结构
Claude will start a local server, scan your routes, and open the map. You can then:
- Click any route card to see a detailed breakdown
- Type "开始" / "start" to walk through routes in order of importance
- Ask follow-up questions about any route
Works with any backend. Claude explores the project structure and identifies routes automatically.
| Framework | Auto-detected? | Notes |
|---|---|---|
| Next.js App Router | Yes | Detects export function GET/POST/... in route.ts files |
| Express / Fastify | Yes | Detects router.get(, app.post(, etc. |
| Flask / Django | Yes | Detects @app.route, def get(, decorators |
| Any other framework | Best-effort | Claude reads the project and infers conventions |
You can also pin the scan pattern manually via apiDir + routePattern in config.
| Level | Meaning |
|---|---|
| 🔴 Exposed | Write operation with no auth check |
| 🟠 Guarded | Write operation behind auth |
| 🟢 Safe | Read-only operation |
MIT
