Doc mermaid
Choose, write, and validate Mermaid diagrams for professional documents. Use when a document needs a diagram, when picking which diagram type fits an audience, or when a mermaid block must be validated or is failing to render.From its SKILL.md
npx -y skills add RoosterShip/rs_docs --skill doc-mermaidAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.8 KB, as published. Nobody here has run it
Diagrams that the audience can actually read
Pick the type by the primary audience's tier
| Tier | Reader | Types |
|---|---|---|
| Exec-safe | Anyone | flowchart, journey, timeline, gantt, pie, mindmap, quadrantChart |
| Semi-technical | Comfortable with systems | sequenceDiagram, stateDiagram-v2, erDiagram, C4Context |
| Engineer-only | Engineers | classDiagram, gitGraph, requirementDiagram |
Choose from the highest tier the document's primary audience sits in. A five-node flowchart beats a forty-box architecture diagram for explaining a concept to a decider; deeper tiers belong in engineer-facing sections and appendices.
Skip -beta suffixed types (xychart-beta, sankey-beta, block-beta, architecture-beta): their syntax shifts between releases.
Pick the type by the content
The tier table above answers what's safe for the audience; this table answers what fits the content. Pick a type here, then check it against the tier table before using it.
| What you're showing | Best type |
|---|---|
| Goals or requirements mapped to what they need | flowchart |
| Architecture, layers, or who connects to what | flowchart (a C4-style layered flowchart reads at exec tier; C4Context is semi-technical) |
| A request or interaction over time | sequenceDiagram |
| Phases in order, with no dependencies between them | timeline |
| Phases with dependencies or durations | gantt |
| An operation's lifecycle or states | stateDiagram-v2 |
| Ranking or prioritization on two axes, with real scores | quadrantChart |
| A proportion, with real numbers | pie |
| A trend over time, with real numbers | xychart |
| A brainstorm or topic tree | mindmap (informal contexts only; not a formal decision doc) |
quadrantChart, pie, and xychart carry the caveat "with real numbers" for a reason; see "Never fabricate data for a chart" below before reaching for one.
Use a diagram where it earns its place
Pairing text with a fitting visual cuts cognitive load and lifts comprehension by roughly a third over text alone (Concordia University, Effective Technical and Business Writing, ch. 4, Visuals; KnowledgeOwl on visual aids). That's the case for using diagrams functionally, not decoratively: aim for a visual anchor in each section that's dense, abstract, or procedural enough to need one, not a fixed quota per document. A diagram that only restates the adjacent paragraph in shapes weakens the document instead of strengthening it; cut it.
Pair, don't duplicate: the surrounding text sets the diagram up (what it shows, why it matters here), and the diagram carries the structure the prose would otherwise have to spell out step by step. Place it immediately next to the text it supports, not in a collected appendix of figures.
Never fabricate data for a chart
quadrantChart, pie, and xychart only work when the numbers or scores behind them are real. If the underlying data is an open question, an estimate nobody has validated, or a comparison nobody has actually scored, the honest move is a table or prose, not a chart: a chart built on invented data doesn't just fail to help, it spreads the weak data faster and with more borrowed authority than the prose it replaced. Revisit the chart once the data lands.
Keep it readable
- 15–20 nodes maximum; at 30+ split into multiple diagrams by layer or concern.
TDfor sequential steps in narrow documents;LRfor parallel flows and system boundaries.- Short node labels; detail goes on edge labels, and only where it differentiates.
- Color carries meaning or stays out: define a small palette with
classDef(red = failure, green = success) and pair color with a label so the meaning survives grayscale.
Write defensively
LLM-written Mermaid breaks in known, avoidable ways. Follow PITFALLS.md while writing every block: quoting rules, reserved words, and per-type arrow syntax are where diagrams die.
Validate before delivery
Every mermaid block must pass before a document is presented or published:
${CLAUDE_PLUGIN_ROOT}/scripts/validate-mermaid.sh <file.md>
The script checks each fence, reporting BLOCK n (line L): OK|FAIL with the parser's error. Fix and re-run until it exits 0. A diagram that has not passed this script is not done.
Validating is where this skill's job stops. Getting a validated block into a Notion page is /doc-notion's job: by default that's writing the fence in as-is (Notion renders mermaid code blocks natively), with an SVG-upload fallback reserved for diagrams that need custom theming or a high-fidelity PDF export.