obsidian-canvas-architect
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDependencies
依赖项
This skill requires Python 3.8+ and standard library only. No external packages needed.
To install this skill's dependencies:
bash
pip-compile ./requirements.in
pip install -r ./requirements.txtSee for the dependency lockfile (currently empty — standard library only).
./requirements.txt本skill需要Python 3.8+,仅依赖标准库,无需外部包。
安装本skill的依赖项:
bash
pip-compile ./requirements.in
pip install -r ./requirements.txt查看获取依赖锁定文件(当前为空——仅使用标准库)。
./requirements.txtObsidian Canvas Architect
Obsidian Canvas Architect
Status: Active
Author: Richard Fremmerlid
Domain: Obsidian Integration
Depends On: (WP06)
obsidian-vault-crud状态: 活跃
作者: Richard Fremmerlid
领域: Obsidian集成
依赖: (WP06)
obsidian-vault-crudPurpose
用途
Obsidian Canvas files () use the JSON Canvas Spec 1.0 to define visual
boards with nodes (text, file references, URLs) connected by directional edges.
This skill lets agents programmatically generate visual planning boards, architecture
diagrams, and execution flowcharts.
.canvasObsidian Canvas文件()采用JSON Canvas Spec 1.0定义包含节点(文本、文件引用、URL)和定向连接边的可视化看板。本skill允许Agent以编程方式生成可视化规划看板、架构图和执行流程图。
.canvasJSON Canvas Spec 1.0 Overview
JSON Canvas Spec 1.0 概述
A file is JSON with two top-level arrays:
.canvasjson
{
"nodes": [
{"id": "1", "type": "text", "text": "Hello", "x": 0, "y": 0, "width": 250, "height": 60},
{"id": "2", "type": "file", "file": "path/to/note.md", "x": 300, "y": 0, "width": 250, "height": 60}
],
"edges": [
{"id": "e1", "fromNode": "1", "toNode": "2", "fromSide": "right", "toSide": "left"}
]
}.canvasjson
{
"nodes": [
{"id": "1", "type": "text", "text": "Hello", "x": 0, "y": 0, "width": 250, "height": 60},
{"id": "2", "type": "file", "file": "path/to/note.md", "x": 300, "y": 0, "width": 250, "height": 60}
],
"edges": [
{"id": "e1", "fromNode": "1", "toNode": "2", "fromSide": "right", "toSide": "left"}
]
}Node Types
节点类型
| Type | Required Fields | Purpose |
|---|---|---|
| | Inline text content |
| | Reference to a vault note |
| | External URL |
| | Visual grouping container |
| 类型 | 必填字段 | 用途 |
|---|---|---|
| | 内嵌文本内容 |
| | 引用库中的笔记 |
| | 外部URL |
| | 可视化分组容器 |
Edge Properties
边属性
| Field | Required | Description |
|---|---|---|
| Yes | Source node ID |
| Yes | Target node ID |
| No | |
| No | |
| No | Edge label text |
| 字段 | 是否必填 | 描述 |
|---|---|---|
| 是 | 源节点ID |
| 是 | 目标节点ID |
| 否 | |
| 否 | |
| 否 | 边的标签文本 |
Available Commands
可用命令
Create a Canvas
创建画布
bash
python ./canvas_ops.py create --file <path.canvas>bash
python ./canvas_ops.py create --file <path.canvas>Add a Node
添加节点
bash
python ./canvas_ops.py add-node \
--file <path.canvas> --type text --text "My Node" --x 100 --y 200bash
python ./canvas_ops.py add-node \
--file <path.canvas> --type text --text "My Node" --x 100 --y 200Add an Edge
添加边
bash
python ./canvas_ops.py add-edge \
--file <path.canvas> --from-node id1 --to-node id2bash
python ./canvas_ops.py add-edge \
--file <path.canvas> --from-node id1 --to-node id2Read a Canvas
读取画布
bash
python ./canvas_ops.py read --file <path.canvas>bash
python ./canvas_ops.py read --file <path.canvas>Safety Guarantees
安全保障
- All writes go through atomic write protocol
obsidian-vault-crud - Malformed JSON triggers a clean error report, never a crash
- Node IDs are auto-generated (UUID) to prevent collisions
- Schema validation ensures all required fields are present before write
- 所有写入操作均通过原子写入协议执行
obsidian-vault-crud - 格式错误的JSON会触发清晰的错误报告,不会导致崩溃
- 节点ID自动生成(UUID)以避免冲突
- 在写入前会进行 Schema 验证,确保所有必填字段均已存在