Agent skill
mermaids-treasure
Mermaid diagram syntax reference for all diagram types — flowchart, sequence, class, state, ER, gantt, git graph, mindmap, timeline, user journey, pie, quadrant, XY chart, block, sankey, C4, kanban, and more. Use when constructing or debugging any Mermaid diagram definition.
Install this agent skill to your Project
npx add-skill https://github.com/Jamie-BitFlight/claude_skills/tree/main/plugins/process-siren/skills/mermaids-treasure
SKILL.md
Mermaid Diagram Syntax
Complete syntax reference for all Mermaid diagram types. Enables AI agents to construct valid diagrams with correct syntax, structure, and configuration across flowcharts, sequence diagrams, class diagrams, state diagrams, ER diagrams, gantt charts, git graphs, mindmaps, timelines, user journeys, data charts, and advanced diagram types.
Scope
TRIGGER: Activate when the user asks to create, fix, or modify any Mermaid diagram, or when generating Mermaid diagram code of any type.
COVERS:
- Flowchart/graph diagrams — node shapes, edge types, subgraphs, styling, interactivity
- Sequence diagrams — actors, messages, loops, activations, notes
- Class diagrams — classes, relationships, methods, visibility
- State diagrams — states, transitions, composite states, forks
- Entity-relationship diagrams — entities, attributes, relationships
- Gantt charts — tasks, sections, dependencies, date formats
- Git graphs — commits, branches, merges, cherry-picks
- Mindmaps — nodes, icons, classes, shapes
- Timeline and user journey diagrams
- Data charts — pie, quadrant, XY chart, sankey
- Advanced diagrams — block, C4, kanban, packet
DOES NOT COVER:
- Mermaid.js API or rendering engine internals
- HTML/JavaScript integration beyond click callbacks
Quick Reference — Common Patterns
flowchart TD
Start([Start]) --> Decision{Condition?}
Decision -->|Yes| Action[Do something]
Decision -->|No| Other[Do other thing]
Action --> End([End])
Other --> End
Direction codes: TD/TB = top-down, LR = left-right, BT = bottom-up, RL = right-left
Essential node shapes:
| Shape | Classic Syntax | v11.3.0+ Syntax |
|---|---|---|
| Rectangle | A[text] |
A@{ shape: rect } |
| Rounded | A(text) |
A@{ shape: rounded } |
| Stadium | A([text]) |
A@{ shape: stadium } |
| Diamond | A{text} |
A@{ shape: diamond } |
| Circle | A((text)) |
A@{ shape: circle } |
| Database | A[(text)] |
A@{ shape: cyl } |
Essential edge types:
| Type | Syntax |
|---|---|
| Arrow | A --> B |
| Arrow + text | A -->|text| B |
| Dotted arrow | A -.-> B |
| Thick arrow | A ==> B |
| Open link | A --- B |
Workflow
flowchart TD
Start([Task received]) --> Q1{Diagram type?}
Q1 -->|flowchart/graph| FC[Load node-shapes.md + edge-syntax.md]
Q1 -->|sequence| SEQ[Load sequence-diagram.md]
Q1 -->|class| CLS[Load class-diagram.md]
Q1 -->|state| ST[Load state-diagram.md]
Q1 -->|er| ER[Load er-diagram.md]
Q1 -->|gantt| GNT[Load gantt.md]
Q1 -->|gitGraph| GIT[Load git-graph.md]
Q1 -->|mindmap| MM[Load mindmap.md]
Q1 -->|timeline/journey| TL[Load timeline-journey.md]
Q1 -->|pie/quadrant/XY/sankey| DC[Load data-charts.md]
Q1 -->|block/C4/kanban/packet| ADV[Load advanced-diagrams.md]
Q1 -->|fix broken syntax| Debug[Load all references — check syntax rules]
FC --> Construct[Construct diagram using syntax reference]
SEQ --> Construct
CLS --> Construct
ST --> Construct
ER --> Construct
GNT --> Construct
GIT --> Construct
MM --> Construct
TL --> Construct
DC --> Construct
ADV --> Construct
Debug --> Construct
For flowchart styling, subgraphs, and interactivity, also load subgraphs-and-layout.md and styling-and-config.md.
For the full 6-phase flowchart element selection process (direction, shape, edge, label, grouping, styling), see Flowchart Construction Decision Process.
Reference Files
Flowchart References
Node Shapes — All node shape syntaxes — classic bracket notation and v11.3.0+ @{ shape: ... } notation. Includes the complete shape catalog with semantic names, short names, and aliases. Load when constructing nodes or choosing appropriate shapes.
Edge Syntax — All edge/link types — solid, dotted, thick, invisible, circle, cross, and multi-directional arrows. Covers edge IDs, animations, text labels, chaining, and the minimum length table. Load when connecting nodes or styling edges.
Subgraphs and Layout — Subgraph declaration, explicit IDs, nested direction control, direction limitation for external links. Also covers diagram direction codes, Markdown strings, special character escaping, entity codes, and comments. Load when grouping nodes or controlling layout.
Styling and Configuration — Node styling, link styling, classDef, CSS classes, click interactivity, tooltips, FontAwesome icons, custom icons, renderer selection (dagre/elk), and line curve configuration. Load when styling diagrams or adding interactive elements.
Flowchart Construction — 6-phase element selection process: direction, shape, edge, label, grouping, styling. Decision trees for flowchart construction. Load when building a flowchart from scratch.
Other Diagram Types
Sequence Diagram — Actors, messages, loops, alt/opt/par blocks, activations, notes, and autonumbering. Load when constructing sequence diagrams.
Class Diagram — Classes, attributes, methods, visibility, relationships (inheritance, composition, aggregation, dependency), and namespaces. Load when constructing class diagrams.
State Diagram — States, transitions, composite states, fork/join, concurrency, and notes. Load when constructing state diagrams.
ER Diagram — Entities, attributes, relationship cardinality, and keys. Load when constructing entity-relationship diagrams.
Gantt — Tasks, sections, dependencies, date formats, exclusions, and milestones. Load when constructing gantt charts.
Timeline and Journey — Timeline events with dates and sections; user journey tasks with scores and actors. Load when constructing timeline or user journey diagrams.
Git Graph — Commits, branches, merges, cherry-picks, tags, and theme variables. Load when constructing git graph diagrams.
Mindmap — Root nodes, child nodes, icons, classes, and shapes. Load when constructing mindmap diagrams.
Data Charts — Pie charts, quadrant charts, XY charts, and sankey diagrams. Load when constructing data visualization diagrams.
Advanced Diagrams — Block diagrams, C4 architecture diagrams, kanban boards, and packet diagrams. Load when constructing advanced or specialized diagram types.
Critical Constraints
- The word
endin all lowercase breaks flowcharts — capitalize asEndorEND - Starting a node connection with
oorxcreates circle/cross edges — add a space or capitalize - Subgraph direction is ignored when any subgraph node links to an external node
- Click interactivity requires
securityLevel='loose'— disabled instrictmode - Commas in
stroke-dasharraymust be escaped as\,inclassDefstatements
References
[1] Mermaid Flowchart Syntax Documentation (accessed 2026-03-07)
[2] Mermaid Official Site — Flowchart Syntax (accessed 2026-03-07)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
ccc
This skill should be used when code search is needed (whether explicitly requested or as part of completing a task), when indexing the codebase after changes, or when the user asks about ccc, cocoindex-code, or the codebase index. Trigger phrases include 'search the codebase', 'find code related to', 'update the index', 'ccc', 'cocoindex-code'.
agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.
delegate
Quick delegation template for sub-agent prompts. Use when assigning work to a sub-agent, before invoking the Agent tool, or when preparing prompts for specialized agents. Provides the WHERE-WHAT-WHY framework. For comprehensive delegation guidance, activate the agent-orchestration how-to-delegate skill.
swarm-spawning
Spawn agents and teammates in Claude Code swarms. Use when choosing between subagents vs teammates, selecting agent types (Explore, Plan, general-purpose, plugin agents), configuring spawn backends (in-process, tmux, iterm2), or setting environment variables for spawned agents.
knowledge-explorer
Manage the research/ knowledge base (KB) of tool and library research entries. Use when browsing KB topics, adding new research entries, updating existing entries with dated revisions, fetching GitHub repo metadata into a draft KB entry, or migrating old-format entries to skill-spec frontmatter. Triggers on tasks like "what do we have on X", "add this to the KB", "update the KB entry for Y", "fetch github info for owner/repo", or "migrate old entries".
design-anti-patterns
Enforce anti-AI UI design rules based on the Uncodixfy methodology. Use when generating HTML, CSS, React, Vue, Svelte, or any frontend UI code. Prevents "Codex UI" — the generic AI aesthetic of soft gradients, floating panels, oversized rounded corners, glassmorphism, hero sections in dashboards, and decorative copy. Applies constraints from Linear/Raycast/Stripe/GitHub design philosophy: functional, honest, human-designed interfaces. Triggers on: UI generation, dashboard building, frontend component creation, CSS styling, landing page design, or any task producing visual interface code.
Didn't find tool you were looking for?