Skills Prompts Hues

Popular categories

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

  1. 1
    Start 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.

  2. 2
    Place nodes

    It positions new nodes to avoid overlaps with 50 to 100 pixels of space, widening boxes for CJK text.

  3. 3
    Connect them

    It adds edges with fromNode and toNode pointing at existing IDs, with optional sides, arrow ends and labels.

  4. 4
    Validate

    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-skills
Claude Code (in session)Same plugin, installed from inside a Claude Code session.
/plugin marketplace add obsidianmd/obsidian-skills
/plugin install obsidian@obsidian-skills
CodexAdds the marketplace; finish by picking Obsidian in the Codex or ChatGPT desktop plugin list.
codex plugin marketplace add obsidianmd/obsidian-skills
npx skillsWorks with any agent the skills CLI supports.
npx skills add https://github.com/obsidianmd/obsidian-skills
npx skills (SSH)For users with a GitHub SSH key set up.
npx skills add git@github.com:obsidianmd/obsidian-skills.git
Gemini CLIInstalls from the latest GitHub release.
gemini extensions install https://github.com/obsidianmd/obsidian-skills
OpenCodeClone the full repo rather than the inner skills folder, then restart OpenCode.
git clone https://github.com/obsidianmd/obsidian-skills.git ~/.opencode/skills/obsidian-skills

Commands 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

Also in this pack

All 7 skills →

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.