Token导航 LogoToken导航

Agent Skill · 研究检索

mermaid(Mermaid 图表绘制)

mermaid 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

mermaid 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证为 MIT,暂无第三方扫描结果,按安装量在研究检索类的 73,675 个 Skill 里排第 57,864。

总安装 423周安装 18GitHub Stars 公开资料未说明下载 148核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:mermaid(Mermaid 图表绘制)
来源仓库:https://github.com/teachingai/agent-skills
仓库路径:skills/mermaid
安装命令:
npx skills add teachingai/agent-skills --skill "mermaid"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add teachingai/agent-skills --skill "mermaid"

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于查找、检索和筛选相关信息,支持快速定位候选结果。适合在关键词搜索、任务场景或来源线索不明确时使用。可结合来源仓库和原始 README 进一步验证具体功能和使用方式。安装命令:npx skills add teachingai/agent-skills --skill "mermaid"。

安装前建议确认权限范围、是否会触发联网或文件读写操作。

来源仓库内路径:skills/mermaid

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add teachingai/agent-skills --skill "mermaid";命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

mermaid 怎么安装?

在终端执行 npx skills add teachingai/agent-skills --skill "mermaid"。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

mermaid 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

mermaid 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

mermaid 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

mermaid 用的人多吗?

公开数据是累计安装 423 次,近一周安装 18 次,下载 148 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

mermaid 安全吗?

没有查到第三方扫描结果,安全性无法从公开资料判断,安装前请自行审查源码、依赖和命令行为。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 没有第三方扫描结果,安全性只能靠自己读源码判断。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 要求有安全扫描结论才肯安装的团队。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
mermaid

Mermaid 图表绘制 · 本页

423—只读MIT未收录

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

When to use this skill

ALWAYS use this skill when the user mentions:

  • Drawing, creating, generating, making, or building any diagram, chart, or graph
  • Visualizing processes, workflows, systems, architectures, or data
  • Any request to "画图" (draw diagram), "绘图" (draw chart), "生成图" (generate diagram), "创建图" (create diagram)
  • Flowcharts, sequence diagrams, class diagrams, state diagrams, or any diagram type
  • Architecture diagrams, system diagrams, or design diagrams
  • Data visualization, charts, or graphs
  • Process flows, workflows, or business processes
  • Project timelines, schedules, or Gantt charts
  • User journeys, mindmaps, or hierarchical structures
  • Database schemas, ER diagrams, or entity relationships
  • Git branching structures or version control diagrams
  • Any visual representation or diagrammatic content

Trigger phrases include:

  • "画一个图" (draw a diagram), "画流程图" (draw flowchart), "画架构图" (draw architecture diagram)
  • "创建一个图表" (create a chart), "生成一个图" (generate a diagram)
  • "帮我画" (help me draw), "给我画" (draw for me), "画出来" (draw it out)
  • "用图表示" (represent with diagram), "可视化" (visualize), "画个图说明" (draw a diagram to explain)
  • "流程图" (flowchart), "时序图" (sequence diagram), "类图" (class diagram), "状态图" (state diagram)
  • "架构图" (architecture diagram), "系统图" (system diagram), "设计图" (design diagram)
  • "甘特图" (Gantt chart), "思维导图" (mindmap), "时间线" (timeline)
  • "用 Mermaid" (use Mermaid), "Mermaid 画图" (draw with Mermaid), "Mermaid 语法" (Mermaid syntax)
  • Any mention of "diagram", "chart", "graph", "flowchart", "visualization", "drawing", "Mermaid"

IMPORTANT: Mermaid vs PlantUML - Two Different Diagramming Tools:

Mermaid and PlantUML are two different diagramming tools with different purposes:

  • Mermaid: A JavaScript-based diagramming tool designed for Markdown documentation. It uses Markdown-inspired syntax and renders directly in Markdown renderers (GitHub, GitLab, wikis, blogs). Best for quick diagrams, Markdown documentation, and simple visualizations. Output format is fenced Markdown code blocks with the mermaid language tag.
  • PlantUML: A component that allows you to create various UML diagrams through simple textual descriptions. It focuses on UML standards and complex system architecture. Best for UML diagrams, enterprise architecture, C4 models, and diagrams requiring precise UML notation. Output format is @startuml/@enduml blocks or .puml files.

