Canvas Populate logo

Canvas Populate

Community
AgriciDaniel
canvas-populate

Add content to existing Obsidian Canvas files. Supports all node types: images (with auto aspect ratio detection), text cards, PDFs, wiki notes, web links, Mermaid diagrams, SVGs, GIFs, AI-generated images via banana. Also adds zones (groups), edges between nodes, and imports recent banana images. Triggers on: canvas add, add to canvas, put on canvas, canvas zone, canvas connect, canvas from banana, add image to canvas, add text to canvas.

Overview

PublisherAgriciDaniel
Repositoryclaude-canvas
Skill namecanvas-populate
Stars
301
Forks
27
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by AgriciDaniel on GitHub. Read the source before you install it.

Installation

Install the Canvas Populate AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/AgriciDaniel/claude-canvas/tree/main/skills/canvas-populate
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AgriciDaniel/claude-canvas.git /tmp/claude-canvas
mkdir -p .claude/skills
cp -r /tmp/claude-canvas/skills/canvas-populate .claude/skills/canvas-populate
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Canvas Populate in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Canvas Populate on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Canvas Populate is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

canvas-populate: Add Content to Canvases

Read ../canvas/references/canvas-spec.md for the full JSON format before any edit. Read ../canvas/references/performance-guide.md for node limits and constraints.


General Workflow

For every add operation:

  1. Read the target canvas JSON. Parse nodes and edges arrays.
  2. Collect existing IDs to prevent collisions.
  3. Generate a new ID: [type]-[slug]-[unix-timestamp].
  4. Calculate position using the auto-positioning algorithm (see canvas orchestrator).
  5. Spacing check: Verify the calculated position has at least 80px horizontal and 60px vertical gap from ALL existing content nodes. If not, shift the position until spacing is clear.
  6. Append the new node to the nodes array (after any groups — z-index ordering).
  7. Validate: Run python3 scripts/canvas_validate.py <path> — check for overlaps and node count.
  8. Write the updated canvas JSON.
  9. Report: "Added [description] to [zone] zone at position ([x], [y])."

Node Operations

add image (/canvas add image [path or url])

Resolve the image:

  • If URL (starts with http): download with curl -sL [url] -o [media_dir]/[filename]. Derive filename from URL path, or use img-[timestamp].jpg if unclear.
  • If local path outside canvas dir: cp [path] [media_dir]/
  • If already canvas-relative: use as-is.

Detect aspect ratio:

bash
python3 -c "from PIL import Image; img=Image.open('[path]'); print(img.width, img.height)"
# or fallback
identify -format '%w %h' [path]

Map to the sizing table in ../canvas/references/canvas-spec.md (7 ratios + PDF + fallback).

Create file node with calculated dimensions. Position using auto-layout.

add text (/canvas add text [content])

json
{
  "id": "text-[slug]-[timestamp]",
  "type": "text",
  "text": "[content]",
  "x": 0, "y": 0,
  "width": 300, "height": 120
}

For multi-line content, estimate height: count newlines, multiply by 24, add 40px padding. Minimum 120px.

add pdf (/canvas add pdf [path])

Copy to [media_dir]/ if outside canvas dir. Fixed size: width=400, height=520.

add note (/canvas add note [wiki-page])

  1. Search for a file matching the page name (case-insensitive, partial match).
  2. Use "type": "file" with vault-relative path. Not "type": "link" — that's for URLs only.
  3. Default size: width=300, height=100.

add link (/canvas add link [url])

json
{
  "id": "link-[slug]-[timestamp]",
  "type": "link",
  "url": "[url]",
  "x": 0, "y": 0,
  "width": 400, "height": 120
}

Obsidian fetches Open Graph preview automatically.

add mermaid (/canvas add mermaid [code])

Mermaid renders natively in Obsidian text nodes. Wrap in a fenced code block:

json
{
  "id": "text-mermaid-[timestamp]",
  "type": "text",
  "text": "```mermaid\n[code]\n```",
  "x": 0, "y": 0,
  "width": 500, "height": 400,
  "color": "5"
}

