跳到正文
Skillpedia
界面(UI/UX)5.5k · #14841

mermaid-visualizer

它能做什么

这项技能教智能体如何把文字内容转换成 Mermaid 图表代码。它能避免常见的语法错误,使图表在支持 Mermaid 的工具中正确显示。

适用场景

  • ✓当用户想把文字描述做成流程图或工艺流程图时。
  • ✓当用户需要把系统架构或对比内容画成图表,用于文档时。
  • ✓当用户需要一张可以在 GitHub 或 Obsidian 中显示的思维导图或图表时。

技能链接

https://github.com/breferrari/obsidian-mind/blob/main/.claude/skills/mermaid-visualizer/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/breferrari/obsidian-mind/blob/main/.claude/skills/mermaid-visualizer/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我把这段订单处理流程的描述做成 Mermaid 流程图,我想粘贴到 GitHub 里。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会找出关键步骤及其关系,选择图表类型,然后把 Mermaid 代码写在代码块中。它会遵守能防止常见错误的规则,确保图表正确渲染。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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<br/>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:

  • `
常见问题

支持哪些图表类型?

这项技能涵盖流程图、系统架构图、对比图、思维导图等。

图表可以在哪里显示?

技能说明,这种语法可以在 Obsidian、GitHub 以及其他支持 Mermaid 的工具中使用。

默认布局是什么?

默认是垂直布局,除非用户要求使用水平布局。

详情

作者的原始描述

Transform text content into professional Mermaid diagrams for presentations and documentation. Use when users ask to visualize concepts, create flowcharts, or make diagrams from text. Supports process flows, system architectures, comparisons, mindmaps, and more with built-in syntax error prevention.

repo: breferrari/obsidian-mind

热度

GitHub 星标
5.5k
排名
#14841
许可证
MIT
更新时间
2026/10/17

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能