diagram-gen
Generate Mermaid diagrams from your codebase. Use when you need architecture visualizations.
- License 许可
- MIT
- 最近更新
- 2026-04-05
- Stars
- ★ 7
- Forks
- 1
01 前言 Front Matter
- name
- diagram-gen
- description
- Generate Mermaid diagrams from your codebase. Use when you need architecture visualizations.
02 资源文件 7
- 参考文档_meta.json286 B
- 参考文档package-lock.json46.2 KB
- 参考文档package.json737 B
- 参考文档README.md718 B
- 脚本src/cli.ts1.2 KB
- 脚本src/index.ts1.5 KB
- 参考文档tsconfig.json217 B
03 SKILL.md 正文
Diagram Generator
Architecture diagrams are always out of date because nobody maintains them. This tool reads your code and generates accurate Mermaid diagrams automatically.
One command. Zero config. Just works.
Quick Start
npx ai-diagram ./src/
What It Does
- Generates Mermaid diagrams from your code
- Supports flowcharts, class diagrams, sequence diagrams
- Creates ER diagrams from database schemas
- Outputs markdown-compatible Mermaid syntax
Usage Examples
# Generate flowchart
npx ai-diagram ./src/
# Class diagram
npx ai-diagram ./src/ --type class -o architecture.mmd
# Sequence diagram of function calls
npx ai-diagram ./src/ --type sequence
# Entity relationship diagram
npx ai-diagram ./src/ --type er
Best Practices
- Pick the right diagram type - use class for OOP, flow for processes
- Focus on key modules - don't diagram everything
- Keep them updated - run periodically as code changes
- Add to docs - Mermaid renders in GitHub markdown
When to Use This
- Onboarding new team members
- Documentation that's always out of date
- Understanding unfamiliar codebases
- Architecture reviews and planning
Part of the LXGIC Dev Toolkit
This is one of 110+ free developer tools built by LXGIC Studios. No paywalls, no sign-ups, no API keys on free tiers. Just tools that work.
Find more:
- GitHub: https://github.com/LXGIC-Studios
- Twitter: https://x.com/lxgicstudios
- Substack: https://lxgicstudios.substack.com
- Website: https://lxgicstudios.com
Requirements
No install needed. Just run with npx. Node.js 18+ recommended. Needs OPENAI_API_KEY environment variable.
npx ai-diagram --help
How It Works
Reads your source files to understand the structure, relationships, and data flow. Then generates Mermaid syntax that renders as diagrams in markdown editors, GitHub, and documentation tools.
License
MIT. Free forever. Use it however you want.
04 同仓库更多 Skills
zyfai
Earn yield on any Ethereum wallet on Base, Arbitrum, and Plasma. Use when a user wants passive DeFi yield on their funds. Deploys a non-custodial subaccount (Safe) linked to their EOA, enables automated yield optimization, and lets them deposit/withdraw anytime.
zerion-api
暂无简介
zerion-api-skill
暂无简介
zerion-api-mcp
暂无简介
yahoo-finance-forex
Fetches real-time FOREX news and market data from Yahoo Finance for major currency pairs (EUR/USD, GBP/USD, USD/JPY, etc.). Analyzes sentiment and provides trading context.
yahoo-finance
This skill should be used when the user asks to "get stock prices", "check stock quotes", "look up earnings", "get financial data", "find trending stocks", or needs stock market data from Yahoo Finance.