Change what Claude Code does, and what it draws.
A mod is a small plugin of function hooks. It can block a tool call, rewrite a prompt, open a pane beside the transcript, paint pixels in the terminal, or restyle Claude Code's own interface. Everything here was recorded in real sessions, with working mods you can download.

draw-lab. The pane on the right and the cards in the transcript are drawn by the mod.A plugin folder and one function
The hooks module exports register(on). Each on(event, matcher?, hook) adds a hook, and every hook gets ($, e, next): the engine, the event, and the rest of the chain. Return without calling next to answer for yourself.
.claude-plugin/plugin.jsonName, version, descriptionhooks/hooks.json{ "modules": ["./register.tsx"] }hooks/register.tsxTypeScript, with JSX for drawing
export const register: Register = on => {
on('tool.call', { tool: 'Edit' }, ($, e, next) =>
PROTECTED.test(e.file_path)
? { deny: `${e.file_path} is protected here.` }
: next(e),
)
on('turn.complete', async ($, e, next) => {
$.ui.toast(`Turn done: ${tools} tool calls`)
return next(e)
})
}
What a mod can do

Guard tool calls
See every call before it runs. Deny it with a reason Claude reads, or rewrite its input.


Bands, status lines, toasts
Small readouts that redraw on their own when the state they read changes.

Panes with real controls
Buttons, inputs and selects whose handlers run in your mod. Markdown and code use Claude Code's own renderers.

Pixels in the terminal
A Raster repaints a grid of truecolour cells 15 times a second. An Image shows real pixels in Ghostty and kitty.

Modules with their own loop
A Client runs on the drawing thread with its own clock, keys and pointer. Good for games.

Restyle Claude Code
Redraw tool calls, the spinner, the turn timer and the prompt hint. Fifteen render sites in all.
Four mods, with source and tests
/tourmods-tourThe basics: a tool guard, a pane, a band, a status line and a toast./drawdraw-labEvery drawing element, plus four restyled parts of Claude Code./arcadearcadeSnake and Breakout in a pane. Each tool Claude runs drops a bonus./questquestA text RPG that Claude can narrate and run as game master.
Write, check, load
- Write the files. No scaffolding. Claude Code writes this build's types next to the mod as it loads, so
tscworks with no setup. - Validate.
claude plugin validate <folder>lists every hook and$call, and anything the engine would refuse. - Test.
claude plugin test <folder>runs*.test.tsfiles against the real engine. - Load.
claude --plugin-dir <folder>, or turn on hot reloading and the mod reloads after each edit.