pavilio-mermaid-chart

Write Mermaid diagrams with subgraph coloring and arrow conventions for panel rendering.

Updated Apr 19, 2026
One-click install
npx skills add https://github.com/gmotyl/pavilio --skill pavilio-mermaid-chart-gmotyl
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pavilio-mermaid-chart
Source: https://github.com/gmotyl/pavilio/tree/main/skills/pavilio-mermaid-chart
Command: npx skills add https://github.com/gmotyl/pavilio --skill pavilio-mermaid-chart-gmotyl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Mermaid diagrams often render incorrectly or look inconsistent in dark-mode panels — nodes land in the wrong subgraph, subgraph titles with punctuation break the whole diagram, and colors fail to distinguish current versus fixed flows. This Skill provides the exact patterns to author diagrams that render correctly. ## Core Features & Use Cases - Panel coloring rules: Documents how flowchart subgraphs and sequence diagram rect blocks receive palette colors by declaration order, so you can control visual grouping. - Syntax pitfalls and fixes: Covers node-to-subgraph assignment, quoted subgraph titles for punctuation, label line breaks, and arrow conventions for calls versus responses. - Diagram type selection: Includes a decision table mapping scenarios (processes, interactions, schemas, timelines) to flowchart, sequence, ERD, state, class, C4, git graph, gantt, and pie diagrams. - Use Case: When writing a design doc comparing a broken code path to a fixed one, use the two-subgraph flowchart pattern so the panel colors the current path cyan and the fixed path red automatically. ## Quick Start Use the pavilio-mermaid-chart skill to write a flowchart with subgraphs showing the current broken flow versus the fixed flow for my design doc.

Frequently Asked Questions about pavilio-mermaid-chart

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I color Mermaid subgraphs in a flowchart?▼

Subgraph colors are assigned by declaration order, not layout position: first subgraph is cyan, second red, third green, and so on. Order your subgraph blocks deliberately, such as broken path first and fixed path second, to control the palette.

Why does my Mermaid diagram fail with a lexical error on the subgraph line?▼

A bare subgraph title accepts only plain words; punctuation like em dashes, commas, slashes, or parentheses causes a lexical error that kills the whole diagram. Use the id plus quoted-string form, such as subgraph fixed["Answer tab (new)"], for any title with punctuation.

Why is my shared node rendered inside the wrong Mermaid subgraph?▼

Mermaid assigns a node to the first subgraph that mentions it, not where it was declared. Keep subgraph bodies limited to their own nodes and write cross-links like B --> C1 at root level so shared nodes stay outside the clusters.

Which Mermaid diagram type should I use for a design doc?▼

Use flowcharts for processes and branching, sequence diagrams for multi-service interactions, state diagrams for lifecycles, ERD for database schemas, and gantt for timelines. Only flowcharts and sequence diagrams get per-group palette coloring; other types share a single dark theme.

How are sequence diagram arrows colored in Mermaid?▼

Arrows inherit the sending actor's color: solid calls (->>) take the source actor's hue, and dotted responses (-->>) take a brightened tint of that same hue. Keep calls and responses semantically correct and the coloring follows automatically.