Ranking|Claude Code Mods

ModsCode / Claude Code Mods / Ranking / hamster

hamster

A pixel hamster above the prompt in the Claude desktop app: it lives on your context window and tells you when to compact or clear. 110 tips on saving tokens, skills, plugins and MCP servers.

Code you can checkTerminal + desktopBandStatus lineToastBoxButtonLinkSvgText
env vars, draws

What it does

  • Draws a band above the prompt, toasts
  • Watches tool calls
  • Hooks prompt.submit, session.start, turn.complete, ui.press
  • 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

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 hamster by nickpotet (band, status, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/nickpotet-hamster/
// 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, Button, Svg, Text, Link } = $.ui.resolve(e)
    const flag = '…'
    const name = '…'
    const hamsterSvg = '…'
    const moods = '…'
    const level = '…'
    const title = '…'
    const bar = '…'
    const alt = '…'
    const xpText = '…'
    const percent = '…'
    const fun = '…'
    const tag = '…'
    const text = '…'
    const href = '…'
    return (
      <Box flexDirection="column" rowGap={1} paddingX={2} paddingY={1} position="relative">
        <Box position="absolute" top={1} right={2} flexDirection="column" alignItems="flex-end">
          <Button plain>
            en
          </Button>
          <Box borderStyle="round" flexDirection="column" paddingX={1}>
            <Button plain>
              {`✓ ${flag} ${name}`}
            </Button>
            <Button plain>
              {`✓ ${flag} ${name}`}
            </Button>
            <Button plain>
              {`✓ ${flag} ${name}`}
            </Button>
            <Button plain>
              ✓ 🌐 Same as Claude
            </Button>
          </Box>
        </Box>
        <Box flexDirection="row" flexWrap="wrap" alignItems="center" columnGap={4}>
          <Svg source={`${hamsterSvg}`} alt={`Hamster, ${moods}`} width={144} height={102} />
          <Box flexDirection="column" flexGrow={1} minWidth={34} rowGap={1}>
            <Box flexDirection="column">
              <Box columnGap={1}>
                <Text dimColor>
                  {`LV. ${level} / 10`}
                </Text>
                <Text dimColor>
                  ·
                </Text>
                <Text dimColor>
                  {moods}
                </Text>
                <Text color="#e0b04a">
                  · Claude is working
                </Text>
              </Box>
              <Text bold>
                {title}
              </Text>
            </Box>
            <Box flexDirection="column">
              <Box columnGap={2} alignItems="center">
                <Box width={10}>
                  <Text dimColor>
                    XP
                  </Text>
                </Box>
                <Svg source={`${bar}`} alt={`${alt}`} height={8} />
                <Text dimColor>
                  {xpText}
                </Text>
              </Box>
              <Box columnGap={2} alignItems="center">
                <Box width={10}>
                  <Text dimColor>
                    Fullness
                  </Text>
                </Box>
                <Svg source={`${bar}`} alt={`${alt}`} height={8} />
                <Text dimColor>
                  {`context ${percent}%`}
                </Text>
              </Box>
              <Box columnGap={2} alignItems="center">
                <Box width={10}>
                  <Text dimColor>
                    Joy
                  </Text>
                </Box>
                <Svg source={`${bar}`} alt={`${alt}`} height={8} />
                <Text dimColor>
                  {`${fun}% (/clear or /compact will bring joy)`}
                </Text>
              </Box>
            </Box>
          </Box>
        </Box>
        <Box borderStyle="round" paddingX={2} columnGap={1} alignItems="flex-start">
          <Box width={17}>
            <Text bold>
              {tag}
            </Text>
          </Box>
          <Box flexGrow={1} flexShrink={1} flexDirection="column">
            <Text wrap="wrap">
              {text}
            </Text>
            <Text wrap="wrap">
              {"→ "}
              <Link href={`${href}`}>
                {href}
              </Link>
            </Text>
          </Box>
          <Box columnGap={2} alignItems="flex-start">
            <Button plain>
              ←
            </Button>
            <Button plain>
              →
            </Button>
            <Button plain>
              Got it
            </Button>
          </Box>
        </Box>
        {await next(e)}
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    const levelUp = '…'
    await $.ui.toast(`Context cleared: the hamster gained XP and joy.`)
    await $.ui.toast(`${levelUp}`)
    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.

hamster/hooks/register.tsx lines 432–582 · Band
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    if (e.props.hasSurvey) return next(e)

    const { Box, Text, Svg, Link, Button } = $.ui.resolve(e)
    const open = await read($, menu)
    const p = await read($, pet)
    const tick = await read($, frame)
    const stored = await read($, tip)
    const clockNow = await $.clock.now()
    // Until the first reading, the calm tip stands in so the card is never empty.
    const advice =
      stored.text !== ''
        ? stored
        : asTip(
            advise(
              { percent: p.food, fun: 100, ageMs: 0, idleMs: 0, limits: [], now: await $.clock.now() },
              lang,
              dismissed,
            ),
          )
    const tone = LOOK[advice.level]
    const { level, next: nextAt, share } = progressOf(p.xp)
    const mood = moodOf(p)
    const percent = Math.round(p.food)
    const ui = UI[lang]
    const title = titleOf(level, lang)

    // Without the room or the vector element, one plain line.
    if (e.surface !== 'desktop' || e.props.maxRows < 8) {
      return <Text dimColor>{ui.compact(title, level, percent, Math.round(p.fun))}</Text>
    }

    const xpText =
      nextAt === null ? `${Math.floor(p.xp)}` : `${Math.floor(p.xp)} / ${nextAt}`

    // One label column, so the three bars start and end on the same line.
    const row = (label: string, bar: string, alt: string, value: string) => (
      <Box columnGap={2} alignItems="center">
        <Box width={LABEL}>
          <Text dimColor>{label}</Text>
        </Box>
        <Svg source={bar} alt={alt} width={barWidth(SEGMENTS)} height={BAR_HEIGHT} />
        <Text dimColor>{value}</Text>
      </Box>
    )

    // No plate of its own: the hamster and its numbers sit straight on the
    // window. The same margin all round; one blank row between the blocks.
    return (
      <Box flexDirection="column" rowGap={1} paddingX={2} paddingY={1} position="relative">
        <Box position="absolute" top={1} right={2} flexDirection="column" alignItems="flex-end">
          <Button key="lang" plain onPress={noop}>
            {flagOf(lang)}
          </Button>
          {open && (
            <Box borderStyle="round" borderColor={tone.frame} flexDirection="column" paddingX={1}>
              {LANGS.map(l => (
                <Button key={`lang-${l.code}`} plain onPress={noop}>
                  {`${pref === l.code ? '✓' : ' '} ${l.flag} ${l.name}`}
                </Button>
              ))}
              <Button key="lang-auto" plain onPress={noop}>
                {`${pref === 'auto' ? '✓' : ' '} 🌐 ${ui.auto}`}
              </Button>
            </Box>
          )}
        </Box>
        <Box flexDirection="row" flexWrap="wrap" alignItems="center" columnGap={4}>
          <Svg
            source={hamsterSvg(p, tick, undefined, advice.level === 'info' ? null : advice.level)}
            alt={`${ui.hamster}, ${ui.moods[mood]}`}
            width={BAND.width}
            height={BAND.height}
          />
          <Box flexDirection="column" flexGrow={1} minWidth={34} rowGap={1}>
            <Box flexDirection="column">
              <Box columnGap={1}>
                <Text dimColor>{`${ui.level} ${level} / 10`}</Text>
                <Text dimColor>·</Text>
                <Text dimColor>{ui.moods[mood]}</Text>
                {e.props.isWorking && <Text color={GOLD}>{ui.working}</Text>}
              </Box>
              <Text bold>{title}</Text>
            </Box>
            <Box flexDirection="column">
              {row(
                ui.xp,
                barSvg(share, GOLD, SEGMENTS),
                ui.xpAlt(Math.round(share)),
                xpText,
              )}
              {row(
                ui.fed,
                barSvg(p.food, contextColor(p.food), SEGMENTS),
                ui.fedAlt(percent),
                `${ui.context} ${percent}%`,
              )}
              {row(
                ui.joy,
                barSvg(p.fun, JOY, SEGMENTS),
                ui.joyAlt(Math.round(p.fun)),
                `${Math.round(p.fun)}% ${ui.joyNote}`,
              )}
            </Box>
          </Box>
        </Box>
        {advice.text !== '' && (
          <Box
            borderStyle="round"
            borderColor={tone.frame}
            backgroundColor={tone.fill}
            paddingX={2}
            columnGap={1}
            alignItems="flex-start"
          >
            <Box width={TAG}>
              <Text bold color={tone.color}>{advice.tag}</Text>
            </Box>
            <Box flexGrow={1} flexShrink={1} flexDirection="column">
              <Text bold={advice.level !== 'info'} wrap="wrap">{advice.text}</Text>
              {advice.href ? (
                <Text wrap="wrap">
                  {'→ '}
                  <Link href={advice.href}>{advice.link ?? advice.href}</Link>
                </Text>
              ) : (
                advice.link && <Text dimColor wrap="wrap">{`→ ${advice.link}`}</Text>
              )}
            </Box>
            <Box columnGap={2} alignItems="flex-start">
              {advice.level === 'info' && !advice.id && (
                <Button key="back" plain onPress={noop}>
                  ←
                </Button>
              )}
              {advice.level === 'info' && !advice.id && held !== null && browsing(clockNow) && (
                <Button key="forward" plain onPress={noop}>
                  →
                </Button>
              )}
              {advice.id && (
                <Button key="dismiss" plain onPress={noop}>
                  {ui.gotIt}
                </Button>
              )}
            </Box>
          </Box>
        )}
      </Box>
    )
  })
