code-to-diagram
Analyze codebases and automatically generate architecture diagrams, flowcharts, and org charts.
Skill by zebbern
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/zebbern-code-to-diagram
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/code-to-diagram
What's inside
- Skill name
code-to-diagram- Description
- 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 module diagram from source code.
- License
- MIT
- Instructions
- 98 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (3)
- LICENSE
- SKILL.md
- analyze_codebase.py · scripts/
SKILL.md (first lines)
# Code to Diagram Extract import and dependency relationships from a codebase via AST parsing, and automatically generate three types of diagrams: 1. **Architecture Diagram** — Module/directory-level dependency relationships 2. **Flowchart** — File-level import call chains 3. **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 ```bash 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 ```bash # 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 ```bash # 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 ```bash 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 | ## How It Works 1. **Scan phase**: Recursively traverse the directory, skipping `node_modules`, `.git`, `__pycache__`, etc. 2. **Parse phase**: - Python files: uses the `ast` module to parse `import` and `from ... import` statements - JS/TS files: uses regex to match `import`, `require`, and `export from` - Go files: uses regex to match `import` statements - Java files: uses regex to match `import` statements 3. **Resolve internal dependencies**: Maps import paths to actual files within the project 4. **Generate diagrams**: Converts dependency relationships into Mermaid diagram syntax 5. **Render (optional)**: Calls `mmdc` (Mermaid CLI) to render `.mmd` files as SVG ## Use Cases - Quickly understand the module structure of an unfamiliar project - Visualize dependencies during code review - Create architecture diagrams for technical documentation - Detect circular dependencies or excessive coupling - Analyze project structure before refactoring ## Dependencies - Python 3.7+ (standard library only, no extra packages needed) - SVG output requires `@mermaid-js/mermaid-cli` (optional) ## Notes - Only analyzes static import relationships; dynamic imports are not tracked - For large projects, use `--max-files` to limit the scan scope - Mermaid diagrams with too many nodes may be hard to render; use `--type` to generate diagrams separately
From zebbern/claude-code-guide, MIT.
More from zebbern/claude-code-guide
- 0.746score
audit-flow
ArunJRK
Interactive system flow tracing across CODE, API, AUTH, DATA, NETWORK layers with SQLite persistence and Mermaid export.
SkillCFreshness: C★ 4.7KClaude Code +9 - 0.740score
r3f-best-practices
three-agent-skills
React Three Fiber (R3F) and Poimandres ecosystem best practices.
SkillCFreshness: C★ 4.7KClaude Code +9 - 0.740score
three-best-practices
three-agent-skills
Three.js performance optimization and best practices guidelines.
SkillCFreshness: C★ 4.7KClaude Code +9 - 0.662score
repo-audit
zebbern
Deep analysis of Git history: identify frequently changed hotspot files, analyze code ownership by contributor, and scan for leaked secrets.
SkillCFreshness: C★ 4.7KClaude Code +9 - 0.662score
dataset-quality-audit
zebbern
Run comprehensive quality checks on tabular data (CSV/Excel/TSV/JSON), detecting missing values, duplicates, outliers, format issues, and type inconsistencies…
SkillCFreshness: C★ 4.7KClaude Code +9 - 0.662score
database-scout
zebbern
Explore SQLite and PostgreSQL databases: list tables, inspect schemas (columns/types/constraints), preview data, generate Mermaid ER diagrams, and run safe…
SkillCFreshness: C★ 4.7KClaude Code +9 - 0.662score
project-sizing-guide
zebbern
Software project effort estimation assistant.
SkillCFreshness: C★ 4.7KClaude Code +9 - 0.662score
chart-image
zebbern
Generate publication-quality PNG chart images from data, supporting line, bar, area, candlestick, pie, and heatmap charts.
SkillCFreshness: C★ 4.7KClaude Code +9 - 0.662score
code-vuln-audit
zebbern
Scan code for security issues: dependency vulnerabilities (npm/pip audit), secret leaks (regex and entropy analysis), and OWASP anti-patterns like SQL…
SkillCFreshness: C★ 4.7KClaude Code +9 - 0.662score
log-error-digest
zebbern
Analyze log files to troubleshoot errors, identify peak error periods, and produce error clustering, frequency statistics, and time distribution reports.
SkillCFreshness: C★ 4.7KClaude Code +9 - 0.662score
data-viz-renderer
zebbern
Generate self-contained HTML/SVG infographics from JSON data, including stat cards, bar charts, flow diagrams, and mixed dashboards.
SkillCFreshness: C★ 4.7KClaude Code +9 - 0.662score
http-load-profiler
zebbern
Run stepped HTTP load tests with ab/wrk, ramping concurrency levels to collect p50/p90/p99 latency, detect performance inflection points, and recommend…
SkillCFreshness: C★ 4.7KClaude Code +9
Signals
- Stars
- 4,678
- Forks
- 471
- Open issues
- 3
- Last commit (this folder)
- May 31, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/zebbern/claude-code-guide
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from zebbern
- 0.693score
api-fuzzing
zebbern
API fuzzing for bug bounty.
SkillAFreshness: A★ 131Claude Code +9 - 0.662score
database-scout
zebbern
Explore SQLite and PostgreSQL databases: list tables, inspect schemas (columns/types/constraints), preview data, generate Mermaid ER diagrams, and run safe…
SkillCFreshness: C★ 4.7KClaude Code +9 - 0.662score
code-vuln-audit
zebbern
Scan code for security issues: dependency vulnerabilities (npm/pip audit), secret leaks (regex and entropy analysis), and OWASP anti-patterns like SQL…
SkillCFreshness: C★ 4.7KClaude Code +9 - 0.662score
chart-image
zebbern
Generate publication-quality PNG chart images from data, supporting line, bar, area, candlestick, pie, and heatmap charts.
SkillCFreshness: C★ 4.7KClaude Code +9 - 0.662score
data-viz-renderer
zebbern
Generate self-contained HTML/SVG infographics from JSON data, including stat cards, bar charts, flow diagrams, and mixed dashboards.
SkillCFreshness: C★ 4.7KClaude Code +9 - 0.662score
dataset-quality-audit
zebbern
Run comprehensive quality checks on tabular data (CSV/Excel/TSV/JSON), detecting missing values, duplicates, outliers, format issues, and type inconsistencies…
SkillCFreshness: C★ 4.7KClaude Code +9
Cite this page
code-to-diagram skill. Agent Mart. https://agentmart.dev/skills/zebbern-code-to-diagram (last updated 2026-10-24)