← 返回 Skills 市场
axtonliu

Mermaid Visualizer

作者 Axton · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
369
总下载
0
收藏
7
当前安装
2
版本数
在 OpenClaw 中安装
/install mermaid-visualizer
功能描述
Transform text content into professional Mermaid diagrams for presentations and documentation. Use when users ask to visualize concepts, create flowcharts, o...
使用说明 (SKILL.md)

Mermaid Visualizer

Overview

Convert text content into clean, professional Mermaid diagrams optimized for presentations and documentation. Automatically handles common syntax pitfalls (list syntax conflicts, subgraph naming, spacing issues) to ensure diagrams render correctly in Obsidian, GitHub, and other Mermaid-compatible platforms.

Quick Start

When creating a Mermaid diagram:

  1. Analyze the content - Identify key concepts, relationships, and flow
  2. Choose diagram type - Select the most appropriate visualization (see Diagram Types below)
  3. Select configuration - Determine layout, detail level, and styling
  4. Generate diagram - Create syntactically correct Mermaid code
  5. Output in markdown - Wrap in proper code fence with optional explanation

Default assumptions:

  • Vertical layout (TB) unless horizontal requested
  • Medium detail level (balanced between simplicity and information)
  • Professional color scheme with semantic colors
  • Obsidian/GitHub compatible syntax

Diagram Types

1. Process Flow (graph TB/LR)

Best for: Workflows, decision trees, sequential processes, AI agent architectures

Use when: Content describes steps, stages, or a sequence of actions

Key features:

  • Swimlanes via subgraph for grouping related steps
  • Arrow labels for transitions
  • Feedback loops and branches
  • Color-coded stages

Configuration options:

  • layout: "vertical" (TB), "horizontal" (LR)
  • detail: "simple" (core steps only), "standard" (with descriptions), "detailed" (with annotations)
  • style: "minimal", "professional", "colorful"

2. Circular Flow (graph TD with circular layout)

Best for: Cyclic processes, continuous improvement loops, agent feedback systems

Use when: Content emphasizes iteration, feedback, or circular relationships

Key features:

  • Central hub with radiating elements
  • Curved feedback arrows
  • Clear cycle indicators

3. Comparison Diagram (graph TB with parallel paths)

Best for: Before/after comparisons, A vs B analysis, traditional vs modern systems

Use when: Content contrasts two or more approaches or systems

Key features:

  • Side-by-side layout
  • Central comparison node
  • Clear differentiation via color/style

4. Mindmap

Best for: Hierarchical concepts, knowledge organization, topic breakdowns

Use when: Content is hierarchical with clear parent-child relationships

Key features:

  • Radial tree structure
  • Multiple levels of nesting
  • Clean visual hierarchy

5. Sequence Diagram

Best for: Interactions between components, API calls, message flows

Use when: Content involves communication between actors/systems over time

Key features:

  • Timeline-based layout
  • Clear actor separation
  • Activation boxes for processes

6. State Diagram

Best for: System states, status transitions, lifecycle stages

Use when: Content describes states and transitions between them

Key features:

  • Clear state nodes
  • Labeled transitions
  • Start and end states

Critical Syntax Rules

Always follow these rules to prevent parsing errors:

Rule 1: Avoid List Syntax Conflicts

❌ WRONG: [1. Perception]       → Triggers "Unsupported markdown: list"
✅ RIGHT: [1.Perception]         → Remove space after period
✅ RIGHT: [① Perception]         → Use circled numbers (①②③④⑤⑥⑦⑧⑨⑩)
✅ RIGHT: [(1) Perception]       → Use parentheses
✅ RIGHT: [Step 1: Perception]   → Use "Step" prefix

Rule 2: Subgraph Naming

❌ WRONG: subgraph AI Agent Core  → Space in name without quotes
✅ RIGHT: subgraph agent["AI Agent Core"]  → Use ID with display name
✅ RIGHT: subgraph agent          → Use simple ID only

Rule 3: Node References

❌ WRONG: Title --> AI Agent Core  → Reference display name directly
✅ RIGHT: Title --> agent          → Reference subgraph ID

Rule 4: Special Characters in Node Text

