Mermaid logo

Mermaid

Community
diegomarino
mermaid

Internal routing hub for mermaid diagram skills

Overview

Publisherdiegomarino
Repositoryclaude-toolshed
Skill namemermaid
Stars
58
Forks
5
Bundled files
24
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 24 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by diegomarino on GitHub. Read the source before you install it.

Installation

Install the Mermaid AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/diegomarino/claude-toolshed/tree/main/plugins/mermaid/skills/mermaid
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/diegomarino/claude-toolshed.git /tmp/claude-toolshed
mkdir -p .claude/skills
cp -r /tmp/claude-toolshed/plugins/mermaid/skills/mermaid .claude/skills/mermaid
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Mermaid in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Mermaid on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Mermaid is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Mermaid — Diagram and Documentation Skill

Mermaid diagram and documentation system with specialized guides and code-to-diagram capabilities.

Entry Points

Entry pointWhen to use
/mermaid-{type} commandsYou know the diagram type — fastest path
/mermaid-diagramUnsure of type — describe what you want, gets routed automatically
/mermaid-validateBatch-check existing .md files for broken diagrams
/mermaid-renderRender an existing .mmd file to SVG
/mermaid-configConfigure defaults and check dependencies
/mermaid-architectAnalyze a codebase path and generate a diagram suite
diagram-architect agentClaude detects diagram need during active development work
This skill (SKILL.md)Extended sessions: design docs, code-to-diagram, multi-diagram projects

Diagram Type Routing

Load only the guide for the requested type. Do not pre-load all guides.

Suite requests ("generate diagrams from this codebase", "diagram this project"): use /mermaid-architect — it selects multiple diagram types automatically from actual code.

Ambiguous type (description matches multiple types): use /mermaid-diagram — it asks one clarifying question and routes automatically.

User wantsLoad
Workflow, process, approval flow, user journeyreferences/guides/diagrams/activity-diagrams.md
Infrastructure, cloud, K8s, deploymentreferences/guides/diagrams/deployment-diagrams.md
System architecture, components, microservicesreferences/guides/diagrams/architecture-diagrams.md
API flow, service interactions, request/responsereferences/guides/diagrams/sequence-diagrams.md
Class hierarchy, OOP design, data modelsreferences/guides/diagrams/class-diagrams.md
Database schema, ER modelreferences/guides/diagrams/er-diagrams.md
State machines, lifecycle, FSMreferences/guides/diagrams/state-diagrams.md

Reference Guides

NeedLoad
Syntax errors, rendering failuresreferences/guides/troubleshooting.md (18 documented patterns)
Learning Mermaid, preventing errorsreferences/guides/common-mistakes.md
Color schemes, accessibility, themesreferences/guides/styling-guide.md
Production workflow, validation loopreferences/guides/resilient-workflow.md
Quick routing from symptom to actionreferences/guides/quick-decision-matrix.md

styling-guide.md is a special-case reference. Do not load it by default. Load it only when the user explicitly asks for custom palette/theme behavior, brand colors, accessibility tuning, or style overrides.

Code-to-Diagram

Routing rule: if the user names a framework → use the row below. If no framework is named → use /mermaid-architect.

FrameworkLoadWhich diagram guide
Spring Bootexamples/spring-boot/README.mdRoutes/controllers → sequence · Models/entities → class · Overview → architecture
FastAPI / Python APIexamples/fastapi/README.mdEndpoints/deps → sequence · Pydantic models → class · Overview → architecture
React / frontendexamples/react/README.mdarchitecture (always)
Python ETL / batchexamples/python-etl/README.mdactivity (always)
Node/Expressexamples/node-webapp/README.mdMiddleware/routes → sequence · Overview → architecture
Java Web Appexamples/java-webapp/README.mdRoutes → sequence · Models → class · Overview → architecture
Any codebasereferences/guides/code-to-diagram/README.mdMaster guide determines type

Design Document Templates (assets/)

TemplateWhen to load
architecture-design-template.md"Create architecture doc", "Document system design"
api-design-template.md"API design doc", "Document REST API"
feature-design-template.md"Feature design", "Plan new feature"
database-design-template.md"Database design", "Document schema"
system-design-template.md"System design doc", "Full system documentation"
local-config-template.md"Create mermaid local config", "Generate .claude/mermaid.json template"

Scripts (scripts/)

ScriptUse for
extract_mermaid.jsExtract diagrams from Markdown, validate syntax
resilient_diagram.jsFull workflow: save .mmd, generate SVG, validate, recover errors

Resilient Workflow

CRITICAL: Use resilient_diagram.js for all diagram generation — ensures validation and error recovery.

Key principle: Never add a diagram to Markdown until it passes validation via extract_mermaid.js --validate.

If no target file is specified for embedding: ask the user for the file path before proceeding with the embed step.

If resilient_diagram.js fails (Node.js not found, node_modules missing): stop and tell the user to run /mermaid-config → option 7 (health check) to diagnose missing dependencies.

Error recovery order: troubleshooting.md → common-mistakes.md → WebSearch

Full guide: references/guides/resilient-workflow.md

Unicode Symbols

Load references/guides/unicode-symbols/guide.md when user mentions "symbols", "icons", "emoji in diagrams".

Quick reference: ☁️ cloud · 🌐 load balancer · ⚙️ compute · 💾 data · 📬 messaging · 🔐 security · 🚨 alerts

Theme-First Styling

Default behavior: preserve the user's configured theme/themeVariables.

  • Do not add classDef with hardcoded fill/stroke/color unless the user explicitly asks for custom node colors.
  • Prefer semantic structure (subgraphs, labels, edges) over custom palette overrides.
  • If custom styling is explicitly requested, keep overrides minimal and ensure readable contrast.

User Configuration

Read .claude/mermaid.json as a first step before routing. Supported keys: theme, auto_validate, output_directory. Sub-skills (mermaid-diagram, mermaid-architect, mermaid-render) handle their own config reads in their Step 2.

Common Mistakes

MistakeFix
Diagram won't render after adding to MarkdownValidate with extract_mermaid.js --validate first — see references/guides/resilient-workflow.md
Syntax error with no obvious causeCheck references/guides/troubleshooting.md (18 documented patterns)
Repeated syntax mistakesRead references/guides/common-mistakes.md before generating
Generated diagram ignores configured themeRemove hardcoded classDef fill/stroke/color; use theme-first defaults
Loading all guides upfrontLoad only the guide for the requested diagram type

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Mermaid AI skill do?

Internal routing hub for mermaid diagram skills

Why use Mermaid on TypingMind?

Because you install it once and use it with any model. Mermaid is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Mermaid in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/diegomarino/claude-toolshed/tree/main/plugins/mermaid/skills/mermaid. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Mermaid?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Mermaid?

As many as you like. As long as a model supports skills, you can use Mermaid with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Mermaid AI skill free?

It is published on GitHub by diegomarino. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