Agent skill
mermaid-design
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/mermaid-design
SKILL.md
name: mermaid-design
description: Generate and standardize Mermaid diagrams with deterministic token-based theming from the repository root mermaid.tokens.json.
Mermaid Design
Use one token source (mermaid.tokens.json at repo root) for all Mermaid outputs.
Supported diagrams
graphflowchartsequenceDiagramclassDiagramstateDiagramstateDiagram-v2erDiagramjourneyganttpiemindmaptimelinegitGraphquadrantChartrequirementDiagramkanban
Mandatory preflight
- Resolve repository root.
- Ensure root
mermaid.tokens.jsonexists. - If missing, create it using the default token JSON from this file.
- Load
themeandthemeVariablesbefore producing Mermaid output.
Root token contract
- Path is always root
mermaid.tokens.json. - Root file is the source of truth for theme values.
- Every diagram output must include a Mermaid init block using root values.
- If user requests style changes, update root
mermaid.tokens.jsonfirst, then generate diagrams.
Default root tokens (create when missing)
{
"theme": "base",
"themeVariables": {
"darkMode": false,
"background": "#f4f4f4",
"fontFamily": "trebuchet ms, verdana, arial",
"fontSize": "16px",
"primaryColor": "#fff4dd",
"primaryTextColor": "#2f2f2f",
"primaryBorderColor": "#e7bf67",
"secondaryColor": "#dff4ff",
"secondaryTextColor": "#17324d",
"secondaryBorderColor": "#83c9ee",
"tertiaryColor": "#e6ffe0",
"tertiaryTextColor": "#1e4026",
"tertiaryBorderColor": "#93cc86",
"lineColor": "#6f7f8a",
"textColor": "#263746",
"noteBkgColor": "#fff5ad",
"noteTextColor": "#333333",
"noteBorderColor": "#d7c25b",
"actorBkg": "#fff4dd",
"actorBorder": "#e7bf67",
"actorTextColor": "#2f2f2f",
"signalColor": "#31424f",
"signalTextColor": "#31424f",
"activationBkgColor": "#dff4ff",
"activationBorderColor": "#83c9ee",
"pie1": "#fff4dd",
"pie2": "#dff4ff",
"pie3": "#e6ffe0",
"pie4": "#ffd9c2",
"pie5": "#d9e7ff",
"pie6": "#f9e1ff",
"pieStrokeColor": "#2f2f2f",
"pieStrokeWidth": "2px"
}
}
Workflow
- Run preflight.
- Read root token file.
- Emit one init block in this shape:
%%{init: {"theme":"<theme>","themeVariables":{...}}}%%
- Generate requested supported diagram.
- Avoid one-off inline style overrides unless explicitly requested.
Failure handling
- If root token file is unreadable or invalid JSON, replace with default tokens and continue.
- If the requested diagram type is unsupported, list supported types and stop.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?