Ranking|Claude Code Mods

ModsCode / Claude Code Mods / Ranking / pixel-pet

pixel-pet

A herd of pixel-art pets in the band above the prompt: they cheer when a turn ends, grow rounder as the context fills, sleep under a futon once the prompt cache goes cold, and a beckoning figurine offers /compact. A switch flips back to th…

Code you can checkTerminal + desktopBandToastBoxButtonSvg
runs programs, draws

What it does

  • Draws a band above the prompt, toasts
  • Adds /pet, /compact, /clear
  • Hooks engine.create, prompt.submit, session.start, turn.complete
  • Keeps its own state between turns
  • Starts processes

Good points

  • No network calls
  • Written in TypeScript
  • Has a desktop-specific branch
  • Handles errors

Code to start from

A starter ModsCode writes from the drawing it read, and the mod's own lines that draw, where there are any.

Starter (register.tsx)

register.tsx
import type { Register } from 'claude-code'

// Drawn like pixel-pet by GoatEatAny (band, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/goateatany-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, Button } = $.ui.resolve(e)
    const stage = '…'
    const alt = '…'
    const barSvg = '…'
    const manekiSvg = '…'
    const price = '…'
    const word = '…'
    const blank = '…'
    const costSvg = '…'
    const label = '…'
    return (
      <Box flexDirection="column">
        <Box flexDirection="row" flexWrap="nowrap" alignItems="center" columnGap={0}>
          <Box flexGrow={1} />
          <Svg source={`${stage}`} alt={`${alt}`} isInteractive />
          <Svg source={`${barSvg}`} width={2} alt="|" />
          <Box position="relative" flexShrink={0}>
            <Svg source={`${manekiSvg}`} alt={`招き猫が吹き出しで「${price} / ${word}」と手招き`} isInteractive />
            <Box position="absolute" top={0} left={0}>
              <Button label={`${blank}`} plain />
            </Box>
          </Box>
          <Box position="relative" flexShrink={0}>
            <Svg source={`${costSvg}`} alt={`${label}`} />
            <Box position="absolute" top={0} right={0}>
              <Button label={`${blank}`} plain />
            </Box>
          </Box>
          <Button label="◒" plain dimColor />
        </Box>
        {await next(e)}
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    const message = '…'
    await $.ui.toast(`Could not compact (${message}). Type /compact instead.`)
    await $.ui.toast(`Could not clear (${message}). Type /clear instead.`)
    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 1110–1269 · Band
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    if (e.props.hasSurvey) return next(e)

    const { Box, Text, Button } = $.ui.resolve(e)
    const { value: current = 'stats' } = await $.state.get(mode)

    // One glyph, a half-filled circle: two stacked page dots with no gap between them.
    // Top half filled is stats, bottom half is the pet. One cell wide and one row tall, so it
    // never pushes the status band onto a second line or makes the band taller. It names no
    // animal, so a new pet needs no new control.
    const toggle = (
      <Button
        key="toggle-view"
        label={current === 'pet' ? '◒' : '◓'}
        plain
        dimColor
        onPress={() => setMode($, current === 'pet' ? 'stats' : 'pet')}
      />
    )

    if (current === 'stats') {
      const inner = tightenRow(await next(e))
      // The switch keeps the band's right edge however narrow the window gets, and sits halfway
      // down it: when the status band wraps onto a second line, in the room left of the switch,
      // the switch stays centred on both lines rather than riding the top one.
      return (
        <Box flexDirection="row" alignItems="center">
          <Box flexGrow={1} flexShrink={1} marginRight={2}>{inner}</Box>
          <Box flexShrink={0}>{toggle}</Box>
        </Box>
      )
    }

    const pet = await currentPet($)
    const now = await $.clock.now()
    const { value: until = 0 } = await $.state.get(happyUntil)
    const { value: active = 0 } = await $.state.get(lastActive)
    const { value: rewarded = 0 } = await $.state.get(rewardUntil)
    const { value: fill = null } = await $.state.get(ctx)
    const { value: wrote = null } = await $.state.get(cacheTs)
    const { value: miss = null } = await $.state.get(cacheMiss)
    // The cache has expired: between turns, an hour past the last call.
    const cold = !e.props.isWorking && now >= rewarded && now >= until && wrote !== null && now - wrote > CACHE_TTL_MS
    const mood: Mood = now < rewarded ? 'reward'
      : now < until ? 'happy'
      : e.props.isWorking ? 'working'
      : cold || (active > 0 && now - active > SLEEP_AFTER_MS) ? 'sleep'
      : 'idle'
    const { value: spent = null } = await $.state.get(cost)
    const info = spent === null ? '' : usd(spent)
    const { value: lastTurn = null } = await $.state.get(turnCost)
    const { value: endedAt = 0 } = await $.state.get(turnAt)
    const turn: Turn | null = lastTurn !== null && lastTurn >= 0.005 && now - endedAt < COIN_MS ? { usd: lastTurn, agoMs: now - endedAt } : null
    // What carrying on would cost after the cache went cold, said in the beckoning cat's bubble.
    const price = cold && miss !== null ? `+${usd(miss)}` : ''
    const { value: by = 'cost' } = await $.state.get(metric)
    const { value: eff = null } = await $.state.get(efficiency)
    const { value: left = null } = await $.state.get(quota)
    const { value: together = 0 } = await $.state.get(turns)
    const reading: Reading = { cost: spent, efficiency: eff, context: fill, turns: together, quota: left }
    const label = metricLabel(by, reading)
    const herd = herdBy(by, reading)
    const { value: seed = 0 } = await $.state.get(coatSeed)
    const order = coatsFor(seed ?? 0, pet)
    const { value: poofedAt = 0 } = await $.state.get(poofAt)
    const { value: was = 0 } = await $.state.get(poofFrom)
    const poof: Poof | null = now - poofedAt < POOF_MS ? { from: was, agoMs: now - poofedAt } : null
    const { value: menuOpen = false } = await $.state.get(menu)
    const openMenu = () => $.state.set(menu, !menuOpen)
    // The open menu: every measure's figure, as the band shows it beside the bar (with names the
    // menu did not fit on one line), the one in use bright, the rest dim. Picking
    // one makes it the herd's measure and closes the menu.
    const choices = METRICS.map(x => (
      <Button key={`metric-${x.id}`} label={metricLabel(x.id, reading)} plain dimColor={x.id !== by} onPress={() => setMetric($, x.id)} />
    ))
    const full = fill !== null && fill >= HEAVY_CONTEXT_PCT
    // The herd moves heavily (slow, slumping) only while awake; it is chubby asleep too.
    const heavy = full && mood !== 'reward' && mood !== 'sleep'
    // The beckoning cat is the button, between turns only, asleep or awake: /compact while the
    // context is heavy; /clear, with the price of carrying on, once the cache has gone cold and
    // that price is worth avoiding (without a price, on a heavy context).
    const canClear = cold && (miss !== null ? miss >= CLEAR_NUDGE_USD : full)
    const canCompact = full && mood !== 'reward' && !e.props.isWorking
    const word = canClear ? '/clear' : '/compact'
    let beckon = canClear || (full && mood !== 'reward')
    // A costly turn startles the cheering cats ("!" instead of hearts), for that cheer alone.
    const startled = mood === 'happy' && lastTurn !== null && lastTurn >= TURN_USD.high && endedAt >= until - HAPPY_MS
    // How long ago the cheer or the reward began, for animations that run from it.
    const since = mood === 'reward' ? now - (rewarded - REWARD_MS) : mood === 'happy' ? now - (until - HAPPY_MS) : 0
    const press = () => (canClear ? clear($) : compact($))

    if (e.surface === 'desktop') {
      const { Svg } = $.ui.resolve(e)
      // The menu takes the band while it is open: the cats step aside for the five measures.
      if (menuOpen) {
        return (
          <Box flexDirection="row" flexWrap="wrap" alignItems="center" columnGap={1}>
            <Box flexGrow={1} />
            {choices}
            {toggle}
          </Box>
        )
      }
      // Room for the beckoning cat and its bubble (about 11 cells), then the figure and the next
      // message's price after a cold cache, drawn together right of the bar. On a band too narrow
      // for all of it beside a short track, the next price goes, then the beckoning cat.
      const room = (cat: boolean) => (cat ? Math.ceil(MANEKI_W / CELL_PX) + 1 : 0) + cellsOf(label) + 1
      if (e.props.bodyColumns - room(beckon) < 16 + 12) beckon = false
      const reserve = room(beckon)
      const width = stageWidth(e.props.bodyColumns - reserve, '')
      const alt = `${pet.name} ${herd}匹: ${pet.lines[mood]}${cold ? '(キャッシュ切れ)' : ''} (${label})`
      // Beside the beckoning cat the figure sits closer than it would to the bar.
      const gap = beckon ? 2 : BAR_GAP_PX
      const figureW = costWidth(label, '', gap)
      // The Svg sits directly in the row: wrapped in a Box, its frame gains a line's
      // descender below it and the band grows taller than the status row. The spacer takes
      // whatever the width estimate leaves, at the band's left edge. The track ends at the bar;
      // right of it, with no gaps, the beckoning cat when there is one, then the figure, in the
      // status band's own type. A blank plain Button is laid over the cat and over the figure
      // (a drawing cannot be pressed, a Button can): pressing the cat runs /compact or /clear,
      // pressing the figure opens the menu of measures.
      return (
        <Box flexDirection="row" flexWrap="nowrap" alignItems="center" columnGap={0}>
          <Box flexGrow={1} />
          <Svg source={stage(pet, mood, width, now, herd, Math.round(until), '', heavy, '', cold, turn, order, poof, since, false, fatOf(fill), beckon, startled)} width={width} height={VIEW_H * SCALE} alt={alt} isInteractive />
          <Svg source={barSvg()} width={2} height={VIEW_H * SCALE} alt="|" />
          {beckon ? (
            <Box position="relative" flexShrink={0}>
              <Svg source={manekiSvg(pet, word, canClear ? price : '')} width={MANEKI_W} height={VIEW_H * SCALE} alt={`${pet.name === '猫' ? '招き猫' : `手招きする${pet.name}`}が吹き出しで「${canClear && price !== '' ? `${price} / ` : ''}${word}」と手招き`} isInteractive />
              {canClear || canCompact ? (
                <Box position="absolute" top={0} left={0}>
                  <Button key="maneki" label={blank(MANEKI_W - BUTTON_PAD_PX, false)} plain onPress={press} />
                </Box>
              ) : null}
            </Box>
          ) : null}
          <Box position="relative" flexShrink={0}>
            <Svg source={costSvg(label, '', gap)} width={figureW} height={VIEW_H * SCALE} alt={label} />
            {/* Over the figure's text alone: set against the picture's right end (the text ends
                a few px short of it), its blank cut by the Button's own padding, so neither the
                gap after the bar nor the one before the switch can be pressed. */}
            <Box position="absolute" top={0} right={0}>
              <Button key="herd-label" label={blank(labelWidth(label) + (beckon ? 0 : 2) - BUTTON_PAD_PX)} plain onPress={openMenu} />
            </Box>
          </Box>
          {toggle}
        </Box>
      )
    }

    return (
      <Box flexDirection="row" columnGap={1}>
        <Text>{pet.face[mood]}</Text>
        <Text>{pet.lines[mood]}</Text>
        {menuOpen ? choices : <Button key="herd-label" label={label} plain dimColor onPress={openMenu} />}
        {turn === null ? null : <Text dimColor wrap="truncate-end">{`+${usd(turn.usd)}`}</Text>}
        {canClear || canCompact ? <Button key="compact" label={canClear && price !== '' ? `${word} (${price})` : word} onPress={press} /> : null}
        {toggle}
      </Box>
    )
Licence text (MIT)
MIT License

Copyright (c) 2026 GoatEatAny

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.

How to build this: Band above the prompt, Rewrite the prompt

What its code calls

runs programsreads filesenv varsrememberscalls tools

What its code shows

Read from the source at commit 925fd5ac947b. 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 readEvery module hooks/hooks.json names was read.plugins/pixel-pet/hooks/register.tsx
ParsesEvery file parses as TypeScript or JavaScript.4 files parsed
All its code is in the modEvery import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod
ReadableNo 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 openNetwork 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 drawsThe 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 lineWhether 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 WindowsWhether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).plugins/pixel-pet/hooks/register.tsx:771 /bin/sh (not on Windows)
NetworkWhether every fetch names its https host in the code.no network
ProgramsWhether every program it starts is named in the code and is not a shell, an interpreter or a network tool.plugins/pixel-pet/hooks/register.tsx:771 /bin/sh (a shell or interpreter); plugins/pixel-pet/hooks/register.tsx:792 python3 (a shell or interpreter)
Reads and sendsWhether it both reads something of yours (files, environment variables, the transcript, settings) and reaches outside (the network, an MCP server, another session, telemetry).reads environment variables, files, but reaches nothing outside
Keys in the sourceWhether the source holds what looks like an API key or a private key.no keys in the source
LicenceAn 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
Settings hooksHooks declared in hooks/hooks.json or plugin.json beside the module: a command (a shell when it has no args), an HTTP request, an MCP tool or a model prompt at an event. They run outside $.no settings hooks: its function hooks alone
Servers it shipsMCP servers (a program, or a URL; a headersHelper is a shell command; a .mcpb bundle is unpacked at run time), LSP servers, monitors (a shell command for the whole session) and bin/ (on the PATH of the Bash tool).ships no MCP or LSP server, no monitor, no bin/
Skills, commands, agentsWhat its Markdown declares beyond text: allowed-tools granted for the turn, hooks added when a skill is invoked, a command run before Claude reads the skill.no skills, commands, agents or workflows
Tools and MCPWhether every tool it calls through $.tool.call and $.mcp.call is named in the code, and none is a shell (Bash through the tool runs a shell without $.process).command.run: /compact; command.run: /clear
Asks of the modelCompletions it runs ($.model.complete, fork, classify), subagents it spawns, prompts it submits as you, and the tools, commands and agents it adds.adds command pet
Events it hooksBy what a hook there can do: gates (refuse a tool call, a prompt, a setting, another plugin), shapes (what the model reads: the system prompt, tool descriptions, each request), reads (your input, the events of the settings hooks, every event with *), and the rest.gates: command.run (pet, compact, clear), prompt.submit · shapes: engine.create · also: session.start, turn.complete, ui.render (AbovePrompt) · timers: clock.after, clock.every
Reads, by nameThe environment variables and files it names, and whether it reads the transcript, settings.json, the prompt box or the mouse selection.env: OS; files: its own folder/scripts/usage.py
Writes, by nameThe files and environment variables it names, and whether it changes settings, the prompt box, the clipboard, the conversation (a row the model reads) or another session.writes no files, environment variables, settings or conversation rows

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 its code (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.

From its marketplace

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 GoatEatAny/cc-desktop-statusline
/plugin install pixel-pet@cc-desktop-statusline
/reload-plugins

This installs the marketplace's latest commit, which may not be the one read here (925fd5ac947b). Compare them before you install. /reload-plugins loads it into a session that is already open.

Try the commit ModsCode read

No marketplace needed. In a terminal, clone the repository, check out the commit read, validate the mod, and load it for one session:

git clone https://github.com/GoatEatAny/cc-desktop-statusline
git -C cc-desktop-statusline checkout 925fd5ac947baceaef35ba48af8aa63eb0b20b60
claude plugin validate cc-desktop-statusline/plugins/pixel-pet
claude --plugin-dir cc-desktop-statusline/plugins/pixel-pet

The validate line lists the events the mod hooks and what it asks Claude Code to do, without running it. The last line loads the mod for this session only and writes nothing to your settings. If the author has rewritten history, the commit may no longer exist.

Ask Claude or ChatGPT about it

With ModsCode added as a connector, Claude or ChatGPT can read this mod's code, what it reaches and how its controls are wired, and build on them. Ask it like this:

Read the ModsCode mod "goateatany-pixel-pet" with its code and make me one like it

Add the ModsCode MCP to Claude or ChatGPT

Similar mods

More from this repository

Badge for your README

If this is your mod, paste this into your README. It links to this page.

README.md
[![ModsCode](https://modscode.com/badge/goateatany-pixel-pet.svg)](https://modscode.com/claude-mods/mods/goateatany-pixel-pet/)