modscode / Gallery / pixel-pet
pixel-pet
A pixel pet above the prompt that acts out each tool call, plus an HP/MP/ST HUD below it
What it does
- Draws a band above the prompt, the status line, toasts
- Watches tool calls and can refuse them
- Hooks session.start
- Keeps its own state between turns
Good points
- No network calls
- Starts no processes
- Written in TypeScript
- Has a desktop-specific branch
Code to start from
Two kinds: a starter modscode writes from the design above, and the lines of the mod's own code that draw it.
Starter (register.tsx)
import type { Register } from 'claude-code'
// Drawn like pixel-pet by halluqinate (band, status, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/namenomeaning-pixel-pet/
// Written by modscode from that reading, not copied from the mod: use it as you like.
// Each value below stands for one the mod works out at run time; put in your own.
export const register: Register = on => {
// the band above the prompt; what else goes there is drawn under it
on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
const { Box, Svg, Text } = $.ui.resolve(e)
const encodeSvg = '…'
const name = '…'
const mode = '…'
const line = '…'
return (
<Box flexDirection="column">
<Box alignItems="flex-end">
<Box>
<Svg source={`${encodeSvg}`} alt={`${name}, ${mode}`} height={80} />
</Box>
<Text bold>
{line}
</Text>
</Box>
{await next(e)}
</Box>
)
})
on('session.start', async ($, e, next) => {
const err = '…'
const errors = '…'
await $.ui.status(`pixel-pet: ${err}`)
await $.ui.toast(`pixel-pet: your theme no longer reads (${errors}). Showing the slime.`)
return next(e)
})
}
The mod's own code
Shown under the mod's licence (MIT); its text is below. Keep the notice if you copy these lines.
plugins/pixel-pet/hooks/register.tsx lines 303–403 · Band
on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
try {
if (e.props.hasSurvey) {
return next(e)
}
isWorking = e.props.isWorking
bodyColumns = e.props.bodyColumns
if (!body) {
body = await keptBody($)
}
const a = await read($, anim)
const now = await $.clock.now()
const elapsed = now - a.since
const views = minisOnScreen(minis, now)
// A leap is the run mode playing the jump clip, slowed, while the pet travels.
const drawn = a.leap ? { mode: 'jump' as const, ms: leapClipMs((now - a.leap.since) * settings.pace) } : { mode: a.mode, ms: elapsed * settings.pace }
const picture = compose(body, drawn.mode, drawn.ms, a.dir, hud ? mood(hud) : 'ok', views)
const extra = views.length > MAX_MINIS ? ` (+${views.length - MAX_MINIS} minis)` : ''
const line = settings.statusLine ? statusLine(a.mode, a.since, elapsed, a.target, body.look.lines[a.mode]) + extra : ''
if (showsError) {
showsError = false
$.ui.status(undefined)
}
const scene = sceneLayout(body)
if (e.surface === 'terminal' && scene && body.scene) {
const { Box, Raster, Text } = $.ui.resolve(e)
const width = scene.width
const textW = line ? lineWidth(line) + 3 : 0
const left = Math.max(0, Math.min(Math.round(a.x), width - picture.w - textW))
const band = drawBand(body, body.scene, scene, picture, left, now)
const cells = (x: number, y: number, w: number, h: number) => encodeCells(crop(band, x, y, w, h))
// The status line cuts a hole in the band; the band shows above, below, and right of it.
const textAt = left + picture.w
const shown = Math.min(textW, width - textAt)
const rest = width - textAt - shown
return (
<Box flexDirection="column" height={ROWS + GROUND_ROWS}>
<Box height={ROWS}>
<Raster key="pet" columns={textAt} rows={ROWS} cells={cells(0, 0, textAt, HEIGHT)} />
{shown > 0 && (
<Box key="line" flexDirection="column" width={shown}>
<Raster key="above" columns={shown} rows={ROWS - 2} cells={cells(textAt, 0, shown, HEIGHT - 4)} />
<Text color={lineColor(a.mode, body.look.lineColors)} bold wrap="truncate">
{` › ${line}`}
</Text>
<Raster key="below" columns={shown} rows={1} cells={cells(textAt, HEIGHT - 2, shown, 2)} />
</Box>
)}
{rest > 0 && <Raster key="rest" columns={rest} rows={ROWS} cells={cells(textAt + shown, 0, rest, HEIGHT)} />}
</Box>
<Raster key="ground" columns={width} rows={GROUND_ROWS} cells={cells(0, HEIGHT, width, GROUND_H)} />
</Box>
)
}
if (e.surface === 'terminal') {
const { Box, Raster, Text } = $.ui.resolve(e)
const room = Math.max(0, bodyColumns - picture.w - line.length - 4)
return (
<Box height={ROWS}>
<Box marginLeft={Math.min(Math.round(a.x), room)} alignItems="flex-end">
<Raster key="pet" columns={picture.w} rows={ROWS} cells={encodeCells(picture)} />
{line && (
<Box marginBottom={1} marginLeft={1}>
<Text color={lineColor(a.mode, body.look.lineColors)} bold>
› {line}
</Text>
</Box>
)}
</Box>
</Box>
)
}
if (e.surface === 'desktop') {
const { Box, Svg, Text } = $.ui.resolve(e)
return (
<Box alignItems="flex-end">
<Box marginLeft={Math.round(a.x)}>
<Svg source={encodeSvg(picture)} alt={`${body.name}, ${a.mode}`} width={picture.w * 4} height={80} />
</Box>
{line && (
<Text color={lineColor(a.mode, body.look.lineColors)} bold>
{line}
</Text>
)}
</Box>
)
}
return next(e)
} catch (err) {
showsError = true
$.ui.status(`pixel-pet: ${String(err)}`)
return next(e)
}
})Licence text (MIT)
MIT License Copyright (c) 2026 halluqinate Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
What its code calls
writes filesdrives Claudetool callsremembers
The design, read from code
Drawn from the mod's source at the commit read, not from a run: a list is drawn three times, a condition takes its first branch that draws in the desktop app, and a value only the run time knows is shown as a made-up sample (dotted underline) or left out. Colours and type are this site's.
What its code shows
Read from the source at commit 02eb10af1788 on 2026-10-06. The first group decides whether a mod is listed; the rest is for you to weigh. A later commit is not read until the next crawl.
| Decides the listing: code you can check | |
|---|---|
| Entry read | Every module hooks/hooks.json names was read.plugins/pixel-pet/hooks/register.tsx |
| Parses | Every file parses as TypeScript or JavaScript.10 files parsed |
| All its code is in the mod | Every import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod |
| Readable | No minified lines, no eval or new Function, no import of a computed path, no encoded blobs.no minified code, no eval, no encoded blobs |
| Calls in the open | Network and programs are reached as $.http.fetch and $.process.run in place, never passed around.every call outside goes through $ in the open |
| For you to weigh before installing | |
| Where it draws | The terminal, the desktop app, both, or nothing (hooks only: a guard or a prompt rewriter), as its code says. Shown, never a reason to leave a mod out.draws in the terminal and the desktop app, with its own branch for the desktop |
| Install line | Whether its repository's own .claude-plugin/marketplace.json lists it, so it installs from that marketplace with the lines on its page.listed in its repository's .claude-plugin/marketplace.json: installs from there |
| Programs on Windows | Whether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).runs no program a Windows PC lacks |
| Network | Whether every fetch names its https host in the code.no network |
| Programs | Whether every program it starts is named in the code and is not a shell, an interpreter or a network tool.starts no programs |
| Reads and sends | Whether it both reads files or environment variables and reaches the network.reaches no network |
| Keys in the source | Whether the source holds what looks like an API key or a private key.no keys in the source |
| Licence | An open licence (MIT, Apache-2.0, BSD, ISC, Unlicense, 0BSD, CC0) with its text lets modscode show its code; otherwise the code is linked.MIT |
This is a reading of the code text, not a security review: it does not run the mod, and it cannot see what a program the mod starts does. The check before installing is yours. How mods are chosen
Install it
Check it yourself before you install it. Mods run unsandboxed, with your permissions, and modscode does not vouch for what this code does. Read the code below (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.
Its repository is its marketplace. Add that marketplace (in the terminal with these commands, or in the desktop app's plugin settings) and install the mod from it:
/plugin marketplace add Namenomeaning/pixel-pet/plugin install pixel-pet@pixel-petThis installs the marketplace's latest commit, which may not be the one read here (02eb10af1788). Compare them before you install.
Ask Claude about it
With the modscode connector added, Claude can read this design, what its code reaches and its code, and build on them. Ask it like this:
Read the modscode design "namenomeaning-pixel-pet" with its code and make me a pane like itSearch them from Claude: the MCP connector
Similar designs
-
Auto compact%System tools Compact▲Context is already at 42%, past Weekly%. Auto compact:NowAfter my next compactOnly in new chatsUsage limits show after the first reply.Auto compactToolsbuild42%Toolsbuild42%Toolsbuild42%Context12.4 free of 12.4k42% usedbuild12.4kbuild12.4kbuild12.4kAsk Claude…claude-code-usage-quota: Compact
-
spending-effort-with-jev: no TypeSafe API key, so effort tips are off. Set it in /plugin.⚠ effort: long run, fuzzy spec → have Claude interview you, then go maxAsk Claude…
-
5h▰▰▰▰▰▰▰▰▱▱▱▱▱▱▱▱3%Winding downWinding downWinding down7d▰▰▰▰▰▰▰▰▱▱▱▱▱▱▱▱3%Winding downWinding downWinding downctx3 / 3Winding downWinding downWinding downWinding downWinding downWinding down./click-probe.tsx●RetryingRefreshing…Long run ✓Winding downWinding downWinding downAsk Claude…
-
✦ explain as pick how Claude answers×3 ● build3 ● build3 ● build▸ VideoAsk Claude…
-
oxen-pet: your theme no longer reads (3). Showing .oxen-pet: the build theme does not read (). Showing .Ask Claude…
-
Ask Claude…superpowersϟ Arc tokens showing buildNot now██ FinalFinal42%:1 ✓██ FinalFinal42%:1 ✓██ FinalFinal42%:1 ✓███ brand gradient (OKLCH)Not now██ FinalFinal42%:1 ✓██ FinalFinal42%:1 ✓██ FinalFinal42%:1 ✓███ brand gradient (OKLCH)Not now██ FinalFinal42%:1 ✓██ FinalFinal42%:1 ✓██ FinalFinal42%:1 ✓███ brand gradient (OKLCH)d darkl lightz daltonizeda ansiu auto