跳到正文
TakoAPI
返回技能列表

skill-mermaid-diagrams

由 chunhualiao 提供

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

简介

Generate consistent, template-based Mermaid diagrams for technical content.

描述

该技能的功能

Generates Mermaid diagrams from 12 pre-built templates with LLM-powered placeholder filling. Supports architecture, flowchart, sequence, Gantt, class, and state diagram types with a consistent color scheme. A subagent handles the full workflow: reading source content, selecting templates, rendering diagrams, and validating output.

Rendering diagrams locally with mermaid-cli costs 95-99% less than AI image generation services while producing consistently styled, version-controllable vector output.

何时使用

  • Generating system architecture diagrams for technical documentation
  • Creating Gantt charts for project milestone tracking
  • Producing UML class diagrams from code structure descriptions
  • Building sequence diagrams for API interaction walkthroughs
  • Visualizing process state machines in workflow documentation

示例工作流

输入

User asks: Generate 3 diagrams for chapters/chapter-05.md

智能体
  1. 1

    Reads chapter-05.md and analyzes its content

  2. 2

    Selects 3 appropriate templates from the 12 available types

  3. 3

    Fills each template's placeholders with labels derived from chapter content and writes content.json

  4. 4

    Runs generate.mjs to render .mmd source, .svg, and .png files

  5. 5

    Runs validate.mjs to confirm all outputs rendered without errors or unresolved placeholders

输出

3 diagram sets saved to diagrams/chapter-05/ as .mmd, .svg, and .png files with a summary.json metadata file

前置要求

  • mermaid-cli >= 11.0.0 installed globally via npm install -g @mermaid-js/mermaid-cli

安装

clawhub install chunhualiao/skill-mermaid-diagrams

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

链接