Skip to main content
skill

mermaid-diagrams · davila7 — Claude Code skill: text-based software diagrams

A skill that teaches your agent Mermaid syntax: class, sequence, ERD, C4 and flowchart diagrams. Useful when you need to document architecture or a database schema.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --skill creative-design/mermaid-diagrams
Open on GitHub

What mermaid-diagrams does

The skill gives the agent a guide to Mermaid syntax and helps pick the right diagram type for the job. It covers class diagrams for domain modeling, sequence diagrams for API and auth flows, flowcharts for algorithms and user journeys, ERDs for database schemas, and C4 diagrams at context, container and component levels. State diagrams, git graphs, Gantt charts and pie charts are in there too.

The structure is simple: the first line declares the diagram type, the rest is the definition. Comments start with %%. Unknown words break a diagram, while wrong parameters fail silently — so validate syntax in Mermaid Live Editor before committing it. Reference files ship alongside: references/class-diagrams.md, references/sequence-diagrams.md, references/flowcharts.md, references/erd-diagrams.md, references/c4-diagrams.md and references/advanced-features.md.

Theming and layout go through frontmatter. Themes are default, forest, dark, neutral and base; layout is dagre or elk; look is classic or handDrawn. Storing .mmd files next to the code pays off, since GitHub and GitLab render Mermaid in Markdown. For PNG or SVG export there is Mermaid CLI: npm install -g @mermaid-js/mermaid-cli, then mmdc -i input.mmd -o output.png.

What it helps with

  • map a database schema as an ERD before a migration
  • show an API request flow as a sequence diagram
  • break a system down into C4 container levels
  • draw a flowchart for a user journey
  • document a branching strategy as a git graph

Example prompts for the agent

  • draw a sequence diagram for the login flow through the API
  • create an ERD for the USER, ORDER and LINE_ITEM tables
  • show the service architecture as a C4 container diagram

How to install mermaid-diagrams

1claude-code-templates

npx claude-code-templates@latest --skill creative-design/mermaid-diagrams

2Skills CLI (Vercel)

npx skills add davila7/claude-code-templates --skill mermaid-diagrams -a claude-code

3Manually: put the files in place

~/.claude/skills/mermaid-diagrams/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/mermaid-diagrams/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about mermaid-diagrams

How do I install mermaid-diagrams in Claude?

Use the templates CLI: npx claude-code-templates@latest --skill creative-design/mermaid-diagrams. Or run npx skills add davila7/claude-code-templates --skill mermaid-diagrams -a claude-code. The skill file lands at ~/.claude/skills/mermaid-diagrams/SKILL.md.

What does mermaid-diagrams do?

It hands the agent a Mermaid syntax guide and helps choose the right diagram type: class, sequence, flowchart, ERD, C4, state, git graph, Gantt or pie chart.

Where do these diagrams render?

GitHub and GitLab render Mermaid inside Markdown, VS Code needs the Markdown Mermaid extension, and Notion, Obsidian and Confluence support it too. Mermaid CLI handles PNG or SVG export.

Similar skills

Everything for Writing and docs →

mermaid-diagrams by other authors comes first.

From the same set205

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor