agentleFS
tboome33tboome33/obsidian-mcp-router/skills/canvas/SKILL.md

canvas

Skill1 starsChanged 7 months agoApache-2.0View on GitHub

Create or modify Obsidian canvas (.canvas) files — visual layout layer where wiki pages, images, PDFs, and free-form text cards are arranged spatially. Supports adding nodes, defining zones (labeled regions), and laying out content with auto-positioning. Use when the user says "create a canvas", "add to canvas", "/canvas", "visualize this on a canvas", "make a canvas of <topic>", "add image to canvas", "add note to canvas", or any phrasing about visual/spatial organization of vault content.

47 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use taskflow-inbox-triage, update-cli-config and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AtomicBot-aiSkill

    taskflow-inbox-triage

    Also in 5 projects that use this

  • PandelisZSkill

    update-cli-config

    View and modify Cursor CLI configuration settings in ~/.cursor/cli-config.json. Use when the user wants to change CLI settings, configure permissions, switch approval mode, enable vim mode, toggle display options, configure sandbox, or manage any CLI preferences.

    Also in 6 projects that use this

  • jiulingyunSkill

    BlueBubbles

    为Clawdbot构建或更新BlueBubbles外部通道插件(扩展包,REST发送/探测,webhook入站)。

    Also in 15 projects that use this

  • seedprodSkill

    voice-call

    Start voice calls via the OpenClaw voice-call plugin.

    Also in 14 projects that use this

  • 32103210Skill

    migrate-to-skills

    Convert 'Applied intelligently' Cursor rules (.cursor/rules/*.mdc) and slash commands (.cursor/commands/*.md) to Agent Skills format (.cursor/skills/). Use when you want to migrate rules or commands to skills, convert .mdc rules to SKILL.md format, or consolidate commands into the skills directory.

    Also in 6 projects that use this

  • 32103210Skill

    update-cursor-settings

    Modify Cursor/VSCode user settings in settings.json. Use when you want to change editor settings, preferences, configuration, themes, font size, tab size, format on save, auto save, keybindings, or any settings.json values.

    Also in 6 projects that use this

  • +1 more from 32103210

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. 0 are common, 7 are distinctive, and 9 are very specific to this project.

  • 0

    Common

    Most of the 44 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Create a new canvas at wiki/canvases/<slug>.canvas (extension is .canvas only — Obsidian renders these with a canvas icon in the file tree).

    line 48
  2. Very specific:

    Add a group node. Default size 800×600.

    line 64
  3. Distinctive:

    Place the new node WITHIN the bounding box of the named zone.

    line 67
  4. Very specific:

    Read the canvas file, list all nodes with their type/label/file/text-preview.

    line 70
  5. Very specific:

    Add the most recently modified image files from a vault folder (default: _attachments/) as file nodes to the named canvas.

    line 73
  6. Very specific:

    If the user gave a name without folder, default to wiki/canvases/<slug>.canvas (note: extension is .canvas, not .md).

    line 84
  7. Very specific:

    If 404 → initialize with { "nodes": [], "edges": [] } and proceed.

    line 92
  8. Distinctive:

    If found → parse JSON. If parse fails, bail — don't trash a malformed canvas.

    line 93
  9. Distinctive:

    First node: place at (0, 0).

    line 99
  10. Distinctive:

    Zone target: place inside the zone's bounding box, top-left within the zone, offset 30,30.

    line 101
  11. Distinctive:

    Group node (zone): place below the bottommost existing node row, or right of the rightmost zone if multiple zones already exist.

    line 102
  12. Very specific:

    Always overwrite the entire file (canvases are small, atomic write is safer than patch).

    line 110
  13. Very specific:

    Don't try to use patch_file on a canvas — JSON is too brittle to patch by string.

    line 119
  14. Distinctive:

    Don't generate a canvas with hundreds of nodes from a single command.

    line 120
  15. Very specific:

    Don't add file nodes pointing to files that don't exist in the vault.

    line 121
  16. Distinctive:

    Don't auto-create edges. Let the user draw connections in Obsidian's UI.

    line 122

“Common” is measured: kept by at least 6 in 10 of the 44 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

canvas

Obsidian's .canvas files are JSON. This skill writes them programmatically with sensible auto-layout so you don't have to hand-position nodes.

.canvas format primer

A canvas file is a JSON object:

{
  "nodes": [
    {
      "id": "<unique-id>",
      "type": "file|text|link|group",
      "x": <int>, "y": <int>,
      "width": <int>, "height": <int>,
      "color": "1-6 or #hex"   // optional
      // type-specific fields below
    }
  ],
  "edges": [
    {
      "id": "<unique-id>",
      "fromNode": "<node-id>",
      "fromSide": "top|right|bottom|left",
      "toNode": "<node-id>",
      "toSide": "top|right|bottom|left",
      "label": "<optional>"
    }
  ]
}

Type-specific fields:

  • type: "file" → adds "file": "<vault-relative-path>" (any file: .md, .png, .pdf, etc.)
  • type: "text" → adds "text": "<markdown content>"
  • type: "link" → adds "url": "<https://...>"
  • type: "group" → adds "label": "<zone label>", "background": "<optional>"

Operations

canvas-new <name>

Create a new canvas at wiki/canvases/<slug>.canvas (extension is .canvas only — Obsidian renders these with a canvas icon in the file tree). Empty nodes and edges arrays.

canvas-add-text <canvas> <text>

Append a text node. Auto-position: rightmost node's x + width + 50, same y. Default size 300×120.

canvas-add-file <canvas> <path>

Append a file node. Auto-detect size based on file type:

  • Markdown: 400×300
  • Image (.png/.jpg/.webp): 400×400
  • PDF: 600×800
  • Other: 400×300

canvas-add-link <canvas> <url>

Append an external link card. Default size 400×120.

canvas-zone <canvas> <label>

Add a group node. Default size 800×600. Position: below or right of the rightmost group, with a 50px gap.

canvas-add-to-zone <canvas> <zone-label> <node>

Place the new node WITHIN the bounding box of the named zone. Useful for organized layouts ("add this image to the 'References' zone").

canvas-list <canvas>

Read the canvas file, list all nodes with their type/label/file/text-preview. Read-only.

canvas-capture-recent-images <canvas> [folder]

Add the most recently modified image files from a vault folder (default: _attachments/) as file nodes to the named canvas. Useful for capturing a batch of generated images into a visual board. Optional count parameter — defaults to the 8 most recent.

Pre-conditions

  1. Target vault is online.
  2. For mutating ops: target canvas file path is determined (or being created).

Steps

1. Resolve the canvas path

If the user gave a name without folder, default to wiki/canvases/<slug>.canvas (note: extension is .canvas, not .md). Slugify the name.

2. Read the existing canvas (or initialize)

mcp__obsidian-router__get_file({ vault, path: "<canvas-path>" })

If 404 → initialize with { "nodes": [], "edges": [] } and proceed. If found → parse JSON. If parse fails, bail — don't trash a malformed canvas.

3. Compute node positions

Auto-layout heuristics (in order):

  1. First node: place at (0, 0).
  2. Subsequent nodes (no zone target): rightmost existing node's x + width + 50, same y as the rightmost. Wrap to a new row at y + 500 every 4 nodes.
  3. Zone target: place inside the zone's bounding box, top-left within the zone, offset 30,30. If multiple nodes go in the same zone, stack vertically with 30px gap.
  4. Group node (zone): place below the bottommost existing node row, or right of the rightmost zone if multiple zones already exist.

4. Generate IDs

Random 16-char hex string per node. Don't reuse IDs.

5. Write the modified canvas

Always overwrite the entire file (canvases are small, atomic write is safer than patch). Use mcp__obsidian-router__write_file with explicit content.

6. Confirm to the user

Tell the user what was added and where to open it:

✅ Added text node to wiki/canvases/<name>.canvas. Open it in Obsidian to view.

Anti-patterns

  • Don't try to use patch_file on a canvas — JSON is too brittle to patch by string. Read-modify-write the whole file.
  • Don't generate a canvas with hundreds of nodes from a single command. If the user asks "put my whole vault on a canvas", clarify first — that's almost certainly the wrong tool.
  • Don't add file nodes pointing to files that don't exist in the vault. Use mcp__obsidian-router__list_files first to verify.
  • Don't auto-create edges. Let the user draw connections in Obsidian's UI.

Output format

For each operation:

✅ canvas <op> on <canvas-path>:

  • <what was added>
  • position: (<x>, <y>), size: <w>×<h> Open in Obsidian to view.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.