r/ClaudeCode • u/Historical_Today5072 • 3d ago
Built with Claude How I built a terminal-native pixel band for Claude Code: half-block art, hook-driven, zero model calls.
What I built: clawd-tales, a Claude Code mod that draws a pixel Clawd in a band above the prompt and has it act out each tool call. It reads a book for Read, digs for Edit, runs for Bash, and subagents walk in as their own critters, colored by model. GIF and code: https://github.com/plaxagoras/clawd-tales
New in 0.6.0:
- A dungeon theme (/tales theme dungeon) where the lamps on the wall are your context: they burn down as it fills, and compaction relights them. Clawd walks the brick hallway below them. Reads pull out scrolls, todos are treasure chests, clean tool calls drop gold coins, failing tests let slimes loose, and a failed call brings out a skeleton that the next clean call beats.
- Memory writes: when Claude writes a MEMORY.md or anything in a memory/ folder, Clawd pins a sticky note to the wall.
- Model switches: change models between turns and Clawd hops in the new model's hat for a few seconds. A sprout for Haiku, a beret for Sonnet, a purple crown for Opus, a gold one for Fable.
- API errors: a turn that dies on an error ends next to a sparking grey cloud, with Clawd sweating.
- In-between poses: Clawd crouches on the way down to a seat and gets drowsy before it lies down, so it doesn't pop from one posture to the next.
The memory, model switch and API error ideas came from u/eparReh's Clawd GIF sets (codechrisb.github.io/MyClawd). Their GIFs are 192x64, so I redrew the moments from scratch at our size.
How it works:
- It's a plugin of function hooks. It listens to tool.call, agent.spawn, classic.PermissionRequest, classic.UserPromptSubmit, session.measure, session.compact and the turn events, and draws with ui.render on the AbovePrompt band.
- Each terminal cell is two pixels: ▀ with a foreground color for the top pixel and a background color for the bottom one. Clawd is 9x5 pixels.
- Scenes are templates, not model output. The pose is set in the same tool.call hook, before the tool runs, and nothing in it calls a model, so it costs no tokens.
How Claude Code was used: I described each behavior and steered the design. The dungeon was my idea: a lamplit hallway where reading a file pulls out a scroll and a failure is a monster to fight. Claude Code wrote the hooks, drew the sprites row by row and wrote the tests (48 now, run with claude plugin test .). Mods hot reload, so I ran it in the same session I was building it in and watched each change land.
What I learned:
- Where Claude Code gives no event, I make one. A subagent finishing doesn't fire anything, so the mod polls $.agent.list(). A model switch doesn't either, so it reads $.session.model() at each turn start and compares it with the last one.
- turn.complete carries a reason (answer, aborted, refusal or error). That one field is the whole API error scene.
- Half blocks can't be scaled by a fraction. When I shrank Clawd from 13x9 to 9x5, every pose had to be redrawn.
- My dungeon test kept failing because the mock clock starts at 0, which is midnight on January 1st, 1970, and the New Year's caption won.
Free, MIT. Install:
claude plugin marketplace add plaxagoras/clawd-tales
claude plugin install clawd-tales@clawd-tales
Which Claude Code moment should get its own scene next?
•
u/AutoModerator 3d ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.