Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/zebbern/claude-code-guide/code-to-diagramnpx skills add zebbern/claude-code-guide --skill code-to-diagramgit clone --depth 1 https://github.com/zebbern/claude-code-guideWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00074 | $0.00923 |
| Opus 5 | $0.00037 | $0.00462 |
| Sonnet 5 | $0.00015 | $0.00185 |
| Haiku 4.5 | $0.00007 | $0.00092 |
Grade A, and why
code-to-diagram scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
1 near-identical copy found in the catalogue:
- code-to-diagram — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 105 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Code to Diagram
Extract import and dependency relationships from a codebase via AST parsing, and automatically generate three types of diagrams:
- Architecture Diagram — Module/directory-level dependency relationships
- Flowchart — File-level import call chains
- Org Chart — Directory/file hierarchy structure
Supported languages: Python, JavaScript, TypeScript, Go, Java
Output formats: Mermaid text (.mmd) or SVG images (requires mmdc installed on the system)
Usage
Basic: Analyze an Entire Project
python3 scripts/analyze_codebase.py /path/to/project
Outputs three Mermaid diagrams to stdout and writes .mmd files to the current directory.
Specify Diagram Type
# Architecture diagram only
python3 scripts/analyze_codebase.py /path/to/project --type architecture
# Flowchart only
python3 scripts/analyze_codebase.py /path/to/project --type flowchart
# Org chart only
python3 scripts/analyze_codebase.py /path/to/project --type org
Specify Output Directory and Format
# Output to a specific directory
python3 scripts/analyze_codebase.py /path/to/project --output /tmp/diagrams
# Output as SVG (requires mmdc)
python3 scripts/analyze_codebase.py /path/to/project --format svg
# Output both Mermaid and SVG
python3 scripts/analyze_codebase.py /path/to/project --format both
Output JSON Analysis Results
python3 scripts/analyze_codebase.py /path/to/project --json
Parameters
| Parameter | Description |
|---|---|
directory |
Code directory to analyze (required) |
--type, -t |
Diagram type: architecture, flowchart, org, all (default: all) |
--output, -o |
Output directory (default: current directory) |
--format, -f |
Output format: mermaid, svg, both (default: mermaid) |
--max-files |
Maximum number of files to scan (default: 500) |
--max-depth |
Maximum depth for org chart (default: 4) |
--json |
Output analysis results in JSON format |
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 105 lines · 74 tokens per session scan A 82de1fa72456
code-to-diagram is a skill published in the GitHub repository zebbern/claude-code-guide (4,597 stars, last pushed yesterday), licensed MIT. It adds 74 tokens to every session and 923 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
code-to-chart
解析代码仓库的 import/依赖关系,自动生成架构图、流程图和组织架构图,输出 Mermaid 文本或 SVG 图片。支持 Python、JavaScript、TypeScript、Go 和 Java 项目。当用户需要可视化代码结构、分析模块依赖、生成架构文档,或提及“代码架构图”、“依赖关系图”、“流程图”、“组织架构图”、“Mermaid 图”等关键词时触发。.
code-to-diagram
Analyze codebases and automatically generate architecture diagrams, flowcharts, and org charts. Uses AST parsing to map import dependencies for Python, JS/TS, Go, and Java, outputting Mermaid or SVG files. Triggered when users ask to visualize code architecture, understand dependencies, draw a flowchart, or create a…
diagram-creator
Create professional diagrams using Mermaid, PlantUML, and other text-based diagram tools. Generate flowcharts, sequence diagrams, architecture diagrams, and more.
tech-diagram
Use this skill when the user wants to turn a description into a technical diagram — architecture diagrams, flowcharts, sequence diagrams, state machines, ER diagrams, class diagrams, or mind maps. Generates brand-consistent Mermaid that the DesireCore chat renders inline as SVG, with a semantic shape/arrow vocabulary…
mermaid-diagram
Use this skill when you need to draw diagrams including: Flowchart, Sequence Diagram, Class Diagram, State Diagram, ER Diagram, User Journey, Gantt Chart, Pie Chart, Quadrant Chart, Requirement Diagram, Gitgraph, Mindmap, Timeline, Sankey, XY Chart (Bar/Line), Block Diagram, Packet Diagram, Kanban, Architecture…
aws-architecture-diagram
AWS architecture diagrams — generate visual network topology diagrams from live AWS infrastructure. Use when drawing AWS network diagrams, visualizing VPCs, mapping Transit Gateway topology, or generating architecture documentation.