When both PlantUML and Mermaid skills are matched:

  • If the user explicitly mentions "Mermaid" or "Markdown diagram", use this skill (Mermaid)
  • If the user explicitly mentions "PlantUML", "UML diagram", or "C4 model", use the PlantUML skill instead
  • If the user references Markdown contexts (README, wiki, GitHub/GitLab, blog), default to Mermaid
  • If the user references UML standards or .puml, default to PlantUML
  • If the user mentions both or neither, ALWAYS ask the user to choose: "I can create this diagram using either Mermaid (Markdown code block) or PlantUML (@startuml). Which output format do you prefer?"

How to use this skill

CRITICAL: Mermaid is a Markdown-focused diagramming tool. This skill should be triggered when the user explicitly mentions "Mermaid", needs diagrams for Markdown documentation, or wants diagrams that render directly in Markdown renderers (GitHub, GitLab, wikis, blogs).

Trigger this skill when you see:

  • User says "用 Mermaid" (use Mermaid), "Mermaid 画图" (draw with Mermaid), "Markdown 图" (Markdown diagram)
  • User needs diagrams for Markdown documentation, GitHub, GitLab, wikis, or blogs
  • User wants quick diagrams that render directly in Markdown renderers
  • User mentions any diagram type for Markdown: flowchart, sequence diagram, class diagram, etc.
  • User wants to visualize, represent, or illustrate something with a diagram in Markdown format

When both PlantUML and Mermaid are matched, ALWAYS ask the user to choose the output format or tool, as they are two different diagramming tools with different purposes.

To create a Mermaid diagram:

  1. Identify the diagram type from the user's request:

- Flowchart/flow chart/流程图 → flowchart or graph - Sequence diagram/时序图 → sequenceDiagram - Class diagram/类图 → classDiagram - State diagram/状态图 → stateDiagram or stateDiagram-v2 - Entity relationship diagram/实体关系图 → erDiagram - User journey/用户旅程图 → journey - Gantt chart/甘特图 → gantt - Pie chart/饼图 → pie - Quadrant chart/象限图 → quadrantChart - Requirement diagram/需求图 → requirementDiagram - Git graph/Git图 → gitGraph - C4 diagram/C4图 → C4Context, C4Container, C4Component, C4Deployment, or C4Dynamic - Mindmap/思维导图 → mindmap - Timeline/时间线图 → timeline - ZenUML/禅UML → zenuml - Sankey diagram/桑基图 → sankey - XY chart/XY图 → xychart - Block diagram/方块图 → block - Packet diagram/数据包图 → packet - Kanban/看板图 → kanban - Architecture diagram/架构图 → architecture-beta (requires Mermaid v11.1.0+) - Radar chart/雷达图 → radar-beta (requires Mermaid v11.1.0+) - Treemap/树状图 → treemap-beta (requires Mermaid v11.1.0+)

  1. Load the appropriate example file from the examples/ directory:

- examples/flowchart.md - For flowcharts and process diagrams - examples/sequence.md - For sequence diagrams showing interactions - examples/class.md - For class diagrams and object-oriented designs - examples/state.md - For state diagrams and state machines - examples/er.md - For entity relationship diagrams - examples/journey.md - For user journey maps - examples/gantt.md - For Gantt charts and project timelines - examples/pie.md - For pie charts - examples/quadrant.md - For quadrant charts - examples/requirement.md - For requirement diagrams - examples/gitgraph.md - For Git branching diagrams - examples/c4.md - For C4 architecture diagrams - examples/mindmap.md - For mindmaps - examples/timeline.md - For timeline diagrams - examples/zenuml.md - For ZenUML diagrams - examples/sankey.md - For Sankey flow diagrams - examples/xychart.md - For XY charts (bar/line charts) - examples/block.md - For block diagrams - examples/packet.md - For packet diagrams - examples/kanban.md - For Kanban boards - examples/architecture.md - For architecture diagrams - examples/radar.md - For radar charts - examples/treemap.md - For treemap diagrams

  1. Follow the specific instructions in that example file for syntax, structure, and best practices Important Notes:

