Agent skill · Obsidian Skills
/json-canvas Generate valid Obsidian canvases from mind maps to flowcharts
The JSON Canvas skill tells the agent how to create and edit .canvas files that follow the JSON Canvas 1.0 spec. It lists the attributes for text, file, link and group nodes and for edges, explains ID generation, colours and layout spacing, and ends with a checklist that catches duplicate IDs, dangling edges and broken escaping.
Works with
- Claude Code
- Codex
- npx skills
- Gemini CLI
- OpenCode
Used forDiagrams and codebase maps
When to use it
- You want a mind map, project board or flowchart built as an Obsidian canvas
- You need nodes added or connected on an existing canvas without breaking it
- A generated canvas fails to open and you need it repaired
How it works
- 1Start the structure
The agent creates a file with nodes and edges arrays and gives each node a unique 16-character hex ID plus position and size.
- 2Place nodes
It positions new nodes to avoid overlaps with 50 to 100 pixels of space, widening boxes for CJK text.
- 3Connect them
It adds edges with fromNode and toNode pointing at existing IDs, with optional sides, arrow ends and labels.
- 4Validate
It parses the JSON and checks unique IDs, valid edge references, required fields, allowed values and escaped quotes.
What it steers the agent away from
- Literal \n sequences that Obsidian shows as text
- Unescaped quotes that make the canvas fail to load
- Creating canvases through obsidian create, which mangles newlines
Install this skill
It installs with the Obsidian Skills pack.
Claude Code (terminal)Update later with claude plugin update obsidian@obsidian-skills.
claude plugin marketplace add obsidianmd/obsidian-skills
claude plugin install obsidian@obsidian-skillsClaude Code (in session)Same plugin, installed from inside a Claude Code session.
/plugin marketplace add obsidianmd/obsidian-skills
/plugin install obsidian@obsidian-skillsCodexAdds the marketplace; finish by picking Obsidian in the Codex or ChatGPT desktop plugin list.
codex plugin marketplace add obsidianmd/obsidian-skillsnpx skillsWorks with any agent the skills CLI supports.
npx skills add https://github.com/obsidianmd/obsidian-skillsnpx skills (SSH)For users with a GitHub SSH key set up.
npx skills add git@github.com:obsidianmd/obsidian-skills.gitGemini CLIInstalls from the latest GitHub release.
gemini extensions install https://github.com/obsidianmd/obsidian-skillsOpenCodeClone the full repo rather than the inner skills folder, then restart OpenCode.
git clone https://github.com/obsidianmd/obsidian-skills.git ~/.opencode/skills/obsidian-skillsCommands come from the author’s README; check it for changes before you run them.
Questions
Is JSON Canvas specific to Obsidian?
It is an open format with its own spec; Obsidian uses it for canvases, and the skill follows version 1.0.
How are colours set?
Each node or edge takes a preset from 1 to 6 or a hex value; the presets' actual colours are left to the app.
More guides from Obsidian Skills
/obsidian-basesWrite Obsidian Bases views without YAML and formula errorsBuilds .base files with filters, formulas, summaries and table, cards, list, map or kanban views, and fixes common YAML errors.Read the guide →/obsidian-cliManage notes and debug plugins through the Obsidian CLIReads, searches and edits notes through the running Obsidian app, and reloads, debugs and screenshots plugins and themes.Read the guide →
Also in this pack
/defuddlePulls clean Markdown or metadata from a web page with the Defuddle CLI, stripping navigation and ads.↗/knapRenders notes from Markdown templates and JSON or CSV data with Knap, including one file per row in batch mode.↗/obsidian-headlessSets up and runs Obsidian Sync and Publish from a terminal, server or CI with the ob command, no desktop app needed.↗
Summary by trendhub. The skill itself lives in obsidianmd/obsidian-skills/plugins/obsidian/skills/json-canvas by Obsidian (MIT); read the full, current text there.