Creating clear, readable, and attractive Mermaid flowcharts with best practices for accessibility, layout, and maintainability.
From aops-coworknpx claudepluginhub nicsuzor/aopsThis skill is limited to using the following tools:
references/color-and-styling.mdreferences/mermaid-techniques.mdreferences/quality-and-anti-patterns.mdreferences/templates-and-examples.mdDesigns and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Taxonomy note: This skill provides domain expertise (HOW) for creating Mermaid flowcharts. See [[TAXONOMY.md]] for the skill/workflow distinction.
Purpose: Create Mermaid flowcharts that are clear, readable, and visually attractive.
Key principle: One message per chart. Hierarchy and chunking. Obvious flow. Distinct shapes for distinct semantics.
Use this skill when:
Contrast with excalidraw: Use excalidraw for hand-drawn, organic mind maps. Use flowchart for structured, code-based Mermaid diagrams.
| Shape | Mermaid Syntax | Use For |
|---|---|---|
| Rectangle | [text] | Process steps |
| Diamond | {text} | Decisions |
| Rounded | ([text]) | Start/End |
| Parallelogram | [/text/] | Data/IO |
| Stadium | ([text]) | Terminals |
<br/> lines or move detail to notes/legendsMaintain visual hierarchy and accessibility through deliberate color choices and consistent typography.
See [[references/color-and-styling]] for palettes, accessibility guidelines, and typography rules.
Default assumption: Charts are too tall. Optimize for horizontal spread - most users' screens are wider than tall.
| Content Type | Direction | When to Use | Result |
|---|---|---|---|
| Linear process (≤8 steps) | LR | Simple pipelines, single thread | 1 tall row, many columns (BEST) |
| Branching/decisions | TD | Multiple branches, complex logic | Wider at branch points |
| Parallel workflows | LR with direction TB subgraphs | Phases left-to-right, steps top-down | Compact horizontal grouping |
| Complex systems (>15) | LR + ELK layout | Systems with cross-links, multi-layer | Optimal automatic distribution |
PRINCIPLE: Prefer LR layout for 80% of use cases. It naturally spreads horizontally, matching screen dimensions.
For diagrams with many nodes (>15) or cross-links, ELK layout produces dramatically better results:
---
config:
layout: elk
elk:
mergeEdges: true
nodePlacementStrategy: SIMPLE
---
Place phases horizontally, let steps flow vertically within:
flowchart LR
subgraph PHASE1["Phase 1"]
direction TB
A1[Step 1] --> A2[Step 2]
end
subgraph PHASE2["Phase 2"]
direction TB
B1[Step 1] --> B2[Step 2]
end
PHASE1 --> PHASE2
Critical: Link between subgraphs, not between internal nodes. Internal-to-external links force direction inheritance.
Master advanced layout tricks, initialization blocks, and professional styling.
See [[references/mermaid-techniques]] for spacing configurations, multi-layer alignment, and semantic styling.
Ensure your charts meet high standards and avoid common Mermaid pitfalls.
See [[references/quality-and-anti-patterns]] for a final quality checklist and a list of common layout, visual, and structural sins.
For flows with many steps (10+ nodes), organize into numbered phases rather than one long chain.
flowchart TB
subgraph INIT["① INITIALIZATION"]
direction TB
S0([Start]) --> S1[Load Config]
S1 --> S2[Validate]
end
subgraph EXEC["② EXECUTION"]
direction TB
E1[Process] --> E2{Check}
E2 -->|OK| E3[Continue]
E2 -->|Fail| E1
end
subgraph END["③ CLEANUP"]
direction TB
C1[Save] --> C2([End])
end
INIT --> EXEC --> END
%% Side panels for auxiliary systems
subgraph AUX["⚡ AUXILIARY"]
A1[Helper 1]
A2[Helper 2]
end
E1 -.-> A1
C1 -.-> A2
style INIT fill:#ecfdf5,stroke:#059669,stroke-width:2px
style EXEC fill:#fefce8,stroke:#ca8a04,stroke-width:2px
style END fill:#f5f5f5,stroke:#737373,stroke-width:2px
style AUX fill:#fef2f2,stroke:#ef4444,stroke-width:1px,stroke-dasharray: 5 5
Key principles:
INIT --> EXEC --> END keeps main flow cleanSee [[references/templates-and-examples.md]] for complete templates including: