Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计通过

pretty-mermaidpretty Mermaid 文档

Agent Skill

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

总安装

823

周安装

35

GitHub Stars

660

下载量

288
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/imxv/preety-mermaid-skills --skill pretty-mermaid

简介

该技能用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词、任务场景或来源线索快速定位候选结果。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装使用。
  • 安装前需确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。
  • 建议结合原始 README 文档进一步核验具体用法和功能边界。

SKILL.md

Pretty Mermaid

Render stunning, professionally-styled Mermaid diagrams with one command. Supports SVG for web/docs and ASCII for terminals.

Quick Start

Render a Single Diagram

From a file:

node scripts/render.mjs \
  --input diagram.mmd \
  --output diagram.svg \
  --format svg \
  --theme tokyo-night

From user-provided Mermaid code:

  1. Save the code to a .mmd file
  2. Run the render script with desired theme

Batch Render Multiple Diagrams

node scripts/batch.mjs \
  --input-dir ./diagrams \
  --output-dir ./output \
  --format svg \
  --theme dracula \
  --workers 4

ASCII Output (Terminal-Friendly)

node scripts/render.mjs \
  --input diagram.mmd \
  --format ascii \
  --use-ascii

Workflow Decision Tree

Step 1: What does the user want?

Step 2: Choose output format

  • SVG (web, docs, presentations) → --format svg
  • ASCII (terminal, logs, plain text) → --format ascii

Step 3: Select theme

  • Dark mode docstokyo-night (recommended)
  • Light mode docsgithub-light
  • Vibrant colorsdracula
  • See all themes → Run node scripts/themes.mjs

Rendering Diagrams

From File

When user provides a .mmd file or Mermaid code block:

  1. Save to file (if code block): cat > diagram.mmd << 'EOF' flowchart LR A[Start] --> B[End] EOF
  2. Render with theme: node scripts/render.mjs \ --input diagram.mmd \ --output diagram.svg \ --theme tokyo-night
  3. Verify output:

- SVG: Open in browser or embed in docs - ASCII: Display in terminal

Output Formats

SVG (Scalable Vector Graphics)

  • Best for: Web pages, documentation, presentations
  • Features: Full color support, transparency, scalable
  • Usage: --format svg --output diagram.svg

ASCII (Terminal Art)

  • Best for: Terminal output, plain text logs, README files
  • Features: Pure text, works anywhere, no dependencies
  • Usage: --format ascii (prints to stdout)
  • Options:

- --use-ascii - Use pure ASCII (no Unicode) - --padding-x 5 - Horizontal spacing - --padding-y 5 - Vertical spacing

Advanced Options

Custom Colors (overrides theme):

node scripts/render.mjs \
  --input diagram.mmd \
  --bg "#1a1b26" \
  --fg "#a9b1d6" \
  --accent "#7aa2f7" \
  --output custom.svg

Transparent Background:

node scripts/render.mjs \
  --input diagram.mmd \
  --transparent \
  --output transparent.svg

Custom Font:

node scripts/render.mjs \
  --input diagram.mmd \
  --font "JetBrains Mono" \
  --output custom-font.svg

Creating Diagrams

Using Templates

Step 1: List available templates

ls assets/example_diagrams/
# flowchart.mmd  sequence.mmd  state.mmd  class.mmd  er.mmd

Step 2: Copy and modify

cp assets/example_diagrams/flowchart.mmd my-workflow.mmd
# Edit my-workflow.mmd with user requirements

Step 3: Render

node scripts/render.mjs \
  --input my-workflow.mmd \
  --output my-workflow.svg \
  --theme github-dark

Diagram Type Reference

For detailed syntax and best practices, see DIAGRAM_TYPES.md.

Quick reference:

Flowchart - Processes, workflows, decision trees

flowchart LR
    A[Start] --> B{Decision}
    B -->|Yes| C[Action]
    B -->|No| D[End]

Sequence - API calls, interactions, message flows

sequenceDiagram
    User->>Server: Request
    Server-->>User: Response

State - Application states, lifecycle, FSM

stateDiagram-v2
    [*] --> Idle
    Idle --> Loading
    Loading --> [*]

Class - Object models, architecture, relationships

classDiagram
    User --> Post: creates
    Post --> Comment: has

ER - Database schema, data models

