Mermaid Diagram logo

Mermaid Diagram

Community
PM-Shawn
mermaid-diagram

用 Mermaid 语法生成可视化图表 — 流程图、架构图、序列图、ER 图、甘特图、状态图、思维导图、饼图等结构化图表。当用户要求画图/画架构图/画流程图等结构化可视化需求时触发,直接输出 mermaid 代码块,前端会自动转换为 HTML 并在沙箱 iframe 中渲染。

Overview

PublisherPM-Shawn
RepositoryAbu-Cowork
Skill namemermaid-diagram
Stars
380
Forks
86
Bundled files
Instructions only
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.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by PM-Shawn on GitHub. Read the source before you install it.

Installation

Install the Mermaid Diagram 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.
  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/PM-Shawn/Abu-Cowork.git /tmp/Abu-Cowork
mkdir -p .claude/skills
cp -r /tmp/Abu-Cowork/builtin-skills/mermaid-diagram .claude/skills/mermaid-diagram
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Mermaid Diagram 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 Diagram 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 Diagram 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 图表。直接在回复中输出 ```mermaid 代码块,前端会自动将其转换为 HTML 并在沙箱 iframe 中通过 Mermaid CDN 渲染为 SVG 图表。

不要调用 generate_image 工具,Mermaid 代码块就是最终输出。

支持的图表类型

根据用户需求选择最合适的类型:

需求Mermaid 语法
流程图/决策树flowchart TDflowchart LR
序列图/时序图sequenceDiagram
类图/数据模型classDiagram
状态图/状态机stateDiagram-v2
ER 图/数据库设计erDiagram
甘特图/项目排期gantt
饼图/占比pie
思维导图mindmap
时间线timeline
Git 分支图gitGraph
四象限图quadrantChart
块图/架构布局block-beta

输出规范

  1. 一个代码块一张图:每个 ```mermaid 块只放一张图
  2. 中文标签:节点文字用中文(用户用中文时)
  3. 合理布局
    • 层级关系用 TD(上→下)
    • 流程/时序用 LR(左→右)
    • 节点不超过 20 个,超出时分组或简化
  4. 节点样式
    • 普通步骤:A[文字](方框)
    • 判断/分支:B{条件?}(菱形)
    • 开始/结束:C([文字])(圆角)
    • 数据库:D[(数据库)](圆柱)
  5. 先输出图表,再做文字说明(如有必要)

架构图最佳实践

对于系统架构图,推荐用 flowchart TD + subgraph 分层:

flowchart TD
    subgraph 前端
        A[Web App] --> B[Mobile App]
    end
    subgraph 后端
        C[API Gateway] --> D[业务服务]
        D --> E[数据库]
    end
    前端 --> 后端

注意事项

  • 节点 ID 用英文字母(A, B, C 或有意义的缩写),标签用中文
  • 避免特殊字符(", ', (, ) 等)出现在节点文字中,会导致语法错误
  • 如果用户的需求不适合结构化图表(如照片、插画、艺术画),告知用户并建议使用生图功能

Frequently asked questions

What does the Mermaid Diagram AI skill do?

用 Mermaid 语法生成可视化图表 — 流程图、架构图、序列图、ER 图、甘特图、状态图、思维导图、饼图等结构化图表。当用户要求画图/画架构图/画流程图等结构化可视化需求时触发,直接输出 mermaid 代码块,前端会自动转换为 HTML 并在沙箱 iframe 中渲染。

Why use Mermaid Diagram on TypingMind?

Because you install it once and use it with any model. Mermaid Diagram 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 Diagram in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/PM-Shawn/Abu-Cowork/tree/main/builtin-skills/mermaid-diagram. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Mermaid Diagram?

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 Diagram?

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

Is the Mermaid Diagram AI skill free?

It is published on GitHub by PM-Shawn. 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 👇