Wider text nodes work better for Mermaid (min 400px wide, 300px tall).

add svg (/canvas add svg [description or path])

  • If path: copy SVG to media dir, add as file node. Width=400, height based on viewBox aspect ratio.
  • If description: delegate to /svg skill to generate, then add the output file.
  • SVGs render as <img> — no interactivity. Must have viewBox attribute.

add gif (/canvas add gif [description or path])

  • If path: copy GIF to media dir, add as file node.
  • If description: delegate to /claude-gif-generate skill, then add the output.
  • Performance limit: max 3 GIFs per canvas, max 480px width. Warn if exceeded.

add banana (/canvas add banana [prompt])

  1. Check if banana skill is available. If not: "Install the banana skill for AI image generation."
  2. Delegate to banana skill with the prompt.
  3. Wait for image generation.
  4. Add the generated image as a file node (detect aspect ratio, auto-size).
  5. Log the path to .recent-images.txt in the canvas directory.

Zone Operations

zone (/canvas zone [name] [color])

  1. Read canvas JSON.
  2. Find max_y of all existing nodes. Use -80 if canvas is empty (consistent with starter canvas layout where title is at y=-300 and default zone at y=-140):
    python
    if not canvas_nodes:
        max_y = -80
    else:
        max_y = max(n["y"] + n.get("height", 0) for n in canvas_nodes) + 60
  3. Create group node:
json
{
  "id": "zone-[slug]-[timestamp]",
  "type": "group",
  "label": "[name]",
  "x": -400,
  "y": "[max_y]",
  "width": 1000,
  "height": 400,
  "color": "[color or '4']"
}

Valid colors: "1"=red "2"=orange "3"=yellow "4"=green "5"=cyan "6"=purple

  1. Insert the group node BEFORE content nodes in the array (z-index: groups render behind).
  2. Write and report.

Edge Operations

connect (/canvas connect [from] [to] [label])

  1. Read canvas JSON.
  2. Find from and to nodes by ID, label text, or partial match.
  3. If ambiguous, list matches and ask the user to clarify.
  4. Create edge:
json
{
  "id": "e-[from-slug]-[to-slug]-[timestamp]",
  "fromNode": "[from-id]",
  "toNode": "[to-id]",
  "toEnd": "arrow"
}
  1. Omit fromSide/toSide for auto-routing (better results).
  2. Add optional label if provided.
  3. Write and report.

Banana Import

from banana (/canvas from banana)

  1. Check [canvas_dir]/.recent-images.txt for recently logged image paths.
  2. If not found or empty: search for images modified in the last 10 minutes:
    bash
    find [media_dir] -name "*.png" -o -name "*.jpg" -newer /tmp/ten-min-ago
  3. If still none: show the 5 most recently modified images.
  4. Present list: "Found N recent images. Add to canvas? Which zone?"
  5. On confirmation: add each using the add image logic.

Media Directory

  • Vault mode: _attachments/images/canvas/
  • Standalone mode: .canvases/assets/
  • Create if it doesn't exist.
  • All file node paths must be relative to the vault/project root.

Frequently asked questions

What does the Canvas Populate AI skill do?

Add content to existing Obsidian Canvas files. Supports all node types: images (with auto aspect ratio detection), text cards, PDFs, wiki notes, web links, Mermaid diagrams, SVGs, GIFs, AI-generated images via banana. Also adds zones (groups), edges between nodes, and imports recent banana images. Triggers on: canvas add, add to canvas, put on canvas, canvas zone, canvas connect, canvas from banana, add image to canvas, add text to canvas.

Why use Canvas Populate on TypingMind?

Because you install it once and use it with any model. Canvas Populate is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Canvas Populate in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/AgriciDaniel/claude-canvas/tree/main/skills/canvas-populate. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Canvas Populate?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Canvas Populate?

As many as you like. As long as a model supports skills, you can use Canvas Populate with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Canvas Populate AI skill free?

Yes. It is published on GitHub by AgriciDaniel under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