json-canvas
Create and edit JSON Canvas (.canvas) files with valid nodes, edges, groups, colors, layout, IDs, and referential integrity. Use for Obsidian Canvas files, visual maps, flowcharts, project boards, or any request involving the JSON Canvas format.
- License 许可
- MIT
- 最近更新
- 2026-09-21
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- json-canvas
- license
- MIT
- metadata
- { "copilot-enabled-agents": "opencode, claude, codex", "copilot-builtin-version": "1", "copilot-upstream-revision": "a1dc48e68138490d522c04cbf5822214c6eb1202" }
- description
- Create and edit JSON Canvas (.canvas) files with valid nodes, edges, groups, colors, layout, IDs, and referential integrity. Use for Obsidian Canvas files, visual maps, flowcharts, project boards, or any request involving the JSON Canvas format.
02 资源文件 2
- 许可证LICENSE1.1 KB
- 参考文档references/EXAMPLES.md1.1 KB
03 SKILL.md 正文
JSON Canvas
Follow JSON Canvas 1.0. A <code>.canvas</code> document contains top-level <code>nodes</code> and <code>edges</code> arrays.
Workflow
- Parse the existing JSON before editing it.
- Generate a unique lowercase 16-character hexadecimal ID for each new node or edge.
- Position nodes without overlap and preserve intentional existing layout.
- Point every edge at existing node IDs.
- Serialize valid JSON and run the validation checklist below.
Nodes
Every node requires <code>id</code>, <code>type</code>, <code>x</code>, <code>y</code>, <code>width</code>, and <code>height</code>.
| Type | Required content | Purpose |
|---|---|---|
| <code>text</code> | <code>text</code> | Markdown content |
| <code>file</code> | <code>file</code> | Vault file; optional <code>subpath</code> |
| <code>link</code> | <code>url</code> | External URL |
| <code>group</code> | none | Visual container; optional label/background |
Array order controls z-index: earlier nodes are behind later nodes. Coordinates may be negative. Position is the top-left corner, x increases right, and y increases down.
{
"id": "6f0ad84f44ce9c17",
"type": "text",
"x": 0,
"y": 0,
"width": 360,
"height": 180,
"text": "# Main idea\n\nDetails",
"color": "5"
}
Use actual JSON newline escapes in text values. Do not double-escape them into literal backslash-n text.
Edges
Every edge requires <code>id</code>, <code>fromNode</code>, and <code>toNode</code>. Optional sides are <code>top</code>, <code>right</code>, <code>bottom</code>, or <code>left</code>. Optional ends are <code>none</code> or <code>arrow</code>.
{
"id": "0123456789abcdef",
"fromNode": "6f0ad84f44ce9c17",
"fromSide": "right",
"toNode": "a1b2c3d4e5f67890",
"toSide": "left",
"toEnd": "arrow",
"label": "leads to"
}
Colors and layout
A color is a hex string or preset <code>"1"</code> through <code>"6"</code>. Presets deliberately do not define exact hex colors. Leave 50–100 px between nodes, 20–50 px padding inside groups, and align to a simple grid when creating a new layout.
Validation checklist
- JSON parses successfully.
- IDs are unique across nodes and edges.
- Every <code>fromNode</code> and <code>toNode</code> exists in <code>nodes</code>.
- Each node type has its required content field.
- Sides, ends, and colors use allowed values.
- Nodes do not unintentionally overlap and group children sit inside bounds.
Read Examples for complete connected and grouped canvases.
Attribution
Adapted from <code>kepano/obsidian-skills</code> at revision <code>a1dc48e68138490d522c04cbf5822214c6eb1202</code>. See <code>LICENSE</code>.
04 同仓库更多 Skills
humanizer
Rewrite AI-sounding text so it reads naturally without changing what it says. Use when editing or reviewing prose for inflated claims, sales language, vague sources, repetitive structure, stock AI words, passive voice, filler, or chatbot artifacts. Based on Wikipedia's "Signs of AI writing."
obsidian-markdown
Create and edit Obsidian-specific Markdown syntax, including wikilinks, embeds, block references, callouts, properties, tags, and comments. Use for Obsidian notes when these extensions matter; ordinary Markdown is assumed knowledge.
obsidian-cli
Use the official Obsidian CLI when a task needs Obsidian's running app, index, configured features, command registry, or developer runtime. Use for currently open notes and tabs, workspace state, daily notes, typed properties, tasks, links/backlinks, Bases queries, template resolution, link-aware moves, plugin commands, and plugin/theme debugging; do not use it for ordinary filesystem operations.
obsidian-bases
Create and edit Obsidian Bases (.base files) with valid YAML schemas, filters, formulas, properties, summaries, and views. Use for database-like Obsidian views or when the user mentions Bases, .base files, table/card/list views, filters, formulas, or summaries.
last30days
Research what people actually say about any topic in the last 30 days. Pulls posts and engagement from Reddit, X, YouTube, TikTok, Hacker News, Polymarket, GitHub, and the web. Includes a doctor health check to diagnose broken or missing sources.
last30days
Research what people actually say about any topic in the last 30 days. Pulls posts and engagement from Reddit, X, YouTube, TikTok, Hacker News, Polymarket, GitHub, and the web. Includes a doctor health check to diagnose broken or missing sources.