- Beta diagram types (architecture-beta, radar-beta, treemap-beta) require Mermaid v11.1.0 or higher - If the rendering environment doesn't support beta diagram types, use the flowchart alternatives provided in the example files - Always check the example file for version compatibility notes and alternative syntax options

  1. Generate the Mermaid code wrapped in a Markdown code block with proper syntax highlighting: IMPORTANT: Always wrap the Mermaid code in a Markdown code block with mermaid language tag. This ensures the format is preserved when users copy the content. Example format (use actual Mermaid syntax, not placeholders): flowchart TD A[Start] --> B[Process] B --> C[End] Output Format Requirements:

- Always use triple backticks (``) with mermaid language tag - Never output raw Mermaid code without code block markers - The code block must be complete and properly formatted - Use actual valid Mermaid syntax, not placeholders like <diagram-type> or ...diagram content...` - This ensures users can copy the code without losing formatting

  1. Include styling and configuration when needed:

- Use %%{init: {theme: 'base'}}%% for theme configuration - Apply style directives for node styling - Use classDef for reusable style classes

  1. Validate the syntax:

- Ensure all required elements are present - Check that relationships and connections are properly defined - Verify date formats for Gantt charts (YYYY-MM-DD) - Confirm data formats for charts (pie, quadrant, etc.) - For ER diagrams: Use underscores instead of hyphens in entity names (e.g., LINE_ITEM not LINE-ITEM) - For flowcharts: Avoid using "end" as a node label (use "End" or "END" instead) - For class diagrams: Escape special characters in labels using backticks - Check version compatibility for beta diagram types

  1. Save the diagram to project directory:

- Default behavior: When generating a Mermaid diagram, save it to the current project directory - Recommended locations: - docs/diagrams/ - For documentation diagrams - docs/ - For general documentation - diagrams/ - For standalone diagram files - Current directory (.) - If no specific directory structure exists - File naming: Use descriptive names like system-architecture.md, user-flow.md, database-schema.md, etc. - File format: Save as .md file with the Mermaid code block inside - Example: If user requests a system architecture diagram, save it as docs/diagrams/system-architecture.md or diagrams/system-architecture.md - Ask if needed: If the project structure is unclear, ask the user where they'd like the diagram saved, but default to creating a docs/ or diagrams/ directory if it doesn't exist

Output Format and File Saving:

When generating a diagram, follow this response structure:

  1. Save the file first: Create the diagram file in the project directory (e.g., docs/diagrams/system-architecture.md)
  2. Inform the user: Tell them where the file was saved
  3. Display the diagram: Show the Mermaid code in a properly formatted Markdown code block with mermaid language tag

Example Response Structure:

  • First line: "I've created the Mermaid diagram and saved it to docs/diagrams/system-architecture.md."
  • Then show the diagram wrapped in a code block:

- Start with: three backticks + mermaid + newline - Then the Mermaid code - End with: three backticks + newline

Critical Requirements:

  • The Mermaid code block MUST ALWAYS be properly formatted with triple backticks (``) and mermaid` language tag
  • NEVER output raw Mermaid code without code block markers
  • The code block must be complete (opening and closing backticks)
  • This ensures users can copy the code without losing formatting
  • Always save the diagram file to the current project directory (default: docs/diagrams/ or diagrams/)

If the diagram type doesn't match any existing example, refer to the Mermaid documentation or ask the user for clarification about the desired visualization.

Version Compatibility

Some diagram types have specific version requirements:

  • Beta diagram types (require Mermaid v11.1.0+):

- architecture-beta - Architecture diagrams - radar-beta - Radar charts - treemap-beta - Treemap diagrams

  • Advanced features (require specific versions):

- Participant types with JSON configuration: Mermaid v10.0.0+ - Actor creation/destruction: Mermaid v10.3.0+ - Edge IDs and curve styles: Mermaid v11.10.0+ - New shapes with @{} syntax: Mermaid v11.3.0+

