Token导航 LogoToken导航

Agent Skill · 开发

mermaid-render(Mermaid render 命令行)

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

mermaid-render 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证信息还不明确,第三方扫描有提醒项,按安装量在开发类的 21,746 个 Skill 里排第 13,888。

总安装 799周安装 32GitHub Stars 公开资料未说明下载 259核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/chouheiwa/skill-mermaid-render --skill mermaid-render

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合围绕仓库状态、代码变更或协作事项进行整理与分析。通过 npx 命令从 GitHub 仓库安装,需确认权限范围和维护状态。使用前建议核实是否会触发联网、命令执行或文件读写操作。

mermaid-render 属于开发类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/mermaid-render

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/chouheiwa/skill-mermaid-render --skill mermaid…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

mermaid-render 怎么安装?

在终端执行 npx skills add https://github.com/chouheiwa/skill-mermaid-render --skill mermaid-render。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

mermaid-render 支持哪些 AI 工具?

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

mermaid-render 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

mermaid-render 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

mermaid-render 用的人多吗?

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

mermaid-render 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

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

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
mermaid-render

Mermaid render 命令行 · 本页

799—操作浏览器未明确有提醒

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

SKILL.md 原文

Mermaid Render

Render Mermaid diagrams to SVG/PNG/PDF. Supports standard Mermaid output as well as hand-drawn (sketch) style via svg2roughjs — identical to Mermaid Live Editor's hand-drawn mode.

By default, hand-drawn style is enabled. Use --no-handdrawn for standard Mermaid output.

When to Use This Skill

  1. User asks to "render", "visualize", or "generate" a Mermaid diagram
  2. User provides.mmd files or Mermaid code blocks and needs output images
  3. User wants to "create a flowchart/sequence/state/class/ER diagram"
  4. User needs to extract and render diagrams from a Markdown document
  5. User wants to "batch process" a directory of.mmd files
  6. User mentions "hand-drawn", "sketch", or "rough" style — keep default or add --pencil-filter
  7. User wants clean/standard Mermaid output (no hand-drawn) — use --no-handdrawn

⚠️ Path Resolution (Important)

All scripts are located in the same directory as this SKILL.md. Before running any script, you must determine the actual path of this file and derive the script directory from it.

Rule: Replace every $SKILL_DIR placeholder in this document with the absolute path of the directory containing this SKILL.md file.

Example: if this file is at /path/to/mermaid-render/SKILL.md, then $SKILL_DIR = /path/to/mermaid-render.

SKILL_DIR="<absolute path to the directory containing this SKILL.md>"

Quick Start

Standard Mermaid output (no hand-drawn)

node "$SKILL_DIR/scripts/render.mjs" \
  --input diagram.mmd \
  --output diagram.svg \
  --no-handdrawn

Hand-drawn style (default)

node "$SKILL_DIR/scripts/render.mjs" \
  --input diagram.mmd \
  --output diagram.svg

Output as PNG (high resolution)

node "$SKILL_DIR/scripts/render.mjs" \
  --input diagram.mmd \
  --output diagram.png \
  --scale 2

Output as PDF

node "$SKILL_DIR/scripts/render.mjs" \
  --input diagram.mmd \
  --output diagram.pdf \
  --pdf-fit

Extract and render from Markdown

node "$SKILL_DIR/scripts/render.mjs" \
  --input document.md \
  --output ./output-dir

Batch render

node "$SKILL_DIR/scripts/batch.mjs" \
  --input-dir ./diagrams \
  --output-dir ./output

Workflow

Step 1: What does the user want?

  • Render existing Mermaid code → Save as.mmd file, use render.mjs
  • Extract diagrams from Markdown → Pass.md file directly
  • Create a new diagram → Refer to templates in $SKILL_DIR/assets/example_diagrams/
  • Batch process → Use batch.mjs

Step 2: Choose output style

  • Default (hand-drawn) — sketch/rough style via svg2roughjs, same as Mermaid Live Editor
  • --no-handdrawn — clean standard Mermaid output, no sketch effect

Step 3: Choose output format

  • svg — Vector, ideal for web and docs (default)
  • png — Bitmap, ideal for embedding and sharing (use --scale for resolution)
  • pdf — Ideal for printing (use --pdf-fit for auto-sizing)

Step 4: Choose theme

  • default — Mermaid default theme
  • neutral — Neutral tones, good for documentation
  • dark — Dark theme
  • forest — Green theme

Step 5: Render

node "$SKILL_DIR/scripts/render.mjs" -i input.mmd -o output.svg --theme neutral

Options

render.mjs

OptionDescriptionDefault
-i, --inputInput file (.mmd or.md)required
-o, --outputOutput file (.svg/.png/.pdf)required
-e, --formatOutput format: svg, png, pdfinferred from extension
-t, --themeMermaid themedefault
--bgBackground colortransparent
-w, --widthPage width800
-H, --heightPage height600
-s, --scaleScale factor (affects PNG resolution)1
-c, --configMermaid JSON config filenone
-C, --cssCustom CSS filenone
--pdf-fitFit PDF to diagram sizeoff
--icon-packsIcon packs, comma-separatednone
--fontFont family for hand-drawn modeExcalifont, Xiaolai, cursive
--pencil-filterEnable pencil filter effect (hand-drawn only)off
--randomizeEnable per-element randomization (causes variable hachure density)off
--seedRandom seednone
--roughnessRoughness level (hand-drawn only)rough.js default
--bowingBowing level (hand-drawn only)rough.js default
--hachure-gapGap between hachure lines in px (smaller = denser)2
--fill-weightWidth of hachure lines in px1.5
--no-handdrawnSkip hand-drawn conversion, output raw Mermaid SVGoff

