New to Claude Skills? Learn how to install them →

agricidaniel on GitHub

Canvas

Free

Manage Obsidian JSON Canvas boards efficiently.

Get this skill

Free · Opens the source repo

What Canvas does

The Canvas skill allows users to create, inspect, and update JSON Canvas boards specifically designed for Obsidian. This skill treats the canvas as a vault-scoped document, ensuring that operations are safe and recoverable through transactions. Users can manage various node types, including text, file, link, group, and edge nodes, facilitating the organization of visual maps, lists, and spatial layouts. By routing all mutations through a single transaction, the skill maintains data integrity and allows for easy reversibility in case of errors.

To use the Canvas skill effectively, users must first resolve the product root from the skill's location, ensuring that all operations are performed within the context of the installed environment. The skill provides a structured approach to managing canvas boards, storing them under a designated directory within the user's vault. With built-in checks to validate JSON structure and node properties, users can confidently draft and apply changes to their canvases without the risk of corruption or data loss.

This skill is particularly useful for developers and designers who rely on visual representations of their ideas and workflows. By allowing for the addition of various media types and vault notes, users can create comprehensive visual maps that enhance their productivity. The ability to preview changes before applying them ensures that users can make informed decisions about their canvas modifications, further reducing the likelihood of mistakes.

In summary, the Canvas skill is an essential tool for anyone working within the Obsidian ecosystem who needs to manage complex visual layouts. Its focus on transaction safety and structured operations makes it a reliable choice for maintaining organized and functional canvas boards.

When to use it

Use this skill when you need to create or modify visual maps and layouts within Obsidian, especially when transaction safety is a priority.

When not to use it

This skill may not be suitable for users who require real-time collaboration on canvas modifications or those who prefer a more visual drag-and-drop interface.

What you can build with it

Creating a Research Map

Use the Canvas skill to draft a visual representation of your research topics, linking relevant notes and files.

Organizing Project Ideas

Manage your project ideas visually by creating a canvas that includes tasks, resources, and links to other relevant materials.

Visualizing Workflows

Design a workflow diagram that outlines processes and dependencies, making it easier to communicate complex ideas.

How to install Canvas

View source

1. Install with the skills CLI

npx skills add agricidaniel/claude-obsidian/canvas --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by agricidaniel

Canvas

Treat a canvas as a vault-scoped JSON Canvas document. Keep reads read-only and route every requested mutation through one recoverable transaction.

Resolve the installed product root from this skill's own location, not from the vault or current working directory:

PRODUCT_ROOT=/absolute/path/to/installed/claude-obsidian
CORE="$PRODUCT_ROOT/scripts/claude-obsidian.py"
test -f "$CORE"

Choose the syntax source

Prefer a separately installed kepano/obsidian-skills json-canvas skill for format details. Otherwise read references/canvas-spec.md. The open standard is JSON Canvas 1.0.

Use this skill for vault workflow and transaction safety even when an upstream syntax skill is available.

Scope

  • Resolve the user vault before reading. Never derive it from plugin files.
  • Store boards under wiki/canvases/; use wiki/canvases/main.canvas only as the default when the user did not name a board.
  • Treat wiki/canvases/index.md as an optional catalog. Update it only when a canvas is created, renamed, or removed.
  • Use vault-relative paths in file and background; reject absolute paths, .. traversal, home shortcuts, and paths that escape through symlinks.
  • Reference only files already inside the vault. If an optional capture or media capability is detected, compose with it and consume its returned vault-relative path. Do not assume a particular plugin, command, or session log, and do not download or copy assets in this skill.
  • Use link nodes for URLs. Accept HTTPS URLs only; a link node does not grant permission to fetch the page. Creating its JSON makes no request, but opening it in Obsidian may fetch Open Graph metadata from that URL's host. Disclose that render-time egress and confirm it is acceptable; otherwise use a text node containing the URL.

Read-only operations

For status or list requests, parse the selected .canvas files and report node counts, group labels, broken edge endpoints, and missing vault-relative file targets. If the default canvas is absent, report that fact and offer a creation preview; do not create it during a status request.

Draft a mutation

  1. Read the entire canvas and any catalog target. Record each expected SHA-256, or null for a file that must be absent.
  2. Preserve unknown JSON fields and existing array order. The node array is bottom-to-top z-order.
  3. Draft the requested nodes or edges:
    • Give every node and edge a unique ID. Prefer a random 16-character lowercase hexadecimal ID and verify it is unused.
    • Require integer x, y, width, and height values for every node.
    • Use text, file, link, or group exactly as defined by JSON Canvas.
    • Require every fromNode and toNode to reference an existing or newly drafted node.
  4. Position new content deliberately. A group is a visual container, not a parent. Use 20 px inner padding and 40 px gaps, wrap to a new row when needed, and preview any group expansion.
  5. Serialize valid UTF-8 JSON with top-level nodes and edges arrays.

Minimal node examples:

{
  "nodes": [
    {
      "id": "6f0ad84f44ce9c17",
      "type": "text",
      "text": "# Research map\n\nA concise orientation card.",
      "x": 0,
      "y": 0,
      "width": 400,
      "height": 180
    },
    {
      "id": "a1b2c3d4e5f67890",
      "type": "file",
      "file": "wiki/concepts/Contextual Retrieval.md",
      "x": 460,
      "y": 0,
      "width": 400,
      "height": 240
    }
  ],
  "edges": []
}

Use file plus optional subpath: "#Heading" for notes, images, PDFs, and other vault files. Use url only on a link node. Escape line breaks in JSON strings as \n, not as literal backslash-plus-n text.

Preview and apply

Validate before showing the preview:

  • JSON parses and uses supported node types.
  • IDs are unique and edge endpoints exist.
  • dimensions are positive integers;
  • file and background paths are safe, vault-relative, and present;
  • new nodes do not unintentionally overlap or overflow their requested group.

Build one claude-obsidian.transaction.v1 bundle with operation type canvas. Include the canvas and the catalog in that same bundle when the catalog changes. Read operation-transactions.md, then inspect the bundle before applying it:

python3 "$CORE" transaction inspect BUNDLE --vault VAULT
# Set APPROVAL_SHA256 to the inspect result's approval_sha256 after review.
python3 "$CORE" transaction apply BUNDLE --vault VAULT \
  --approved-plan-sha256 "$APPROVAL_SHA256"

For removals, replacements, renames, or other destructive changes, obtain explicit consent after presenting the preview. Report the operation ID, exact changed paths, board name, node IDs, and final positions. Do not commit Git.

Frequently asked questions about Canvas

Similar skills