Using Mermaid in Observable Framework for diagrams and flowcharts.
Observable Framework documentation: Library: Mermaid Source: https://observablehq.com/framework/lib-mermaid
Mermaid is a language for expressing node-link diagrams, flowcharts, sequence diagrams, and many other types of visualizations. (See also DOT.) Observable provides a mermaid tagged template literal for convenience. This is available by default in Markdown, or you can import it like so:
import mermaid from "npm:@observablehq/mermaid";
To use in a JavaScript code block:
mermaid`graph TD;
A-->B;
A-->C;
B-->D;
C-->D;`
You can also write Mermaid in a mermaid fenced code block:
```mermaid
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
```
This produces:
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
Here are some more examples.
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts <br/>prevail!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
classDiagram
Class01 <|-- AveryLongClass : Cool
Class03 *-- Class04
Class05 o-- Class06
Class07 .. Class08
Class09 --> C2 : Where am i?
Class09 --* C3
Class09 --|> Class07
Class07 : equals()
Class07 : Object[] elementData
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class08 <--> C2: Cool label
npx skills add spqw/用于 Observable 框架的 Mermaid 库下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer