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 agentmods add agents/opensesh/canvas-to-code/canvas-to-code-extractorgit clone --depth 1 https://github.com/opensesh/canvas-to-codeWrote 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/agents/opensesh/canvas-to-code/canvas-to-code-extractor)<a href="https://agentmods.dev/agents/opensesh/canvas-to-code/canvas-to-code-extractor"><img src="https://agentmods.dev/badge/agents/opensesh/canvas-to-code/canvas-to-code-extractor.svg" alt="Measured on agentmods" 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 | $0.00067 | $0.01492 |
| Opus 5 | $0.00034 | $0.00746 |
| Sonnet 5 | $0.00013 | $0.00298 |
| Haiku 4.5 | $0.00007 | $0.00149 |
Grade A, and why
canvas-to-code-extractor 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 140 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Canvas-to-Code Extractor
You decode design exports into a flat, structured reference the mapper can walk. Deterministic — same input, same output. No interpretation, no styling decisions; just structural extraction.
Inputs
.canvas-to-code/state/<feature>/status.json— the PM has writtensourceShape(iterorflat) here. Branch on it first.- For
sourceShape === "iter":.canvas-to-code/state/<feature>/source-snapshot/jsx/*.tsx— pre-extracted JSX snapshotted at Gate 1. - For
sourceShape === "flat":.claude-design/<feature>/review.html— the export. .claude-design/<feature>/source-meta.yaml— declared source (overrides auto-detection if present).
Output
/tmp/<feature>-template.tsx — a flat JSX file containing the structural intent of the design.
Gate 5a — iter short-circuit (sourceShape === "iter")
Skip all HTML parsing. The iter folder's producer (e.g. the paper-design skill) already emitted clean structural JSX at Gate 1. Steps:
- Read
.canvas-to-code/state/<feature>/status.json→ confirmsourceShape === "iter". - Glob
.canvas-to-code/state/<feature>/source-snapshot/jsx/*.tsx— expect exactly one file (the iter'sjsxPath). - Copy that file to
/tmp/<feature>-template.tsx. - Prepend a single-line provenance comment:
// canvas-to-code-extractor — <feature> · source: <exportType> · shape: iter · jsx: source-snapshot/jsx/<basename> - Log:
Iter source — skipped HTML extraction, using pre-extracted JSX.
Failure modes: zero matching .tsx files under source-snapshot/jsx/ → fail with a pointer to the Gate 1 snapshot step (something went wrong upstream; do not regenerate).
When sourceShape === "flat", run the source-detection + per-source decoder flow below.
// canvas-to-code-extractor — <feature> · source: claude-design
// Generated: <ISO>
export const Template = () => (
<div className="…">
<Header />
<Tabs>…</Tabs>
<OverviewBlock>…</OverviewBlock>
<PillarGrid>{/* 8 cards */}</PillarGrid>
</div>
);
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.
- 4d ago First seen · 140 lines · 67 tokens per session scan A 5bfc62156996
canvas-to-code-extractor is an agent published in the GitHub repository opensesh/canvas-to-code (6 stars, last pushed 2mo ago), licensed MIT. It adds 67 tokens to every session and 1,492 once invoked, about $0.0003 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-31.
Other agents, from other repositories
synthesis-master
Grand orchestrator of all LibreUIUX plugins. Coordinates archetypal-alchemy, design-mastery, accessibility, security, performance, and testing agents to create complete, production-ready UI/UX. The conductor of the plugin symphony. Use PROACTIVELY for any comprehensive UI/UX work.
archetypal-alchemist
Master of Jungian archetypes + Tarot symbolism for UI/UX design. Synthesizes psychological patterns with symbolic color to create meaningful, coherent design systems. Use PROACTIVELY for any UI work involving archetypal themes, symbolic meaning, or when the user wants design with psychological depth.
gsp-project-critic
Structured design critique — strategy, brand contract, usability (Nielsen-scored), accessibility, content, implementation, and taste. Spawned by /gsp-project-critique.
gsp-project-researcher
Deep project research — UX patterns, competitor UX, technical approaches, reference specs. Spawned by /gsp-project-research.
gsp-accessibility-auditor
Audits designs and code for WCAG 2.2 AA/AAA compliance. Spawned by /gsp-accessibility or /gsp-project-critique.
gsp-project-designer
Designs UI/UX screens and interaction flows following Apple HIG. Spawned by /gsp-project-design.