erDiagram
    USER ||--o{ ORDER : places
    ORDER ||--|{ ORDER_ITEM : contains

From User Requirements

Step 1: Identify diagram type

  • Process/workflow → Flowchart
  • API/interaction → Sequence
  • States/lifecycle → State
  • Object model → Class
  • Database → ER

Step 2: Create diagram file

cat > user-diagram.mmd << 'EOF'
# [Insert generated Mermaid code]
EOF

Step 3: Render and iterate

node scripts/render.mjs \
  --input user-diagram.mmd \
  --output preview.svg \
  --theme tokyo-night

# Review with user, edit diagram.mmd if needed, re-render

Theming

List Available Themes

node scripts/themes.mjs

Output:

Available Beautiful-Mermaid Themes:

 1. zinc-light
 2. zinc-dark
 3. tokyo-night
 4. tokyo-night-storm
 5. tokyo-night-light
 6. catppuccin-mocha
 7. catppuccin-latte
 8. nord
 9. nord-light
10. dracula
11. github-dark
12. github-light
13. solarized-dark
14. solarized-light
15. one-dark

Total: 15 themes

Theme Selection Guide

For dark mode documentation:

  • tokyo-night ⭐ - Modern, developer-friendly
  • github-dark - Familiar GitHub style
  • dracula - Vibrant, high contrast
  • nord - Cool, minimalist

For light mode documentation:

  • github-light - Clean, professional
  • zinc-light - High contrast, printable
  • catppuccin-latte - Warm, friendly

Detailed theme information: See THEMES.md

Apply Theme to Diagram

node scripts/render.mjs \
  --input diagram.mmd \
  --output themed.svg \
  --theme tokyo-night

Compare Themes

Render the same diagram with multiple themes:

for theme in tokyo-night dracula github-dark; do
  node scripts/render.mjs \
    --input diagram.mmd \
    --output "diagram-${theme}.svg" \
    --theme "$theme"
done

Batch Rendering

Batch Render Directory

Step 1: Organize diagrams

diagrams/
├── architecture.mmd
├── workflow.mmd
└── database.mmd

Step 2: Batch render

node scripts/batch.mjs \
  --input-dir ./diagrams \
  --output-dir ./rendered \
  --format svg \
  --theme tokyo-night \
  --workers 4

Output:

Found 3 diagram(s) to render...
✓ architecture.mmd
✓ workflow.mmd
✓ database.mmd

3/3 diagrams rendered successfully

Batch with Multiple Formats

Render both SVG and ASCII:

# SVG for docs
node scripts/batch.mjs \
  --input-dir ./diagrams \
  --output-dir ./svg \
  --format svg \
  --theme github-dark

# ASCII for README
node scripts/batch.mjs \
  --input-dir ./diagrams \
  --output-dir ./ascii \
  --format ascii \
  --use-ascii

Performance Options

  • --workers N - Parallel rendering (default: 4)
  • Recommended: --workers 8 for 10+ diagrams

Common Use Cases

1. Architecture Diagram for Documentation

# User provides architecture description
# → Create flowchart.mmd
# → Render with professional theme

node scripts/render.mjs \
  --input architecture.mmd \
  --output docs/architecture.svg \
  --theme github-dark \
  --transparent

2. API Sequence Diagram

# User describes API flow
# → Create sequence.mmd
# → Render with clear theme

node scripts/render.mjs \
  --input api-flow.mmd \
  --output api-sequence.svg \
  --theme tokyo-night

3. Database Schema Visualization

# User provides table definitions
# → Create er.mmd
# → Render for database docs

node scripts/render.mjs \
  --input schema.mmd \
  --output database-schema.svg \
  --theme dracula

4. Terminal-Friendly Workflow

# For README or terminal display
node scripts/render.mjs \
  --input workflow.mmd \
  --format ascii \
  --use-ascii > workflow.txt

5. Presentation Slides

# High-contrast for projectors
node scripts/render.mjs \
  --input slides-diagram.mmd \
  --output presentation.svg \
  --theme zinc-light

Troubleshooting

beautiful-mermaid Not Installed

Error: Cannot find module 'beautiful-mermaid'

Note: This should auto-install on first run. If it fails:

cd /path/to/pretty-mermaid-skill && npm install

Invalid Mermaid Syntax

Error: Parse error on line 3

Solution:

  1. Validate syntax against DIAGRAM_TYPES.md
  2. Test on https://mermaid.live/
  3. Check for common errors:

- Missing spaces in A --> B - Incorrect node shape syntax - Unclosed brackets

File Not Found

Error: Input file not found: diagram.mmd

Solution: Verify file path is correct, use absolute path if needed


Resources

scripts/

Executable Node.js scripts for rendering operations:

  • render.mjs - Main rendering script
  • batch.mjs - Batch processing script
  • themes.mjs - Theme listing utility

references/

Documentation to inform diagram creation:

  • THEMES.md - Detailed theme reference with examples
  • DIAGRAM_TYPES.md - Comprehensive syntax guide for all diagram types
  • api_reference.md - beautiful-mermaid API documentation

assets/

Template files for quick diagram creation:

  • example_diagrams/flowchart.mmd - Flowchart template
  • example_diagrams/sequence.mmd - Sequence diagram template
  • example_diagrams/state.mmd - State diagram template
  • example_diagrams/class.mmd - Class diagram template
  • example_diagrams/er.mmd - ER diagram template

Tips & Best Practices

Performance

  • Batch render for 3+ diagrams (parallel processing)
  • Keep diagrams under 50 nodes for fast rendering
  • Use ASCII for quick previews

Quality

  • Use tokyo-night or github-dark for technical docs
  • Add transparency for dark/light mode compatibility: --transparent
  • Test theme in target environment before batch rendering

Workflow

  1. Start with templates from assets/example_diagrams/
  2. Iterate with user feedback
  3. Apply theme last
  4. Render both SVG (docs) and ASCII (README) if needed

Accessibility

  • Use high-contrast themes for presentations
  • Add text labels to all connections
  • Avoid color-only information encoding

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

34.32%
按下载量换算99

Claude

30.75%
按下载量换算89

Cursor

20.46%
按下载量换算59

Gemini CLI

9.54%
按下载量换算27

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

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

安装前确认

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

来源信息

继续浏览同类 Skills