canvas-media

canvas-media is an agent for Claude Code from AgriciDaniel/claude-canvas. It costs 118 tokens per session (633 once invoked), scanned A, original, MIT.

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 for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the claude-canvas plugin — 8 skills, 1 command, 3 agents shipped together

Good fit Use it when a canvas needs several generated images, diagrams, animations, charts, or Mermaid code, especially when the assets have different dimensions.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/agricidaniel/claude-canvas/canvas-media
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.

Clone the repo
git clone --depth 1 https://github.com/AgriciDaniel/claude-canvas

Made for: Claude Code.

Or install claude-canvas, the plugin that ships this one along with the rest of its 8 skills, 1 command, 3 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for canvas-media

README.md
[![agentmods](https://agentmods.dev/badge/agents/agricidaniel/claude-canvas/canvas-media/github.svg)](https://agentmods.dev/agents/agricidaniel/claude-canvas/canvas-media)
Your own site
<a href="https://agentmods.dev/agents/agricidaniel/claude-canvas/canvas-media"><img src="https://agentmods.dev/badge/agents/agricidaniel/claude-canvas/canvas-media/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for canvas-media

Your own site · 80×15
<a href="https://agentmods.dev/agents/agricidaniel/claude-canvas/canvas-media"><img src="https://agentmods.dev/badge/agents/agricidaniel/claude-canvas/canvas-media.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00118 $0.00633
Opus 5.5 $0.00047 $0.00253
Sonnet 5.5 $0.00024 $0.00127
Haiku 4.5 $0.00012 $0.00063

Measured 3mo ago against content hash df588d405ce0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3mo ago.

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. 3mo ago 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 (309 stars, last pushed 7mo ago), licensed MIT. It adds 118 tokens to every session and 633 once invoked, about $0.0005 per session on Opus 5.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

canvas-media compared with agents from other repositories

canvas-media next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
canvas-mediaAgriciDaniel/claude-canvasAgent3097mo agoMITA118Claude Code
verifierAgriciDaniel/claude-obsidianAgent17k1mo agoMITA60Claude Code
wiki-ingestAgriciDaniel/claude-obsidianAgent17k1mo agoMITA53Claude Code
wiki-lintAgriciDaniel/claude-obsidianAgent17k1mo agoMITA50Claude Code
pkm-captureAdrianV101/obsidian-pkm-pluginAgent16yesterdayMITA474Claude Code
researcherjohnfkoo951/cmdspace-pluginsAgent826d agoMITA201Claude Code
tdd-guidejohnfkoo951/cmdspace-pluginsAgent826d agoMITA221Claude Code