✅ Use quotes for text with spaces: ["Text with spaces"]
✅ Escape or avoid: quotation marks → use 『』instead
✅ Escape or avoid: parentheses → use 「」instead
✅ Line breaks in circle nodes only: ((Text\x3Cbr/>Break))

Rule 5: Arrow Types

  • --> solid arrow
  • -.-> dashed arrow (for supporting systems, optional paths)
  • ==> thick arrow (for emphasis)
  • ~~~ invisible link (for layout only)

For complete syntax reference and edge cases, see references/syntax-rules.md

Configuration Options

All diagrams accept these parameters:

Layout:

  • direction: "vertical" (TB), "horizontal" (LR), "right-to-left" (RL), "bottom-to-top" (BT)
  • aspect: "portrait" (default), "landscape" (wide), "square"

Detail Level:

  • simple: Core elements only, minimal labels
  • standard: Balanced detail with key descriptions (default)
  • detailed: Full annotations, explanations, and metadata
  • presentation: Optimized for slides (larger text, fewer details)

Style:

  • minimal: Monochrome, clean lines
  • professional: Semantic colors, clear hierarchy (default)
  • colorful: Vibrant colors, high contrast
  • academic: Formal styling for papers/documentation

Additional Options:

  • show_legend: true/false - Include color/symbol legend
  • numbered: true/false - Add sequence numbers to steps
  • title: string - Add diagram title

Example Usage Patterns

Pattern 1: Basic request

User: "Visualize the software development lifecycle"
Response: [Analyze → Choose graph TB → Generate with standard detail]

Pattern 2: With configuration

User: "Create a horizontal flowchart of our sales process with lots of detail"
Response: [Analyze → Choose graph LR → Generate with detailed level]

Pattern 3: Comparison

User: "Compare traditional AI vs AI agents"
Response: [Analyze → Choose comparison layout → Generate with contrasting styles]

