obsidian-mermaid
npx skills add https://github.com/jykim/claude-obsidian-skills --skill obsidian-mermaid
Agent 安装分布
Skill 文档
Obsidian Mermaid Diagrams
Create Mermaid diagrams that render correctly in Obsidian and publish without issues.
When to Use This Skill
Activate when you need to:
- Create flowcharts, sequence diagrams, ER diagrams
- Convert ASCII art to Mermaid
- Fix Mermaid rendering errors in Obsidian
Core Principle: Simplicity First
ë¤ì´ì´ê·¸ë¨ì íëì ë¤ì´ìì¼ íë¤
ë³µì¡í ë¤ì´ì´ê·¸ë¨ì ì½ê¸° ì´ë µë¤. íì ìµìíì ë ¸ëì ì°ê²°ë¡ íµì¬ë§ íííë¼.
Node Minimization
Before (9ê° ë ¸ë):
flowchart LR
A[ìì§] --> B[ì 리] --> C[ë³´ê´]
D[목í] --> E[íìµ] --> F[ì¤í] --> G[측ì ] --> H[ë¬ì±]
After (2ê° ë ¸ë – ìì°¨ íë¦ì ë ¸ë ë´ í ì¤í¸ë¡):
flowchart LR
A[ìì§ â ì 리 â ë³´ê´]
B[목í â íìµ â ì¤í â ë¬ì±]
Connection Minimization
- íµì¬ íë¦ë§ íí, ì¸ë¶ì¬íì 본문ìì ì¤ëª
- ë ¸ë 5ê° ì´í, ì°ê²°ì êµì°¨ ê¸ì§
- ë³µì¡í ê´ê³ë ì¬ë¬ ê°ì ë¨ìí ë¤ì´ì´ê·¸ë¨ì¼ë¡ ë¶ë¦¬
Table vs Mermaid ì í
| íì | ì©ë | ìì |
|---|---|---|
| í ì´ë¸ | ìì±-ê° ë§¤í, ë¹êµ, ìµì | ìëì§ ë ë²¨ë³ ìì |
| Mermaid | íë¦, íë¡ì¸ì¤, í¼ëë°± 루í | ì ë ¥âì²ë¦¬âì¶ë ¥ |
| ì¸ë¼ì¸ | ë¨ì ìì°¨ íë¦ | A â B â C |
ìì¹: ê°ì ì 보를 ë ì»´í©í¸íê² íííë íì ì í
Critical Rules
1. NO Markdown in Labels
Common Errors:
Node["1. First"] â "Unsupported markdown: list"
Node["Text<br/>More"] â "Unsupported markdown: heading"
Node["## Header"] â "Unsupported markdown: heading"
Correct:
Node[First]
Node[Text]
Rule: Keep labels plain text. Move complex descriptions outside the diagram.
2. Prefer Square Layout (ì ì¬ê°í ë ì´ìì)
Problem: flowchart LRì ë무 ëê³ , flowchart TBë ë무 길ì´ì§ë¤.
Solution: TB + ë´ë¶ LR ì¡°í©ì¼ë¡ ì ì¬ê°íì ê°ê¹ì´ ë ì´ìì ë§ë¤ê¸°
flowchart TB
subgraph Layer1["ë ì´ì´ 1"]
direction LR
A[í목A] ~~~ B[í목B] ~~~ C[í목C]
end
subgraph Layer2["ë ì´ì´ 2"]
direction LR
D[í목D] ~~~ E[í목E]
end
Layer1 --> Layer2
í¨í´:
flowchart TB: ì ì²´ íë¦ì ìâìëdirection LR: ê° subgraph ë´ë¶ë ê°ë¡ ë°°ì¹~~~: ë³´ì´ì§ ìë ì°ê²° (íì´í ìì´ ì ë ¬ì©)
Rule: ì¸ë¡ë¡ ë무 길ì´ì§ë©´ subgraph + direction LR ì¬ì©.
3. Keep Labels Short
â Too long:
Node["This is a very long description that will break layout"]
â
Short and clear:
Node[Short Label]
Rule: Labels should be under 15 characters. Add details in text below the diagram.
4. Avoid Special Characters in Subgraph Names
â May cause issues:
subgraph "1. Phase One"
subgraph "Phase: Setup"
â
Safe:
subgraph Phase_One["Phase One"]
subgraph Setup["Setup Phase"]
Good Examples
Simple Flowchart
flowchart TB
A[Start] --> B{Decision}
B -->|Yes| C[Action]
B -->|No| D[End]
Process Flow with Details Outside
flowchart TB
Input[Input] --> Process[Process]
Process --> Output[Output]
Process Details:
- Input: User data from form
- Process: Validation and transformation
- Output: Saved to database
Subgraph Example
flowchart TB
subgraph Frontend["Frontend"]
UI[UI] --> API[API Call]
end
subgraph Backend["Backend"]
Server[Server] --> DB[Database]
end
API --> Server
Bad Examples (Don’t Do This)
Markdown in Labels
flowchart LR
A["1. Start<br/>with details"] --> B{"2. Decision"}
This will show “Unsupported markdown” errors.
Too Wide
flowchart LR
A[Very Long Process Name Here] --> B[Another Long Name] --> C[Yet Another] --> D[And More]
This gets cut off on mobile and narrow screens.
Converting ASCII to Mermaid
ASCII Art:
âââââââââ âââââââââ
â Start âââââââ End â
âââââââââ âââââââââ
Mermaid:
flowchart TB
Start[Start] --> End[End]
Quality Checklist
Before completing diagram creation:
- No
<br/>tags in node labels - No numbered list format (
1.,2.) in labels - ì ì¬ê°í ë ì´ìì: TB + subgraph ë´ LR ì¡°í© ì¬ì©
- All labels are short (under 15 characters)
- Complex details moved to text outside diagram
- No special characters in subgraph names
- Tested rendering in Obsidian preview