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.
npx skills add brettchien/katashiro --skill katashiro-canvas-filegit clone --depth 1 https://github.com/brettchien/katashiroWrote 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.
[](https://agentmods.dev/skills/brettchien/katashiro/katashiro-canvas-file)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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). 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_TOKENenv 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"inkatashiro.canvas_open(checksearch_capabilities), for html. bash,curl,jqon the agent host (base64too, 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
iconvwhen the host has it); convert it first, or invalid bytes would turn into U+FFFD. - Without
--idit creates a canvas and opens its tab in the background. With--idit 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--basewhen 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), noeval, 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_readon an html canvas returns its first 16 K characters (plusbytesandsha256);full: truefor 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_openrefuses kind html — say so and use markdown or an image instead.
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.
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.
- 29d ago Changed · +5 lines 3e637c24104f
- 1mo ago First seen · 69 lines · 148 tokens per session scan A 37f963c49dc1
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.
katashiro-canvas-file compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| katashiro-canvas-filebrettchien/katashiro | Skill | 10 | 14d ago | MIT | A | 148 | Claude Code, Codex |
| browser-automationCrawlio-app/crawlio-browser | Skill | 8 | 3mo ago | Apache-2.0 | A | 68 | Claude Code |
| web-researchCrawlio-app/crawlio-browser | Skill | 8 | 3mo ago | Apache-2.0 | A | 26 | Claude Code |
| cloneCrawlio-app/crawlio-browser | Skill | 8 | 3mo ago | Apache-2.0 | A | 21 | Claude Code |
| investigateCrawlio-app/crawlio-browser | Skill | 8 | 3mo ago | Apache-2.0 | A | 32 | Claude Code |
| robot-trainingCrawlio-app/crawlio-browser | Skill | 8 | 3mo ago | Apache-2.0 | A | 56 | Claude Code |
| compareCrawlio-app/crawlio-browser | Skill | 8 | 3mo ago | Apache-2.0 | A | 22 | Claude Code |