If a beta diagram type is not supported, the example files provide flowchart alternatives that work with all Mermaid versions.

Best Practices

  1. Always use code blocks: Wrap all Mermaid code in Markdown code blocks with mermaid language tag
  2. Check compatibility: Verify version requirements before using beta diagram types
  3. Use alternatives: When beta types aren't supported, use the provided flowchart alternatives
  4. Follow naming conventions: Avoid reserved keywords and special characters in node labels
  5. Test syntax: Validate diagram syntax before saving to ensure proper rendering
  6. Organize files: Save diagrams in appropriate directories (docs/diagrams/ or diagrams/)
  7. Use descriptive names: Name diagram files clearly (e.g., system-architecture.md, user-flow.md)

Mermaid vs PlantUML - Key Differences

Mermaid (This Skill):

  • Purpose: JavaScript-based diagramming tool designed for Markdown documentation
  • Main Use Case: Help documentation catch up with development
  • Best For:

- Markdown documents, GitHub, GitLab, wikis, blogs - Quick diagrams that render directly in Markdown renderers - Simple flowcharts, sequence diagrams, basic charts - Rapid prototyping and iteration - When the user explicitly requests Mermaid or needs Markdown-compatible diagrams

PlantUML (Different Skill):

  • Purpose: Component for creating various UML diagrams through textual descriptions
  • Main Use Case: UML-focused diagramming with emphasis on standard UML notation
  • Best For:

- Complex UML diagrams requiring precise notation (class, component, deployment diagrams) - Enterprise architecture diagrams and C4 model diagrams - Standard UML compliance requirements - Diagrams requiring advanced customization, styling, or layout control - When the user explicitly requests PlantUML or UML diagrams

When Both Skills Are Matched:

  • ALWAYS ask the user to choose: "I can create this diagram using either Mermaid or PlantUML. Mermaid is a JavaScript-based tool designed for Markdown documentation and renders directly in GitHub/GitLab. PlantUML is focused on UML diagrams and enterprise architecture. Which would you prefer?"
  • These are two different diagramming tools with different purposes - do not automatically choose one
  • If the user explicitly mentions one tool, use that tool
  • If the user mentions both or neither, ask the user to choose based on their needs

Keywords

English keywords: mermaid, diagram, chart, graph, flowchart, flow chart, sequence diagram, class diagram, state diagram, entity relationship, ER diagram, user journey, Gantt chart, pie chart, quadrant chart, requirement diagram, Git graph, C4 diagram, mindmap, timeline, ZenUML, Sankey diagram, XY chart, block diagram, packet diagram, Kanban, architecture diagram, radar chart, treemap, draw, create, generate, make, build, visualize, visualization, drawing, plotting, mapping, schematics, blueprint, design diagram, system diagram, process flow, workflow, data visualization, visual representation

Chinese keywords (中文关键词): 流程图, 时序图, 类图, 状态图, 实体关系图, 用户旅程图, 甘特图, 饼图, 象限图, 需求图, Git图, C4图, 思维导图, 时间线图, 桑基图, XY图, 方块图, 数据包图, 看板图, 架构图, 雷达图, 树状图, 画图, 绘图, 生成图, 创建图, 制作图, 画流程图, 画架构图, 画时序图, 画类图, 画状态图, 画甘特图, 画思维导图, 画时间线, 可视化, 图表, 图形, 示意图, 设计图, 系统图, 流程图, 架构图, 时序图, 类图, 状态图, 甘特图, 思维导图, 时间线, 用图表示, 画出来, 给我画, 帮我画, 画一个, 创建一个图, 生成一个图, 画个图说明, 用图表展示, 可视化展示

平台分布

Claude Code

31.42%
按下载量换算47

OpenCode

22.3%
按下载量换算33

Antigravity

19.1%
按下载量换算28

Codex

12.68%
按下载量换算19

windsurf

8.67%
按下载量换算13

Gemini CLI

3.6%
按下载量换算5

安全审计

暂无安全审计结果可展示。

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills