katashiro-canvas-file

katashiro-canvas-file is a skill for Claude Code, Codex from brettchien/katashiro. It costs 148 tokens per session (1,235 once invoked), scanned A, original, MIT.

A file-transfer skill for putting HTML, Markdown, slides, diagrams, or images into a Katashiro canvas without sending the file contents through the model. Katashiro is the connected chat interface that displays these canvases.

In plain words
What is it for?
Use it to publish an existing file to a Katashiro canvas, with a selected file type, title, and optional image caption.
Why use it?
It avoids loading large files into the conversation, which can consume a great deal of context and output space.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to publish an existing file to a Katashiro canvas, with a selected file type, title, and optional image caption.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/brettchien/katashiro/katashiro-canvas-file
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.

Any agent
npx skills add brettchien/katashiro --skill katashiro-canvas-file
Clone the repo
git clone --depth 1 https://github.com/brettchien/katashiro

Made for: Claude Code, Codex.

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 katashiro-canvas-file

README.md
[![agentmods](https://agentmods.dev/badge/skills/brettchien/katashiro/katashiro-canvas-file/github.svg)](https://agentmods.dev/skills/brettchien/katashiro/katashiro-canvas-file)
Your own site
<a href="https://agentmods.dev/skills/brettchien/katashiro/katashiro-canvas-file"><img src="https://agentmods.dev/badge/skills/brettchien/katashiro/katashiro-canvas-file/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 katashiro-canvas-file

Your own site · 80×15
<a href="https://agentmods.dev/skills/brettchien/katashiro/katashiro-canvas-file"><img src="https://agentmods.dev/badge/skills/brettchien/katashiro/katashiro-canvas-file.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 148 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,235 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00148 $0.01235
Opus 5.5 $0.00059 $0.00494
Sonnet 5.5 $0.00030 $0.00247
Haiku 4.5 $0.00015 $0.00123

Measured 29d ago against content hash 3e637c24104f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

katashiro-canvas-file scanned grade A with 1 finding 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 29d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/canvas-file.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- `bash`, `curl`, `jq` on the agent host (`base64` too, for images).
skills/katashiro-canvas-file/SKILL.md · 74 lines

How it starts

The opening of the file, as written. The whole thing — 74 lines — stays where its author put it; the contents beside it link to each section on GitHub.

katashiro-canvas-file

katashiro.canvas_open takes the canvas content as a tool argument. For a file that already exists — or anything large — do not read it and pass it yourself: every character is an output token (a 0.85 MB html page is about 250 K tokens). The script sends the file to the OpenAB facade directly, and you only see one line back.

Requirements

  • You are an agent running under OpenAB (the OPENAB_SESSION_TOKEN env var is set) and the current chat is a Katashiro chat — its browser tunnel is attached. In a Discord/Slack thread or a cron-triggered turn there is no Katashiro to put the canvas in.
  • Katashiro with kind: "html" in katashiro.canvas_open (check search_capabilities), for html.
  • bash, curl, jq on the agent host (base64 too, for images).

Usage

<skill-dir>/scripts/canvas-file.sh <file> --kind html --title "Checkout architecture"
<skill-dir>/scripts/canvas-file.sh <file> --kind html --title "…" --id cv_0123456789ab [--base 3]
  • --kind: html (≤ 4 MB), markdown / slides / mermaid (≤ 2 MB), image (≤ 5 MB; png, jpg, gif, webp, svg; optional --caption).
  • Text kinds must be UTF-8. The script refuses a file that is not (checked with iconv when the host has it); convert it first, or invalid bytes would turn into U+FFFD.
  • Without --id it creates a canvas and opens its tab in the background. With --id it writes a new revision of that canvas: on top of --base (the version you last wrote or read), or, without it, on top of whatever version the canvas has now. Pass --base when the user may have edited a markdown or slides canvas since your last write — a stale write is refused instead of replacing their edit.
  • The line it prints is canvas_open's result plus the kind and size, e.g. created canvas "Checkout architecture" — id cv_…, version 1 (opened in a background tab) (html, 846 KB). Keep the id for the next revision.

html canvases

  • The user first sees the page without its scripts (its HTML, CSS and SVG, sanitized). Its scripts run only after they click ▶ Run scripts, once per canvas: your later revisions of it then run at once (the header says vN 已自動執行) until they press ⏹ Stop scripts. Tell them to press it when the page needs interaction.
  • Make the page readable without scripts: put the content in the HTML (pre-rendered text, tables, SVG); script only adds interaction. Never write "press Run scripts" text or placeholders into the page — Katashiro shows its own hint, and yours stays on screen after the scripts run.
  • No network (fetch, XHR, WebSocket are blocked), no eval, no workers, no storage (an opaque origin), no clipboard. Fonts and images must be inline (data:). Downloads work after Run scripts.
  • Links the page draws open in a new tab only after the user confirms.
  • canvas_read on an html canvas returns its first 16 K characters (plus bytes and sha256); full: true for all of it. Your own source (the JSON you rendered it from) is the better thing to read and change.
  • An html canvas is replaced whole: no canvas_patch, no user edits.
  • The user can turn html canvases off in Settings; then canvas_open refuses kind html — say so and use markdown or an image instead.

Read the full file on GitHub · 74 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 29d ago Changed · +5 lines 3e637c24104f
  2. 1mo ago First seen · 69 lines · 148 tokens per session scan A 37f963c49dc1

Subscribe to this mod's changes

katashiro-canvas-file is a skill published in the GitHub repository brettchien/katashiro (10 stars, last pushed 14d ago), licensed MIT. It adds 148 tokens to every session and 1,235 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-29.

Related

katashiro-canvas-file compared with skills from other repositories

katashiro-canvas-file next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
katashiro-canvas-filebrettchien/katashiroSkill1014d agoMITA148Claude Code, Codex
browser-automationCrawlio-app/crawlio-browserSkill83mo agoApache-2.0A68Claude Code
web-researchCrawlio-app/crawlio-browserSkill83mo agoApache-2.0A26Claude Code
cloneCrawlio-app/crawlio-browserSkill83mo agoApache-2.0A21Claude Code
investigateCrawlio-app/crawlio-browserSkill83mo agoApache-2.0A32Claude Code
robot-trainingCrawlio-app/crawlio-browserSkill83mo agoApache-2.0A56Claude Code
compareCrawlio-app/crawlio-browserSkill83mo agoApache-2.0A22Claude Code