authoring-mermaid-diagrams

Authors, repairs, and validates Mermaid diagrams for target renderers like GitHub and VS Code.

Updated Aug 1, 2026
One-click install
npx skills add https://github.com/siegenthalerroger/.llmctl-marketplace --skill authoring-mermaid-diagrams-siegenthalerroger
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: authoring-mermaid-diagrams
Source: https://github.com/siegenthalerroger/.llmctl-marketplace/tree/main/plugins/llmctl-core-0.4.0/skills/authoring-mermaid-diagrams
Command: npx skills add https://github.com/siegenthalerroger/.llmctl-marketplace --skill authoring-mermaid-diagrams-siegenthalerroger

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Mermaid diagrams frequently fail to render because opening keywords, beta suffixes, and feature support vary across Mermaid versions pinned by GitHub, GitLab, VS Code, and other hosts. This Skill picks the correct diagram type, writes the required frontmatter and accessibility header, and validates the source before it ships. ## Core Features & Use Cases - Type selection by question: Maps the question a diagram must answer to the correct type and opening keyword across 30+ diagram types, with stability tiers (stable, beta-aliased, beta-only, external) for renderer compatibility. - Header and accessibility enforcement: Ensures every diagram carries a YAML frontmatter config: block plus accTitle/accDescr so screen readers and raw-Markdown readers can interpret it. - Static validation and rendering checks: The check-mermaid.mjs script scans Markdown files for unrecognised keywords, deprecated %%{init}%% directives, missing accessibility headers, and unbalanced quotes, and runs a true parse via mmdc when available. - Use Case: A README architecture diagram shows a parse error on GitHub but renders on mermaid.live. Use this Skill to identify that architecture-beta requires the beta spelling on older renderers, fix the header, and re-validate the file. ## Quick Start Ask the assistant to create a Mermaid sequence diagram of your login flow for a GitHub README and validate it before committing.

Frequently Asked Questions about authoring-mermaid-diagrams

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

FAQPage Schema
How do I choose the right Mermaid diagram type?▼

Choose the type based on the question the diagram answers: flowcharts for process steps and branches, sequence diagrams for who calls whom, state diagrams for states and transitions, ER diagrams for entities and cardinality. The Skill provides a question-to-type matrix covering over 30 types.

Why does my Mermaid diagram fail to render on GitHub?▼

GitHub pins an older Mermaid version than mermaid.live, so beta-only types like radar-beta or swimlane-beta and newer syntax may not parse. Use stable-tier types or the -beta spelling that older embedded renderers accept, and avoid click interactions which GitHub strips.

How do I validate Mermaid diagrams before committing?▼

Run node scripts/check-mermaid.mjs on your Markdown files to catch unrecognised keywords, deprecated %%{init}%% directives, missing accessibility headers, and unbalanced quotes. For a true parse, render with mmdc from @mermaid-js/mermaid-cli, which the script invokes automatically when on PATH.

Does Mermaid support dark mode theming?▼

Yes, but hardcoded colors break when hosts switch themes. Never set fill without color or vice versa, and prefer theme: base with themeVariables so derived colors stay consistent. Only the base theme accepts themeVariables; setting them under other themes is silently ignored.

What accessibility attributes should a Mermaid diagram have?▼

Every diagram should include accTitle (single-line) and accDescr (single-line or multi-line brace form) in the body. These emit title and desc elements plus aria attributes in the SVG, making the diagram readable to screen readers and to anyone reading the raw Markdown.

When should I not use a Mermaid diagram?▼

Skip a diagram when the content is a short sequential list of facts, since diagrams exist to show relationships like order, containment, branching, and flow. For rich charts with real axes and many series, a dedicated chart library beats Mermaid's built-in chart types.