Licence text (MIT)
MIT License

Copyright (c) 2026 nickpotet

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, Deny a tool call

What its code calls

env varstool callsremembers

What its code shows

Read from the source at commit 76dc77641e97 on 2026-10-11. 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.hamster/hooks/register.tsx
ParsesEvery file parses as TypeScript or JavaScript.11 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, the same in both
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).runs no program a Windows PC lacks
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.starts no programs
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, settings.json, 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).calls no tool, MCP server or command
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.asks nothing of the model
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: prompt.submit, tool.call · reads: ui.press · also: session.start, turn.complete, ui.render (AbovePrompt) · timers: 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: LANG; settings.json
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 nickpotet/claude-hamster
/plugin install hamster@claude-hamster
/reload-plugins

This installs the marketplace's latest commit, which may not be the one read here (76dc77641e97). 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/nickpotet/claude-hamster
git -C claude-hamster checkout 76dc77641e97916aa112471d7df495c237a239db
claude plugin validate claude-hamster/hamster
claude --plugin-dir claude-hamster/hamster

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 about it

With the ModsCode connector added, Claude can read this mod's code and what it reaches, and build on them. Ask it like this:

Read the ModsCode mod "nickpotet-hamster" with its code and make me one like it

Search them from Claude: the MCP connector

Similar mods

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/nickpotet-hamster.svg)](https://modscode.com/claude-mods/mods/nickpotet-hamster/)