From second-brain
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.
How this skill is triggered — by the user, by Claude, or both
Slash command
/second-brain:json-canvasThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> Third-party attribution: This content includes material derived from
Third-party attribution: This content includes material derived from kepano/obsidian-skills. See THIRD_PARTY_NOTICES.md.
A canvas file (.canvas) contains two top-level arrays following the JSON Canvas Spec 1.0:
{
"nodes": [],
"edges": []
}
.canvas file with the base structure {"nodes": [], "edges": []}"6f0ad84f44ce9c17")id, type, x, y, width, heightfromNode and toNodefromNode/toNode values exist in the nodes array| 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 (e.g., "#FF0000") |
{
"id": "6f0ad84f44ce9c17",
"type": "text",
"x": 0, "y": 0, "width": 400, "height": 200,
"text": "# Hello World\n\nThis is **Markdown** content."
}
Newline pitfall: Use \n for line breaks in JSON strings.
{
"id": "a1b2c3d4e5f67890",
"type": "file",
"x": 500, "y": 0, "width": 400, "height": 300,
"file": "Attachments/diagram.png"
}
{
"id": "c3d4e5f678901234",
"type": "link",
"x": 1000, "y": 0, "width": 400, "height": 200,
"url": "https://obsidian.md"
}
{
"id": "d4e5f6789012345a",
"type": "group",
"x": -50, "y": -50, "width": 1000, "height": 600,
"label": "Project Overview",
"color": "4"
}
{
"id": "0123456789abcdef",
"fromNode": "6f0ad84f44ce9c17",
"fromSide": "right",
"toNode": "a1b2c3d4e5f67890",
"toSide": "left",
"toEnd": "arrow",
"label": "leads to"
}
| Attribute | Required | Values |
|---|---|---|
fromSide/toSide | No | top, right, bottom, left |
fromEnd/toEnd | No | none, arrow (toEnd defaults to arrow) |
| Preset | Color |
|---|---|
"1" | Red |
"2" | Orange |
"3" | Yellow |
"4" | Green |
"5" | Cyan |
"6" | Purple |
x increases right, y increases down; position is the top-left cornerid values are unique across nodes and edgesfromNode/toNode references an existing node IDtype is one of: text, file, link, groupnpx claudepluginhub masuda-so/second-brainCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.