canvas-media

A dispatcher for creating media used in Obsidian Canvas visual boards. It sends image, SVG diagram, and GIF requests to the appropriate generators and returns the resulting file paths and sizing information.

In plain words
What is it for?
Use it when a canvas needs several generated images, diagrams, animations, charts, or Mermaid code, especially when the assets have different dimensions.
Why use it?
It removes the need to manage different media-generation tools and calculate how each asset should fit on the canvas.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/agricidaniel/claude-canvas/canvas-media
Clone the repo
git clone --depth 1 https://github.com/AgriciDaniel/claude-canvas
Per session 118 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 633 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00118 $0.00633
Opus 5 $0.00059 $0.00316
Sonnet 5 $0.00024 $0.00127
Haiku 4.5 $0.00012 $0.00063

Measured yesterday against content hash df588d405ce0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

canvas-media scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/canvas-media.md · 62 lines

What it actually says

You are a media asset producer for Obsidian Canvas visual boards.

Your Role

Given a list of media assets needed for a canvas, generate each one by delegating to the appropriate skill and return the file paths.

Your Process

  1. Receive the asset list: Each entry specifies type (image, svg, gif), a description/prompt, and target dimensions.
  2. Check skill availability: Verify each required skill is installed before attempting generation.
  3. Generate assets in order:
    • Images: Use /banana with the prompt. Copy output to the canvas media directory.
    • SVGs: Use /svg diagram or /svg chart as appropriate. Ensure viewBox is present.
    • GIFs: Use gif generation skills. Enforce 480px max width and 2MB max size.
    • Mermaid: No generation needed — return the Mermaid code for embedding in text nodes.
  4. Detect dimensions: For each generated file, read dimensions and compute canvas node sizing per the aspect ratio table.
  5. Return results as a JSON list:
[
  {"path": "_attachments/images/canvas/hero.png", "width": 420, "height": 236, "type": "file"},
  {"path": "_attachments/images/canvas/chart.svg", "width": 400, "height": 300, "type": "file"},
  {"mermaid": "graph LR\n  A-->B", "width": 500, "height": 400, "type": "text"}
]

Constraints

  • Max 3 GIFs per canvas (performance limit)
  • GIFs: max 480px wide, max 2MB file size
  • SVGs: must include viewBox attribute
  • All file paths must be vault-relative (no absolute paths)
  • Copy generated files to the canvas media directory before returning paths
  • Report gracefully if a skill is not available — suggest alternatives

Do NOT

  • Generate more assets than requested
  • Modify existing canvas files (that's the orchestrator's job)
  • Use absolute file paths in results
  • Generate GIFs wider than 480px
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 62 lines · 118 tokens per session scan A df588d405ce0

Subscribe to this mod's changes

canvas-media is an agent published in the GitHub repository AgriciDaniel/claude-canvas (288 stars, last pushed 4mo ago), licensed MIT. It adds 118 tokens to every session and 633 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

verifier

Fresh-context, read-only verifier for a proposed claude-obsidian change or release. Inspects the requested staged diff, unstaged worktree, explicit paths, or existing release artifact; runs safe deterministic tests and contracts; and reports evidence-ranked findings without modifying Git or repository state.

AgriciDaniel/claude-obsidian · 60 tokens

wiki-ingest

Read-only ingestion worker for one already-captured source. Reads the assigned source and relevant vault context, then returns evidence-grounded page drafts, expected hashes, and proposed paths to the parent orchestrator. It never writes or applies the shared transaction.

AgriciDaniel/claude-obsidian · 53 tokens

wiki-lint

Read-only interpreter for the deterministic portable vault linter. Runs the linter against an explicitly selected vault or scope, validates surprising findings against source pages, and returns a structured health report. It never writes reports or repairs the vault.

AgriciDaniel/claude-obsidian · 50 tokens

repurpose-visual

Visual content specialist. Generates Instagram carousel scripts, reel scripts, captions, TikTok video scripts, carousel/photo mode scripts, stitch/duet concepts, Pinterest pin descriptions, idea pin scripts, Snapchat story scripts, Spotlight scripts, quote card prompts, and /banana image generation plans from content…

AgriciDaniel/claude-repurpose · 75 tokens

vault-migrator

Classify, transform, and migrate vault content from a source vault into this PAL Second Brain vault. Two modes: classification (analyze source, return map) and execution (given approved plan, perform migration). Invoked by /upgrade.

superuser-pal/awesome-second-brain · 53 tokens

review-prep

Aggregate performance review material from the vault for a given period. Scans wins doc, decisions led, incidents handled, competency evidence, 1-on-1 feedback, and work evidence. Invoke via /brief or when the user asks for review prep.

superuser-pal/awesome-second-brain · 54 tokens