Obsidian Canvas Skill
Obsidian Canvas uses the JSON Canvas Spec 1.0 — an open JSON-based format for infinite canvas data. Canvas files use the .canvas extension.
File Structure
{
"nodes": [],
"edges": []
}
Nodes
Four node types: text, file, link, group. Nodes are z-ordered by array position (first = bottom, last = top).
Common Attributes (all nodes)
| Attribute |
Required |
Type |
Description |
id |
Yes |
string |
Unique 16-char hex identifier |
type |
Yes |
string |
text, file, link, or group |
x |
Yes |
integer |
X position in pixels |
y |
Yes |
integer |
Y position in pixels |
width |
Yes |
integer |
Width in pixels |
height |
Yes |
integer |
Height in pixels |
color |
No |
canvasColor |
Preset "1"-"6" or hex "#FF0000" |
Text Nodes
{
"id": "6f0ad84f44ce9c17",
"type": "text",
"x": 0, "y": 0, "width": 400, "height": 200,
"text": "# Hello World\n\nThis is **Markdown** content."
}
| Attribute |
Required |
Description |
text |
Yes |
Plain text with Markdown syntax |
Newline pitfall: Use \n in JSON strings, not \\n — Obsidian renders \\n as literal characters.
File Nodes
{
"id": "a1b2c3d4e5f67890",
"type": "file",
"x": 500, "y": 0, "width": 400, "height": 300,
"file": "Attachments/diagram.png",
"subpath": "#Implementation"
}
| Attribute |
Required |
Description |
file |
Yes |
Path to file within the system |
subpath |
No |
Link to heading or block (starts with #) |
Link Nodes
{
"id": "c3d4e5f678901234",
"type": "link",
"x": 1000, "y": 0, "width": 400, "height": 200,
"url": "https://obsidian.md"
}
| Attribute |
Required |
Description |
url |
Yes |
External URL |
Group Nodes
{
"id": "d4e5f6789012345a",
"type": "group",
"x": -50, "y": -50, "width": 1000, "height": 600,
"label": "Project Overview",
"color": "4",
"background": "Attachments/bg.png",
"backgroundStyle": "cover"
}
| Attribute |
Required |
Description |
label |
No |
Text label |
background |
No |
Path to background image |
backgroundStyle |
No |
cover, ratio, or repeat |
Edges
{
"id": "0123456789abcdef",
"fromNode": "6f0ad84f44ce9c17",
"fromSide": "right",
"fromEnd": "none",
"toNode": "b2c3d4e5f6789012",
"toSide": "left",
"toEnd": "arrow",
"color": "1",
"label": "leads to"
}
| Attribute |
Required |
Default |
Description |
id |
Yes |
- |
Unique identifier |
fromNode |
Yes |
- |
Source node ID |
fromSide |
No |
- |
top, right, bottom, left |
fromEnd |
No |
none |
none or arrow |
toNode |
Yes |
- |
Target node ID |
toSide |
No |
- |
top, right, bottom, left |
toEnd |
No |
arrow |
none or arrow |
color |
No |
- |
Line color |
label |
No |
- |
Text label |
Colors
| Preset |
Color |
"1" |
Red |
"2" |
Orange |
"3" |
Yellow |
"4" |
Green |
"5" |
Cyan |
"6" |
Purple |
Or use hex: "#FF0000". Preset color values are intentionally undefined — apps use their own brand colors.
ID Generation
16-character lowercase hex string (64-bit random value): "6f0ad84f44ce9c17"
Layout Guidelines
- Coordinates can be negative (canvas extends infinitely)
x increases right, y increases downward, position = top-left corner
- Suggested node widths: 200-300 (small), 300-450 (medium), 400-600 (large)
- Leave 20-50px padding inside groups, 50-100px between nodes
- Align to grid (multiples of 10 or 20) for cleaner layouts
Validation Rules
- All
id values must be unique across nodes and edges
fromNode and toNode must reference existing node IDs
- Required fields must be present for each node type
type must be one of: text, file, link, group
backgroundStyle must be one of: cover, ratio, repeat
fromSide, toSide must be one of: top, right, bottom, left
fromEnd, toEnd must be one of: none, arrow
- Color presets must be
"1" through "6" or valid hex color
For complete worked examples (mind map, project board, research canvas, flowchart), see references/examples.md.
When To Use
- When creating or editing
.canvas files for Obsidian or compatible apps
- When building visual canvases, mind maps, flowcharts, or project boards
- When the user mentions Canvas files, infinite canvas, or Obsidian canvas
Boundaries
- Not for general JSON editing unrelated to the JSON Canvas spec
- Not for Mermaid, PlantUML, or other diagram-as-code formats
- Not for Obsidian plugin development or vault configuration
- Skip when the user needs interactive canvas editing — this skill produces static
.canvas files
Output
- Valid
.canvas files conforming to JSON Canvas Spec 1.0
- Nodes with unique 16-character hex IDs positioned on a coordinate grid
- Edges referencing valid node IDs with optional labels, colors, and side/end attributes
References
Sibling skills
Three Obsidian-format references, distinguished by file type.
obsidian-markdown — .md notes. Use for note authoring; canvases reference notes as nodes.
obsidian-bases — .base database views. Orthogonal.
1---2name: obsidian-canvas3description: Create and edit Obsidian 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.4---56# Obsidian Canvas Skill78Obsidian Canvas uses the [JSON Canvas Spec 1.0](https://jsoncanvas.org/spec/1.0/) — an open JSON-based format for infinite canvas data. Canvas files use the `.canvas` extension.910## File Structure1112```json13{14 "nodes": [],15 "edges": []16}17```1819## Nodes2021Four node types: `text`, `file`, `link`, `group`. Nodes are z-ordered by array position (first = bottom, last = top).2223### Common Attributes (all nodes)2425| Attribute | Required | Type | Description |26|-----------|----------|------|-------------|27| `id` | Yes | string | Unique 16-char hex identifier |28| `type` | Yes | string | `text`, `file`, `link`, or `group` |29| `x` | Yes | integer | X position in pixels |30| `y` | Yes | integer | Y position in pixels |31| `width` | Yes | integer | Width in pixels |32| `height` | Yes | integer | Height in pixels |33| `color` | No | canvasColor | Preset `"1"`-`"6"` or hex `"#FF0000"` |3435### Text Nodes3637```json38{39 "id": "6f0ad84f44ce9c17",40 "type": "text",41 "x": 0, "y": 0, "width": 400, "height": 200,42 "text": "# Hello World\n\nThis is **Markdown** content."43}44```4546| Attribute | Required | Description |47|-----------|----------|-------------|48| `text` | Yes | Plain text with Markdown syntax |4950**Newline pitfall:** Use `\n` in JSON strings, not `\\n` — Obsidian renders `\\n` as literal characters.5152### File Nodes5354```json55{56 "id": "a1b2c3d4e5f67890",57 "type": "file",58 "x": 500, "y": 0, "width": 400, "height": 300,59 "file": "Attachments/diagram.png",60 "subpath": "#Implementation"61}62```6364| Attribute | Required | Description |65|-----------|----------|-------------|66| `file` | Yes | Path to file within the system |67| `subpath` | No | Link to heading or block (starts with `#`) |6869### Link Nodes7071```json72{73 "id": "c3d4e5f678901234",74 "type": "link",75 "x": 1000, "y": 0, "width": 400, "height": 200,76 "url": "https://obsidian.md"77}78```7980| Attribute | Required | Description |81|-----------|----------|-------------|82| `url` | Yes | External URL |8384### Group Nodes8586```json87{88 "id": "d4e5f6789012345a",89 "type": "group",90 "x": -50, "y": -50, "width": 1000, "height": 600,91 "label": "Project Overview",92 "color": "4",93 "background": "Attachments/bg.png",94 "backgroundStyle": "cover"95}96```9798| Attribute | Required | Description |99|-----------|----------|-------------|100| `label` | No | Text label |101| `background` | No | Path to background image |102| `backgroundStyle` | No | `cover`, `ratio`, or `repeat` |103104## Edges105106```json107{108 "id": "0123456789abcdef",109 "fromNode": "6f0ad84f44ce9c17",110 "fromSide": "right",111 "fromEnd": "none",112 "toNode": "b2c3d4e5f6789012",113 "toSide": "left",114 "toEnd": "arrow",115 "color": "1",116 "label": "leads to"117}118```119120| Attribute | Required | Default | Description |121|-----------|----------|---------|-------------|122| `id` | Yes | - | Unique identifier |123| `fromNode` | Yes | - | Source node ID |124| `fromSide` | No | - | `top`, `right`, `bottom`, `left` |125| `fromEnd` | No | `none` | `none` or `arrow` |126| `toNode` | Yes | - | Target node ID |127| `toSide` | No | - | `top`, `right`, `bottom`, `left` |128| `toEnd` | No | `arrow` | `none` or `arrow` |129| `color` | No | - | Line color |130| `label` | No | - | Text label |131132## Colors133134| Preset | Color |135|--------|-------|136| `"1"` | Red |137| `"2"` | Orange |138| `"3"` | Yellow |139| `"4"` | Green |140| `"5"` | Cyan |141| `"6"` | Purple |142143Or use hex: `"#FF0000"`. Preset color values are intentionally undefined — apps use their own brand colors.144145## ID Generation14614716-character lowercase hex string (64-bit random value): `"6f0ad84f44ce9c17"`148149## Layout Guidelines150151- Coordinates can be negative (canvas extends infinitely)152- `x` increases right, `y` increases downward, position = top-left corner153- Suggested node widths: 200-300 (small), 300-450 (medium), 400-600 (large)154- Leave 20-50px padding inside groups, 50-100px between nodes155- Align to grid (multiples of 10 or 20) for cleaner layouts156157## Validation Rules1581591. All `id` values must be unique across nodes and edges1602. `fromNode` and `toNode` must reference existing node IDs1613. Required fields must be present for each node type1624. `type` must be one of: `text`, `file`, `link`, `group`1635. `backgroundStyle` must be one of: `cover`, `ratio`, `repeat`1646. `fromSide`, `toSide` must be one of: `top`, `right`, `bottom`, `left`1657. `fromEnd`, `toEnd` must be one of: `none`, `arrow`1668. Color presets must be `"1"` through `"6"` or valid hex color167168For complete worked examples (mind map, project board, research canvas, flowchart), see `references/examples.md`.169170## When To Use171172- When creating or editing `.canvas` files for Obsidian or compatible apps173- When building visual canvases, mind maps, flowcharts, or project boards174- When the user mentions Canvas files, infinite canvas, or Obsidian canvas175176## Boundaries177178- Not for general JSON editing unrelated to the JSON Canvas spec179- Not for Mermaid, PlantUML, or other diagram-as-code formats180- Not for Obsidian plugin development or vault configuration181- Skip when the user needs interactive canvas editing — this skill produces static `.canvas` files182183## Output184185- Valid `.canvas` files conforming to JSON Canvas Spec 1.0186- Nodes with unique 16-character hex IDs positioned on a coordinate grid187- Edges referencing valid node IDs with optional labels, colors, and side/end attributes188189## References190191- [JSON Canvas Spec 1.0](https://jsoncanvas.org/spec/1.0/)192- [JSON Canvas GitHub](https://github.com/obsidianmd/jsoncanvas)193194## Sibling skills195196Three Obsidian-format references, distinguished by *file type*.197198- `obsidian-markdown` — `.md` notes. Use for note authoring; canvases reference notes as nodes.199- `obsidian-bases` — `.base` database views. Orthogonal.