Obsidian Canvas Architect
Status: Active
Author: Richard Fremmerlid
Domain: Obsidian Integration
Depends On: obsidian-vault-crud (WP06)
Purpose
Obsidian Canvas files (.canvas) 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.
JSON Canvas Spec 1.0 Overview
A .canvas file is JSON with two top-level arrays:
{
"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 |
text |
text, x, y, width, height |
Inline text content |
file |
file, x, y, width, height |
Reference to a vault note |
link |
url, x, y, width, height |
External URL |
group |
label, x, y, width, height |
Visual grouping container |
Edge Properties
| Field |
Required |
Description |
fromNode |
Yes |
Source node ID |
toNode |
Yes |
Target node ID |
fromSide |
No |
top, right, bottom, left |
toSide |
No |
top, right, bottom, left |
label |
No |
Edge label text |
Available Commands
Create a Canvas
python ./scripts/canvas_ops.py create --file <path.canvas>
Add a Node
python ./scripts/canvas_ops.py add-node \
--file <path.canvas> --type text --text "My Node" --x 100 --y 200
Add an Edge
python ./scripts/canvas_ops.py add-edge \
--file <path.canvas> --from-node id1 --to-node id2
Read a Canvas
python ./scripts/canvas_ops.py read --file <path.canvas>
Safety Guarantees
- All writes go through
obsidian-vault-crud atomic write protocol
- 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
1---2name: obsidian-canvas-architect-23description: Programmatically create and manipulate Obsidian Canvas (.canvas) files using JSON Canvas Spec 1.0. Enables agents to generate visual flowcharts, architecture diagrams, and planning boards. Use when creating or editing visual canvas files.4---5# Obsidian Canvas Architect67**Status:** Active8**Author:** Richard Fremmerlid9**Domain:** Obsidian Integration10**Depends On:** `obsidian-vault-crud` (WP06)1112## Purpose1314Obsidian Canvas files (`.canvas`) use the JSON Canvas Spec 1.0 to define visual15boards with nodes (text, file references, URLs) connected by directional edges.16This skill lets agents programmatically generate visual planning boards, architecture17diagrams, and execution flowcharts.1819## JSON Canvas Spec 1.0 Overview2021A `.canvas` file is JSON with two top-level arrays:2223```json24{25 "nodes": [26 {"id": "1", "type": "text", "text": "Hello", "x": 0, "y": 0, "width": 250, "height": 60},27 {"id": "2", "type": "file", "file": "path/to/note.md", "x": 300, "y": 0, "width": 250, "height": 60}28 ],29 "edges": [30 {"id": "e1", "fromNode": "1", "toNode": "2", "fromSide": "right", "toSide": "left"}31 ]32}33```3435### Node Types36| Type | Required Fields | Purpose |37|:-----|:---------------|:--------|38| `text` | `text`, `x`, `y`, `width`, `height` | Inline text content |39| `file` | `file`, `x`, `y`, `width`, `height` | Reference to a vault note |40| `link` | `url`, `x`, `y`, `width`, `height` | External URL |41| `group` | `label`, `x`, `y`, `width`, `height` | Visual grouping container |4243### Edge Properties44| Field | Required | Description |45|:------|:---------|:------------|46| `fromNode` | Yes | Source node ID |47| `toNode` | Yes | Target node ID |48| `fromSide` | No | `top`, `right`, `bottom`, `left` |49| `toSide` | No | `top`, `right`, `bottom`, `left` |50| `label` | No | Edge label text |5152## Available Commands5354### Create a Canvas55```bash56python ./scripts/canvas_ops.py create --file <path.canvas>57```5859### Add a Node60```bash61python ./scripts/canvas_ops.py add-node \62 --file <path.canvas> --type text --text "My Node" --x 100 --y 20063```6465### Add an Edge66```bash67python ./scripts/canvas_ops.py add-edge \68 --file <path.canvas> --from-node id1 --to-node id269```7071### Read a Canvas72```bash73python ./scripts/canvas_ops.py read --file <path.canvas>74```7576## Safety Guarantees77- All writes go through `obsidian-vault-crud` atomic write protocol78- Malformed JSON triggers a clean error report, never a crash79- Node IDs are auto-generated (UUID) to prevent collisions80- Schema validation ensures all required fields are present before write