Skip to content
Back to skills

Diagram Gen

ASecurity

Generate Mermaid diagrams from your codebase. Use when you need architecture visualizations.

  • 651 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added February 10, 2026
developmentbashnodegitapidatabasedocumentation

Works with

  • api

Security analysis

A100/100

Pro scans all 11 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add sundial-org/awesome-openclaw-skills --skill diagram-gen --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Diagram Gen?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Diagram Gen
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sundial-org-diagram-gen/badge)](https://www.skillsdirectory.com/skills/sundial-org-diagram-gen)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
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

```bash
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

```bash
# 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.

```bash
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.

Files in this skill

  • README.md718 B
  • SKILL.md2.1 KB
  • dist/cli.d.ts31 B
  • dist/cli.js1.5 KB
  • dist/index.d.ts169 B
  • dist/index.js1.8 KB
  • package-lock.json46.2 KB
  • package.json737 B
  • src/cli.ts1.2 KB
  • src/index.ts1.5 KB
  • tsconfig.json217 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.