ワンクリックで
json-canvas
Create and edit .canvas files with nodes and edges.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Create and edit .canvas files with nodes and edges.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
Plan safe harness customization only.
Orient static defending-code review work.
Build a static security threat model.
Draft inert patches for verified findings.
Run static repo-read vulnerability review.
Triages static security findings.
SOC 職業分類に基づく
| name | json-canvas |
| description | Create and edit .canvas files with nodes and edges. |
| platforms | ["linux","macos","windows"] |
| version | 1.1.0 |
| author | Harish Kukreja (counterposition), Hermes Agent (adapted from Steph Ango's official Obsidian skills) |
| license | MIT |
| metadata | {"hermes":{"tags":["obsidian","json-canvas","canvas","note-taking","diagrams"],"related_skills":["obsidian","obsidian-markdown","obsidian-cli","obsidian-bases"]}} |
Create and edit JSON Canvas files (.canvas) — the open format behind
Obsidian's Canvas: mind maps, flowcharts, and visual boards built from
nodes, edges, and groups per the
JSON Canvas Spec 1.0. Adapted from
Steph Ango's MIT-licensed official Obsidian skills.
.canvas filesRoute elsewhere for broad vault work (obsidian), Markdown notes
(obsidian-markdown), or .base database views (obsidian-bases).
None — .canvas files are plain JSON and no running Obsidian app is
required. Resolve the vault path first (see the obsidian skill).
Read canvases with read_file, create them with write_file, and make
targeted edits with patch. After any change, validate with the bundled
checker (run via terminal, from this skill's directory):
python scripts/validate_canvas.py /absolute/path/to/file.canvas
It checks JSON validity, ID uniqueness, edge reference integrity, required per-type fields, and enum values, and exits non-zero with per-error messages on failure.
A .canvas file is a JSON object with two optional top-level arrays:
{
"nodes": [],
"edges": []
}
Array order determines z-index: first node = bottom layer.
| Attribute | Required | Type | Description |
|---|---|---|---|
id | Yes | string | Unique string (convention: 16-char hex) |
type | Yes | string | text, file, link, or group |
x, y | Yes | integer | Position in pixels (top-left corner) |
width, height | Yes | integer | Size in pixels |
color | No | canvasColor | Preset "1"-"6" or hex (e.g., "#FF0000") |
| Node type | Required | Optional |
|---|---|---|
text | text (Markdown string) | — |
file | file (vault path) | subpath (starts with #) |
link | url | — |
group | — | label, background, backgroundStyle (cover/ratio/repeat) |
{
"id": "6f0ad84f44ce9c17",
"type": "text",
"x": 0,
"y": 0,
"width": 400,
"height": 200,
"text": "# Hello World\n\nThis is **Markdown** content."
}
| Attribute | Required | Default | Description |
|---|---|---|---|
id | Yes | - | Unique identifier |
fromNode, toNode | Yes | - | Source / target node IDs |
fromSide, toSide | No | - | top, right, bottom, or left |
fromEnd, toEnd | No | none / arrow | none or arrow |
color | No | - | Line color (canvasColor) |
label | No | - | Text label |
{
"id": "0123456789abcdef",
"fromNode": "6f0ad84f44ce9c17",
"fromSide": "right",
"toNode": "a1b2c3d4e5f67890",
"toSide": "left",
"label": "leads to"
}
canvasColor is either a hex string ("#FF0000"; 3-, 4-, 6-, and 8-digit
forms are accepted) or a preset: "1" red, "2" orange, "3" yellow,
"4" green, "5" cyan, "6" purple. Preset rendering is
application-defined.
x increases right, y increases downCreating a new canvas:
{"nodes": [], "edges": []}.id, type, x, y, width,
height) plus the per-type required field.fromNode/toNode.write_file, then validate (see Verification).Editing an existing canvas:
read_file and locate the target node/edge by id.group node whose bounds enclose them.patch (or rewrite with write_file when the
change is structural), then validate.\n inside the JSON string. A literal
\\n renders as the characters \ and n in Obsidian.fromNode/toNode references break rendering
silently — always validate after editing.file node paths are vault-relative; a wrong path shows a broken
embed only when Obsidian opens the canvas..canvas is strict JSON.Run python scripts/validate_canvas.py <file.canvas> via terminal; it
must exit 0. It enforces: valid JSON; unique id values across nodes and
edges; every edge endpoint resolves to a node; required per-type fields
present; type, side, and end values within their enums; colors are
presets "1"-"6" or hex. For a final visual check, open the canvas in
Obsidian if it is available.