json-canvas — Claude Code skill: what it does, how to install
Builds and modifies .canvas files following the JSON Canvas 1.0 spec for Obsidian. It helps Claude Code diagram workflows, link notes, and structure mind maps.
npx claude-code-templates@latest --skill document-processing/json-canvasWhat json-canvas does
This skill teaches Claude Code how to output .canvas files compatible with Obsidian. Each file contains two main arrays: nodes for visual cards and edges for lines. The agent places four node kinds: Markdown text, local attachment links, URLs, and grouping rectangles. Node array sequence determines display depth.
Positions rely on exact pixel values for coordinates and dimensions. Lines connect designated card sides (top, right, bottom, left) with optional labels and arrowheads. Color presets from "1" through "6" omit fixed hex values, which means your visual viewer dictates the actual theme palette.
What it helps with
- construct flowcharts and mind maps as
.canvasfiles - connect notes and documents with labeled directional arrows
- organize canvas cards inside labeled visual groups
- update node dimensions and pixel coordinates in Obsidian canvases
Example prompts for the agent
- Generate an
architecture.canvasfile mapping our backend services with connecting lines - Create a project roadmap canvas grouping frontend and backend tasks
- Add a file node pointing to
docs/spec.mdand link it to the overview card
How to install json-canvas
1claude-code-templates
npx claude-code-templates@latest --skill document-processing/json-canvas2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill json-canvas -a claude-code3Manually: put the files in place
~/.claude/skills/json-canvas/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/json-canvas/
Manually: put the files in place
.agents/skills/json-canvas/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/json-canvas/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates json-canvas2Manually: put the files in place
.github/skills/json-canvas/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/document-processing/json-canvasManually: put the files in place
.devin/skills/json-canvas/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about json-canvas
How to install json-canvas in Claude Code?
Run npx claude-code-templates@latest --skill document-processing/json-canvas in your terminal. You can also place the skill file directly at ~/.claude/skills/json-canvas/SKILL.md.
What does json-canvas do?
It enables Claude Code to construct and edit .canvas files complying with the JSON Canvas 1.0 specification for Obsidian and other canvas tools.
Which node types are supported in the canvas format?
The format supports four distinct node types: text with Markdown syntax, file for local attachments, link for web addresses, and group for container boxes.