Token导航 LogoToken导航TokenDH.com
开发执行命令github未标认证来源可访问许可证需确认审计通过

mermaidMermaid 图表绘制

Agent Skill

mermaid 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

420

周安装

17

GitHub Stars

33

下载量

132
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/mblode/agent-skills --skill mermaid

简介

mermaid 用于处理 GitHub 仓库、Issue、Pull Request 等协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中整理代码变更和协作事项时使用。
  • 通过 GitHub 安装,使用 npx skills add 命令添加指定仓库的 skill。
  • 安装前需确认权限范围、维护状态,以及是否会触发联网或命令执行。
  • mermaid 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Mermaid

Produce a valid, well-structured Mermaid diagram from the user's source material and intent. Pick the right diagram type, keep it readable, and emit it in a fenced mermaid code block.

Reference Files

FileRead When
references/diagram-selection.mdDefault: choosing the right diagram type; one-line samples for each
references/common-diagrams.mdGenerating flowchart, sequence, class, state, ER, or C4 diagrams
references/specialized-diagrams.mdGenerating mindmap, gantt, timeline, journey, gitGraph, pie, quadrant, requirement, xychart, sankey, block, or architecture diagrams
references/generation-guidelines.mdAny diagram: label limits, structure rules, source-type strategies, anti-patterns
references/styling-and-output.mdTheming, classDef styling, frontmatter config, export, rendering targets

Workflow

Copy this checklist to track progress:

Mermaid progress:
- [ ] Step 1: Pick diagram type
- [ ] Step 2: Gather source material
- [ ] Step 3: Draft structure
- [ ] Step 4: Generate Mermaid syntax
- [ ] Step 5: Validate
- [ ] Step 6: Present output

Step 1: Pick diagram type

If the user named a type (e.g. "sequence diagram"), use it. Otherwise load references/diagram-selection.md and pick from its matrix. Common defaults:

ContentDiagram
Process with decisions, branching logicflowchart
Messages between actors/systems over timesequenceDiagram
States and transitions (order lifecycle, workflow)stateDiagram-v2
Database / domain entities with relationshipserDiagram
System architecture by levelC4Context / C4Container / C4Component
Concept hierarchy, brainstorm, overviewmindmap

Ask the user to confirm only if two types fit equally well.

Step 2: Gather source material

For topics or specs, ask one clarifying question if scope is ambiguous (e.g., "overview or detailed breakdown?"), then commit. For codebases, files, or conversations, pull only what's needed to name the nodes and relationships — don't scan more than needed.

Step 3: Draft structure

Sketch the diagram's bones before writing syntax:

  • List the nodes/entities/steps.
  • List the relationships/messages/transitions.
  • For flowchart, sequence, state: identify start and end. For ER, class: identify multiplicity. For C4: pick the right level.
  • Apply the size and label rules in references/generation-guidelines.md — typically 5-20 nodes for readability.

Step 4: Generate Mermaid syntax

Open the relevant reference file for the chosen type and write the diagram inside a fenced mermaid code block. Keep syntax minimal; add styling only when requested (see references/styling-and-output.md).

Step 5: Validate

Run the common checks below, plus type-specific checks from the corresponding reference file. Revise and re-check if any fail.

Common checks:

  • First line declares the correct diagram type (e.g. flowchart TD, sequenceDiagram)
  • No unescaped ()[]{} or stray colons inside plain text labels
  • No blank lines inside the diagram block (breaks some renderers)
  • Every referenced node / participant / entity is defined before use where required
  • Direction and flow are consistent (top-down or left-right, not both)
  • Label text is short enough to render (aim for under 6 words; see per-type rules)
  • Total size is within the readable limit for the type (15-20 for flowchart/class; up to 40 for mindmap)

Step 6: Present output

Output the diagram in a fenced mermaid code block. Note where it renders: GitHub/GitLab markdown, Mermaid Live Editor (mermaid.live), Notion, Obsidian, VS Code with a Mermaid preview extension.

If the user requests a file, write to a .md file containing the fenced block. For image export, point them to Mermaid Live Editor or @mermaid-js/mermaid-cli (see references/styling-and-output.md).

Translation examples

How to turn typical source material into a diagram. Pattern: identify the type first, then extract nouns (nodes) and verbs (edges / transitions).

Prose → sequenceDiagram

Source: "User hits Checkout. Server validates the cart, reserves stock, and charges Stripe. On success, the order is saved and a confirmation email is queued."

sequenceDiagram
    actor User
    participant Server
    participant Stripe
    participant Email
    User->>+Server: POST /checkout
    Server->>Server: Validate cart
    Server->>Server: Reserve stock
    Server->>+Stripe: Charge
    Stripe-->>-Server: Success
    Server->>Server: Save order
    Server->>+Email: Queue confirmation
    Email-->>-Server: Queued
    Server-->>-User: 200 Order confirmed

Spec → stateDiagram

Source: "Orders start as Pending. Payment success moves to Paid; failure moves to Cancelled. Paid orders ship, then complete. Cancelled orders are terminal."

stateDiagram-v2
    [*] --> Pending
    Pending --> Paid : payment success
    Pending --> Cancelled : payment failed
    Paid --> Shipped : ship
    Shipped --> Completed : deliver
    Completed --> [*]
    Cancelled --> [*]

Scoring matrix → quadrantChart

Source: "Rate campaigns on reach (low/high) and engagement (low/high). A is high-reach, mid-engagement. B is low-reach, low-engagement. C is high-reach, high-engagement."

quadrantChart
    title Campaign reach vs engagement
    x-axis Low Reach --> High Reach
    y-axis Low Engagement --> High Engagement
    quadrant-1 Expand
    quadrant-2 Promote
    quadrant-3 Re-evaluate
    quadrant-4 Improve
    A: [0.8, 0.5]
    B: [0.2, 0.2]
    C: [0.8, 0.8]

Anti-patterns

  • Forcing everything into one diagram — split into multiple focused diagrams instead.
  • Sentences as labels — extract keywords or move detail into child nodes / notes.
  • Mixing two diagram types in one fenced block (not supported).
  • Icons or Font Awesome references when the rendering target doesn't support them.
  • Over-styling before the structure is validated.
  • Guessing syntax — load the reference file for the chosen type.

Related skills

  • presentation-creator for slide decks that include diagrams
  • define-architecture for detailed architecture decisions beyond visual diagrams
  • docs-writing for embedding diagrams into technical documentation

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.16%
按下载量换算46

Claude

27.29%
按下载量换算36

Cursor

20.26%
按下载量换算27

Gemini CLI

9.15%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/mblode/agent-skills --skill mermaid 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

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

来源信息

继续浏览同类 Skills