Skip to content
Back to skills

Diagram

ASecurity

Create and validate Mermaid diagrams. Use when creating, editing, or reviewing Mermaid diagrams in markdown files.

  • 17 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added February 7, 2026
documentationbashnodeapidatabase

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 bendrucker/claude --skill diagram --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Diagram?

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

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

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
description: Create and validate Mermaid diagrams. Use when creating, editing, or reviewing Mermaid diagrams in markdown files.
user-invocable: true
---

# Mermaid Diagrams

Create and validate Mermaid diagrams with syntax checking.

## Diagram Types

| Type | Directive | Use For |
|------|-----------|---------|
| Flowchart | `flowchart TB` | Process flows, decision trees, system architecture |
| Sequence | `sequenceDiagram` | API interactions, message passing, protocols |
| State | `stateDiagram-v2` | State machines, lifecycles, status transitions |
| ER | `erDiagram` | Database schemas, entity relationships |

## Validation

Validate mermaid syntax in markdown files:

```bash
bun ${CLAUDE_SKILL_ROOT}/scripts/validate.ts <file.md>
```

## References

- [Flowchart](./references/flowchart.md) — Nodes, edges, subgraphs, layout direction
- [Sequence](./references/sequence.md) — Participants, messages, activations, loops
- [State](./references/state.md) — States, transitions, composite states
- [ER](./references/er.md) — Entities, relationships, cardinality

## Best Practices

- Keep labels concise—use full descriptions in surrounding prose
- Use subgraphs to group related nodes visually
- Order participants/nodes to minimize edge crossings
- Prefer left-to-right (`LR`) for timelines, top-to-bottom (`TB`) for hierarchies

Files in this skill

  • SKILL.md1.3 KB
  • package.json228 B
  • references/er.md2.1 KB
  • references/flowchart.md2.4 KB
  • references/sequence.md3 KB
  • references/state.md2.2 KB
  • scripts/fixtures/invalid.md745 B
  • scripts/fixtures/no-mermaid.md88 B
  • scripts/fixtures/valid.md2.5 KB
  • scripts/validate.test.ts2.8 KB
  • scripts/validate.ts4.2 KB

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.

Comments

Loading comments…

Newsletter

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