batch.mjs

OptionDescriptionDefault
-i, --input-dirInput directoryrequired
-o, --output-dirOutput directoryrequired
-e, --formatOutput format: svg, png, pdfsvg
-t, --themeMermaid themedefault
--bgBackground colortransparent
-s, --scaleScale factor (affects PNG resolution)1
--fontFont family (hand-drawn mode)Excalifont, Xiaolai, cursive
--pencil-filterEnable pencil filter effectoff
--randomizeEnable per-element randomizationoff
--seedRandom seednone
--roughnessRoughness levelrough.js default
--bowingBowing levelrough.js default
--hachure-gapGap between hachure lines in px2
--fill-weightWidth of hachure lines in px1.5
--no-handdrawnSkip hand-drawn conversionoff
--concurrencyMax parallel renders3

Examples

Flowchart — standard style

node "$SKILL_DIR/scripts/render.mjs" \
  --input "$SKILL_DIR/assets/example_diagrams/flowchart.mmd" \
  --output flowchart.svg \
  --no-handdrawn

Flowchart — hand-drawn style

node "$SKILL_DIR/scripts/render.mjs" \
  --input "$SKILL_DIR/assets/example_diagrams/flowchart.mmd" \
  --output flowchart.svg

Sequence diagram (high-res PNG, neutral theme)

node "$SKILL_DIR/scripts/render.mjs" \
  --input "$SKILL_DIR/assets/example_diagrams/sequence.mmd" \
  --output sequence.png \
  --scale 2 --theme neutral

State diagram (auto-fit PDF)

node "$SKILL_DIR/scripts/render.mjs" \
  --input "$SKILL_DIR/assets/example_diagrams/state.mmd" \
  --output state.pdf \
  --pdf-fit --theme dark

Extract all diagrams from Markdown

# Single code block → single output file
node "$SKILL_DIR/scripts/render.mjs" -i doc.md -o diagram.svg

# Multiple code blocks → output to directory (auto-named doc-1.svg, doc-2.svg, ...)
node "$SKILL_DIR/scripts/render.mjs" -i doc.md -o ./output-dir

Custom Mermaid config

# config.json: { "theme": "neutral", "flowchart": { "curve": "basis" } }
node "$SKILL_DIR/scripts/render.mjs" \
  --input diagram.mmd \
  --output diagram.svg \
  --config config.json

Custom CSS

node "$SKILL_DIR/scripts/render.mjs" \
  --input diagram.mmd \
  --output diagram.svg \
  --css custom.css

Icon packs

node "$SKILL_DIR/scripts/render.mjs" \
  --input diagram.mmd \
  --output diagram.svg \
  --icon-packs @iconify-json/logos

Reproducible hand-drawn output (fixed seed)

node "$SKILL_DIR/scripts/render.mjs" \
  --input diagram.mmd \
  --output diagram.svg \
  --seed 42 --no-randomize

Pencil filter effect

node "$SKILL_DIR/scripts/render.mjs" \
  --input diagram.mmd \
  --output diagram.svg \
  --pencil-filter

Creating diagrams from user requirements

Step 1: Identify diagram type

  • Process / workflow → graph TD or flowchart LR
  • API / interaction → sequenceDiagram
  • State / lifecycle → stateDiagram-v2
  • Object model → classDiagram
  • Database → erDiagram
  • Timeline → timeline
  • Gantt / project → gantt
  • Mind map → mindmap

Step 2: Create.mmd file Refer to templates in $SKILL_DIR/assets/example_diagrams/.

Step 3: Render and iterate

node "$SKILL_DIR/scripts/render.mjs" -i diagram.mmd -o preview.svg
# Edit diagram.mmd based on feedback, re-render

Features

Mermaid rendering

  • All Mermaid diagram types supported (flowchart, sequence, state, class, ER, timeline, gantt, mindmap, etc.)
  • Output SVG / PNG / PDF
  • Markdown input support (auto-extracts mermaid code blocks)
  • CJK (Chinese/Japanese/Korean) text auto-optimization
  • Custom Mermaid config and CSS
  • Icon pack support (Iconify)
  • Custom themes: default, neutral, dark, forest

Hand-drawn style (default, disable with --no-handdrawn)

  • Identical to Mermaid Live Editor hand-drawn mode (powered by svg2roughjs)
  • Custom node colors (style directives) preserved
  • Pencil filter effect
  • Roughness and bowing controls
  • Reproducible output via seed parameter

Dependencies

  • Node.js 18+
  • puppeteer, svg2roughjs, and @mermaid-js/mermaid-cli (all installed via npm install)

Troubleshooting

mmdc not found

❌ @mermaid-js/mermaid-cli not found

Fix: npm install

puppeteer install fails

Puppeteer needs to download Chromium. Ensure network access. Manual install:

cd "$SKILL_DIR" && npm install

Mermaid syntax errors

Validate syntax at https://mermaid.live/ before rendering.


File structure

scripts/

  • render.mjs — Single-file renderer (SVG/PNG/PDF, Markdown input)
  • batch.mjs — Batch renderer

assets/

  • example_diagrams/flowchart.mmd — Flowchart template
  • example_diagrams/sequence.mmd — Sequence diagram template
  • example_diagrams/state.mmd — State diagram template

平台分布

Codex

35.53%
按下载量换算92

Claude

30.13%
按下载量换算78

Cursor

20.29%
按下载量换算53

Gemini CLI

9.29%
按下载量换算24

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

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

继续浏览同类 Skills