json-canvas
Create and edit JSON Canvas files (.canvas) with nodes, edges, groups, and connections. Use when working with .canvas files, creating visual canvases, mind maps, flowcharts, or when the user mentions Canvas files in Obsidian.
1How It Works & Mechanism
Define .canvas as a JSON file containing only two top-level arrays: nodes and edges (both optional).
- `nodes` (optional): Array of node objects
Nodes are divided into four types: text / file / link / group, each with specific additional fields (text, file+subpath, url, label/background).
- `group` - Visual container for other nodes
Nodes share required properties id/type/x/y/width/height and optional color; array order dictates z-index (bottom to top).
| `id` | Yes | string | Unique identifier for the node |
Edges connect nodes, supporting optional modifiers such as fromSide/toSide/fromEnd/toEnd/color/label.
| `toEnd` | No | string | `arrow` | Shape at edge end |
canvasColor supports hex values or preset numbers "1"-"6", with exact preset values intentionally left undefined.
Note: Specific color values for presets are intentionally undefined, allowing applications to use their own brand colors.
IDs are conventionally 16-character lowercase hexadecimal strings (64-bit random values) and must be globally unique.
This format is a 16-character lowercase hex string (64-bit random value).
Provide layout guidelines: coordinates can be negative, y increases downward, recommended size tables, 20-50px padding, and 50-100px node spacing.
- Space nodes 50-100px apart for readability
Include 8 validation rules at the end (unique id, valid references, required fields, valid enum values, etc.) and link to JSON Canvas Spec 1.0.
1. All `id` values must be unique across nodes and edges
2Core Capabilities
4Recommended Governance & Evidence
- SKILL.md: Pure prompt instructions and rule text; contains no script execution or external impacts
5Second-Pass Verification
- [ok] 是否存在可执行脚本 — 目录清单仅 SKILL.md;扫描「执行外部程序」0 命中。
- [ok] URL 命中性质 — §3 5 条 URL 均为规范链接(jsoncanvas.org/github.com/obsidianmd)或示例值(obsidian.md/example.com),非运行期请求。
- [ok] 凭证/环境变量 — 0 命中,正文无 env/keychain 读取。
- [ok] 写盘 — 0 命中;skill 只描述生成 JSON 内容,实际落盘由宿主完成。
- [ok] 能力声明与内容相符 — description 声称创建/编辑 .canvas,正文含完整节点/边/示例/校验,无夸大。
- [ok] 规范引用可定位 — 结尾 References 与开头 Overview 均指向 JSON Canvas Spec 1.0,口径一致。
6Verdict & Scenarios
c5f293ab4ece925e…