cratis-components-build-canvas

cratis-components-build-canvas is a skill for Claude Code, Codex from Cratis/AI. It costs 43 tokens per session (696 once invoked), scanned A, original, MIT.

A guide to building a board that users can pan and zoom while its items stay positioned in a larger coordinate space. Items can be regular HTML content or Pixi graphics, a library for drawing interactive graphics.

In plain words
What is it for?
Use it to build boards such as book maps, diagram editors or other visual layouts with positioned items, zoom controls and item-selection actions.
Why use it?
It explains how to keep item positions in application data while the view moves and scales. It also covers choosing accessible, keyboard-focusable content instead of lightweight graphics when needed.

Skill for Claude CodeCodex

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

Good fit Use it to build boards such as book maps, diagram editors or other visual layouts with positioned items, zoom controls and item-selection actions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cratis/ai/cratis-components-build-canvas
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 Cratis/AI --skill cratis-components-build-canvas
Clone the repo
git clone --depth 1 https://github.com/Cratis/AI

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 cratis-components-build-canvas

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/cratis/ai/cratis-components-build-canvas"><img src="https://agentmods.dev/badge/skills/cratis/ai/cratis-components-build-canvas.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 696 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.00043 $0.00696
Opus 5.5 $0.00017 $0.00278
Sonnet 5.5 $0.00009 $0.00139
Haiku 4.5 $0.00004 $0.00070

Measured today against content hash 558c288c2fa3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cratis-components-build-canvas 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 today.

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.

.cratis/ai/skills/cratis-components-build-canvas/SKILL.md · 49 lines

How it starts

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

Place a book on a pannable board

Default to DOM CanvasItem for content that needs keyboard focus. Choose this when displaying dense markers: use Pixi items. Keep positions in host data; panning and zooming do not save them.

  1. Install a pixi.js version that satisfies the Components peer range. Import Canvas and CanvasItem from @cratis/components/Canvas. Render BookBoard inside the app's CratisComponentsProvider from @cratis/components.
  2. Give the containing element a height and set the canvas to fill it in the slice stylesheet. Use the built-in zoom controls; they stay fixed when the board moves. Choose this when supplying equivalent host navigation controls: pass showControls={false}.
  3. Pass the book ID, title and its world coordinates from the board screen. Place its button inside CanvasItem; call the screen's openBook handler with the same ID.
import { Canvas, CanvasItem } from '@cratis/components/Canvas';
import './BookBoard.css';

type BoardBook = { id: string; title: string; x: number; y: number };
export function BookBoard({ book, openBook }: { book: BoardBook; openBook: (id: string) => void }) {
    return <div className="book-board">
        <Canvas className="book-board__surface">
            <CanvasItem x={book.x} y={book.y}>
                <button type="button" onClick={() => openBook(book.id)}>{book.title}</button>
            </CanvasItem>
        </Canvas>
    </div>;
}

In BookBoard.css, set .book-board { width: 100%; height: 480px; } and .book-board__surface { width: 100%; height: 100%; }.

Pan or zoom: the book should move with the board. Tab to its button and activate it; the handler should receive the book ID, not its current coordinates.

Avoid

  • Don't add the camera offset to x or y; the canvas applies it when it positions the item.
  • Don't put a fixed control inside a CanvasItem. Items move and scale with the board. Pass a CanvasItem ID when a board Region must recognize the item; the click callback does not need a registry ID.

Read the full file on GitHub · 49 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. today Changed · +7 lines · +2 tokens per session 558c288c2fa3
  2. 2d ago First seen · 42 lines · 41 tokens per session scan A 5baf6c9c15f7

Subscribe to this mod's changes

cratis-components-build-canvas is a skill published in the GitHub repository Cratis/AI (4 stars, last pushed today), licensed MIT. It adds 43 tokens to every session and 696 once invoked, about $0.0002 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-11-27.

Related

cratis-components-build-canvas compared with skills from other repositories

cratis-components-build-canvas next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cratis-components-build-canvasCratis/AISkill4todayMITA43Claude Code, Codex
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill101ktodayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill395ktodayMITA36Claude Code
systematic-debuggingobra/superpowersSkill330k2d agoMITA21Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill14ktodayCC0-1.0A113Claude Code, Codex
next-cache-components-adoptionvercel/next.jsSkill144ktodayMITA95Claude Code