Workflow

  1. Understand the content

    • Identify main concepts, entities, and relationships
    • Determine hierarchy or sequence
    • Note any comparisons or contrasts
  2. Select diagram type

    • Match content structure to diagram type
    • Consider user's presentation context
    • Default to process flow if ambiguous
  3. Choose configuration

    • Apply user-specified options
    • Use sensible defaults for unspecified options
    • Optimize for readability
  4. Generate Mermaid code

    • Follow all syntax rules strictly
    • Use semantic naming (descriptive IDs)
    • Apply consistent styling
    • Test for common errors:
      • No "number. space" patterns in node text
      • All subgraphs use ID["display name"] format
      • All node references use IDs not display names
  5. Output with context

    • Wrap in ```mermaid code fence
    • Add brief explanation of diagram structure
    • Mention rendering compatibility (Obsidian, GitHub, etc.)
    • Offer to adjust or create variations

Color Scheme Defaults

Standard professional palette:

  • Green (#d3f9d8/#2f9e44): Input, perception, start states
  • Red (#ffe3e3/#c92a2a): Planning, decision points
  • Purple (#e5dbff/#5f3dc4): Processing, reasoning
  • Orange (#ffe8cc/#d9480f): Actions, tool usage
  • Cyan (#c5f6fa/#0c8599): Output, execution, results
  • Yellow (#fff4e6/#e67700): Storage, memory, data
  • Pink (#f3d9fa/#862e9c): Learning, optimization
  • Blue (#e7f5ff/#1971c2): Metadata, definitions, titles
  • Gray (#f8f9fa/#868e96): Neutral elements, traditional systems

Common Patterns

Swimlane Pattern (Grouping)

graph TB
    subgraph core["Core Process"]
        A --> B --> C
    end
    subgraph support["Supporting Systems"]
        D
        E
    end
    core -.-> support

Feedback Loop Pattern

graph TB
    A[Start] --> B[Process]
    B --> C[End]
    C -.->|Feedback| A

Hub and Spoke Pattern

graph TB
    Central[Hub]
    A[Spoke 1] --> Central
    B[Spoke 2] --> Central
    C[Spoke 3] --> Central

Quality Checklist

Before outputting, verify:

  • No "number. space" patterns in any node text
  • All subgraphs use proper ID syntax
  • All arrows use correct syntax (-->, -.->)
  • Colors applied consistently
  • Layout direction specified
  • Style declarations present
  • No ambiguous node references
  • Compatible with Obsidian/GitHub renderers
  • No Emoji in any node text - use text labels or color coding instead

References

For detailed syntax rules and troubleshooting, see:

安全使用建议
This skill is instruction-only and appears coherent for turning text into Mermaid diagrams. Before installing: (1) Review the included SKILL.md/README (you already have them) and confirm you trust the GitHub repo owner if you plan to clone the project. (2) Install only via the plugin marketplace or by manually copying files into your own ~/.claude/skills directory — avoid running arbitrary install scripts. (3) The skill does not ask for credentials, but avoid pasting sensitive secrets into prompts (diagrams you generate may include any text you provide). (4) Note the project is marked 'experimental' and may not be actively maintained; test on non-critical inputs first and verify outputs render in your target platform (Obsidian/GitHub) before using in production.
功能分析
Type: OpenClaw Skill Name: mermaid-visualizer Version: 1.0.1 The mermaid-visualizer skill bundle is a legitimate tool designed to help AI agents generate syntactically correct Mermaid diagrams. The instructions in SKILL.md and references/syntax-rules.md focus entirely on improving diagram quality and avoiding common parsing errors (e.g., Markdown list conflicts). There is no evidence of data exfiltration, malicious execution, or prompt injection attempts.
能力评估
Purpose & Capability
Name and description (Mermaid diagram generation) match the SKILL.md content and README. The skill declares no binaries, env vars, or credentials and the instructions only cover parsing text into Mermaid code and syntax rules — all appropriate for the stated purpose.
Instruction Scope
SKILL.md is focused on analyzing user text, choosing diagram types, generating Mermaid code, and outputting Markdown fences. It does not instruct the agent to read unrelated system files, access credentials, or transmit data to external endpoints. The README does include optional manual install steps (git clone + cp into ~/.claude/skills) — normal for user-controlled installation but not part of the runtime instructions.
Install Mechanism
There is no install spec in the registry metadata (instruction-only skill), which limits risk. The README mentions installing via a plugin marketplace or cloning from GitHub and copying into ~/.claude/skills; cloning a public GitHub repo is standard but requires trusting the repository owner. No opaque download URLs or archive extraction are used.
Credentials
The skill requests no environment variables, credentials, or config paths. The README notes optional network behavior for Excalidraw fonts (not part of the Mermaid skill itself) which is explanatory rather than a runtime requirement for Mermaid diagram generation.
Persistence & Privilege
The skill does not request 'always: true' and is user-invocable. Manual install requires placing files under the user's Claude Code skills directory (~/.claude/skills), which is standard for user-installed skills and not a cross-skill privileged modification. Autonomous invocation by the model is the platform default and not unique to this skill.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install mermaid-visualizer
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /mermaid-visualizer 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Added comprehensive English documentation (README.md) for setup and usage instructions. - Added Chinese-language documentation (README_CN.md) for broader accessibility. - No changes to core logic or configuration—this update is documentation only.
v1.0.0
Mermaid-Visualizer 1.0.0 – Initial release - Transforms text into professional Mermaid diagrams for clear visualization of workflows, systems, hierarchies, and comparisons. - Supports multiple diagram types: process flow, circular flow, comparisons, mindmaps, sequence diagrams, and state diagrams. - Automatically applies syntax error prevention, including handling list conflicts and proper subgraph/node references. - Provides configurable layout, detail, style, and color scheme options for compatibility with Obsidian, GitHub, and more. - Includes comprehensive usage patterns, workflow steps, and critical syntax rules for reliable output.
元数据
Slug mermaid-visualizer
版本 1.0.1
许可证 MIT-0
累计安装 8
当前安装数 7
历史版本数 2
常见问题

Mermaid Visualizer 是什么?

Transform text content into professional Mermaid diagrams for presentations and documentation. Use when users ask to visualize concepts, create flowcharts, o... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 369 次。

如何安装 Mermaid Visualizer?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install mermaid-visualizer」即可一键安装,无需额外配置。

Mermaid Visualizer 是免费的吗?

是的,Mermaid Visualizer 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Mermaid Visualizer 支持哪些平台?

Mermaid Visualizer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Mermaid Visualizer?

由 Axton(@axtonliu)开发并维护,当前版本 v1.0.1。

💬 留言讨论