跳到正文
TakoAPI
返回技能列表

mermaid

由 jarekbird 提供

PDF & Documents
957下载量由 clawskills.sh 提供
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Generate diagrams from text using [Mermaid](https://mermaid.js.org/).

描述

该技能的功能

Converts Mermaid diagram syntax into rendered PNG, SVG, or PDF images using the mmdc CLI. Supports 12 diagram types including flowcharts, sequence diagrams, ER diagrams, and Git graphs. Output themes and resolution are configurable.

Produces image files directly from text syntax without requiring a browser or design tool.

何时使用

  • Visualizing a database schema as an ER diagram
  • Documenting an API authentication flow as a sequence diagram
  • Mapping out a project timeline with a Gantt chart
  • Rendering a system architecture overview for a README
  • Generating a Git branch history diagram

示例工作流

输入

User asks: draw a sequence diagram showing a login flow with JWT

智能体
  1. 1

    Determine sequenceDiagram is the appropriate Mermaid type

  2. 2

    Write the Mermaid syntax to /tmp/mermaid-login.mmd

  3. 3

    Run mmdc -i /tmp/mermaid-login.mmd -o /tmp/mermaid-login.png -t dark -b transparent -s 2

  4. 4

    Display the rendered image to the user via Read tool

  5. 5

    Remove temp files

输出

PNG image of the login sequence diagram with dark theme

安装

clawhub install jarekbird/mermaid

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接