skills$openclaw/diagram-gen
lxgicstudios6.5k

by lxgicstudios

diagram-gen – OpenClaw Skill

diagram-gen is an OpenClaw Skills integration for coding workflows. Generate Mermaid diagrams from your codebase. Use when you need architecture visualizations.

6.5k stars3.1k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026coding

Skill Snapshot

namediagram-gen
descriptionGenerate Mermaid diagrams from your codebase. Use when you need architecture visualizations. OpenClaw Skills integration.
ownerlxgicstudios
repositorylxgicstudios/diagram-gen
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @lxgicstudios/diagram-gen
last updatedFeb 7, 2026

Maintainer

lxgicstudios

lxgicstudios

Maintains diagram-gen in the OpenClaw Skills directory.

View GitHub profile
File Explorer
9 files
.
src
cli.ts
1.2 KB
index.ts
1.5 KB
_meta.json
286 B
package-lock.json
46.2 KB
package.json
737 B
README.md
718 B
SKILL.md
2.1 KB
tsconfig.json
217 B
SKILL.md

name: diagram-gen description: Generate Mermaid diagrams from your codebase. Use when you need architecture visualizations.

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:

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.

README.md

ai-diagram

Generate Mermaid diagrams from your codebase. Supports flowcharts, class diagrams, sequence diagrams, and more.

Install

npm install -g ai-diagram

Usage

npx ai-diagram ./src/
# → Generates flowchart in diagram.mmd

npx ai-diagram ./src/ --type class -o architecture.mmd
# → Class diagram

npx ai-diagram ./src/ --type sequence
# → Sequence diagram of function calls

Setup

export OPENAI_API_KEY=sk-...

Diagram Types

  • flowchart - Code flow and dependencies (default)
  • class - Class relationships and inheritance
  • sequence - Function call sequences
  • er - Entity relationship diagram
  • state - State machine diagram

License

MIT

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

Requirements

No install needed. Just run with npx. Node.js 18+ recommended. Needs OPENAI_API_KEY environment variable. ```bash npx ai-diagram --help ```

FAQ

How do I install diagram-gen?

Run openclaw add @lxgicstudios/diagram-gen in your terminal. This installs diagram-gen into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/lxgicstudios/diagram-gen. Review commits and README documentation before installing.