Chuyển đến nội dung
Skillpedia
Giao diện (UI/UX)5.5k · #14841

mermaid-visualizer

Skill này làm gì

Skill này dạy agent cách chuyển nội dung viết thành mã sơ đồ Mermaid. Skill tránh các lỗi cú pháp thường gặp, để sơ đồ hiển thị đúng trong các công cụ hỗ trợ Mermaid.

Khi nào nên dùng

  • ✓Khi người dùng muốn một lưu đồ hoặc sơ đồ quy trình được tạo từ văn bản.
  • ✓Khi người dùng muốn một kiến trúc hệ thống hoặc bảng so sánh được vẽ thành sơ đồ cho tài liệu.
  • ✓Khi người dùng cần sơ đồ tư duy hoặc sơ đồ hiển thị được trong GitHub hoặc Obsidian.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/breferrari/obsidian-mind/blob/main/.claude/skills/mermaid-visualizer/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tạo một lưu đồ Mermaid về quy trình đặt hàng của chúng tôi từ mô tả này, để tôi dán vào GitHub.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent xác định các bước và mối quan hệ chính, chọn loại sơ đồ, rồi viết mã Mermaid trong một khối mã. Agent tuân theo các quy tắc ngăn lỗi thường gặp để sơ đồ hiển thị đúng.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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:

  • `
Câu hỏi thường gặp

Những loại sơ đồ nào được hỗ trợ?

Skill bao phủ luồng quy trình, kiến trúc hệ thống, bảng so sánh, sơ đồ tư duy và nhiều loại khác.

Sơ đồ hiển thị ở đâu?

Skill nói cú pháp hoạt động trong Obsidian, GitHub và các công cụ tương thích Mermaid khác.

Bố cục mặc định là gì?

Mặc định là bố cục dọc, trừ khi người dùng yêu cầu bố cục ngang.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
5.5k
Vị trí xếp hạng
#14841
Giấy phép
MIT
Cập nhật
17/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự