claudemon

claudemon

Wild Pokemon appear while you work in Claude Code. Your prompts are steps through the grass — the longer the prompt, the further you walk, and the more chances something jumps out.

The status line in Claude tells you something is waiting. The game sits in a second terminal tab — that is where you go and fight it.

Charmander, drawn as a pixel sprite
Charmeleon
Charizard

How it works

Two things decide when something appears: how much you type, and how long Claude works. A prompt buys the steps and the turn spends them, so whatever jumps out does it with the grass already moving. Every twenty seconds Claude keeps working is another step — that half of the session is the half you actually have free.

One at a time, and only for half a minute. A Pokemon that appears while you are busy wanders off if you leave it there, so a long session never leaves a queue of battles waiting for you.

Several Claude tabs feed one world. One save, one Pokédex, one bag — and one pool of steps. The walking is wall clock rather than a sum, so four terminals working the same minute walk it once: opening tabs does not farm encounters, and the trainer keeps walking while any of them is working. What nobody could spend, because something was already in the grass, stays banked for the next one. The activity line counts them by state, so one Claude stuck on a permission prompt never hides the two still going.

Not everything out there is wild. Roughly one step in seven that turns something up turns up a trainer instead — a class, a name and a team behind them, on the same timer as anything else.

The original 151, and none of it leaves the machine. No account, no backend, nothing about you going anywhere. The plugin's hooks tell the game what Claude is doing, and that is the whole of the wiring.

Screens

The loop, in the order you meet it: you wait, something steps out of the grass, you fight it, and what you catch lands in the Pokédex and on your team.

The home screen: an activity line reading Claude is working, Bash, 1m14s, someone standing in a band of grass, and a team of six listed below with their levels and health
Home — waiting, which is most of it. The walk only moves while Claude does, so you can tell from across the desk without reading anything.
The home screen with a trainer waiting in the grass: Bug Catcher Marc, drawn as a pixel sprite most of the height of the terminal, over a line reading BUG CATCHER MARC wants to battle! and two Poké Balls marking a team of two
Trainers — sometimes what steps out of the grass is a person. The balls under the sprite are how many Pokemon they are carrying, and the timer runs the same as a wild one: leave them there and they walk off. A tall tab is what buys a sprite this size: the canvas costs half as many rows as columns, so height is what binds.
A trainer battle: Bug Catcher Marc at the top with two Poké Ball markers, facing your Charizard at Lv43
Trainer battle — they send out their team one after another, no running and no throwing balls at somebody else's Pokemon. Beating them pays out, and their Pokemon are worth more experience than a wild one.
A battle: a wild Vileplume at Lv42 facing your Charizard, both drawn as pixel sprites, with health bars and a FIGHT / BAG / POKÉMON / RUN menu
Battle — critical hits, the type chart, status conditions, PP. A ◓ by the foe's name means it is already in your Pokédex.
The Pokédex: the list of all 151 down the left with seen and caught markers, 97 of them caught, and Pikachu on the right with its base stats, catch rate and the thunder stone it evolves with
Pokédex — seen and caught are tracked apart, and the stats fill in for the ones you caught.
The team screen: six Pokémon listed on the left, and Pidgeot on the right with its health, experience, stats and moves
Team — details, moves, experience, enter to change your lead, and the box behind it.

The gyms

For when you would rather go looking for a fight than wait for one. Eight of them, one per type and easiest first: two trainers and then the leader, back to back, with no shop, no rest and nothing wild interrupting.

Nothing is written to disk while you are in there. Beat the leader and the badge is yours. Lose, give up or close the terminal and the whole run is undone — the experience, the money, the potions and the bruises, as if you had never gone in.

The gym screen: the eight Kanto gyms listed down the left with their type and level range, five badges won, Pewter selected, and Brock on the right under the Boulder Badge
The eight — easiest first, with the type they run, the levels their trainers bring and the badge marked won or not. enter walks in.
The gym screen with Saffron selected: the Marsh Badge not yet won, Leader Sabrina and her Psychic type, two trainers before the leader at Lv38 to 43, and a count of the potions and revives in the bag
Before you walk in — who is waiting, and what you are carrying. The potions in your bag are the potions you get: there is no shop and no healing past that door.
Inside the Saffron gym: a Gauntlet panel listing Psychic Johan beaten, Channeler Tamara next and Leader Sabrina still to come, the team below it with a poisoned Gengar, and a line reading enter, face the next one, Channeler Tamara
The run — the gauntlet on the way down, your team underneath it and nothing else: i for the bag, l to change your lead, and esc twice to walk out on all of it.

Install

Typed inside Claude Code. Nothing to clone.

What you need first

Not macOS Terminal. The sprites come out striped and stretched there, and no setting fixes it. Use any of the others.

Five steps

  1. Add the marketplace and install the plugin — that puts the hooks that make Pokemon appear in place.

    /plugin marketplace add zamarrowski/claudemon
    /plugin install claudemon@claudemon
  2. Restart Claude Code. It only picks up a plugin's commands and hooks at startup, so until you restart, the next line does not exist yet.

  3. Run the setup. It installs the claudemon command, the status line and the sprites, printing a line per step and saying so if one of them did not work.

    /claudemon-setup
  4. Restart Claude Code once more, so the new status line loads.

  5. In a second terminal tab, run claudemon. It asks for a name and a starter the first time, and after that it sits there waiting.

    claudemon
    Bulbasaur, drawn as a pixel sprite
    BULBASAUR
    Charmander
    CHARMANDER
    Squirtle
    SQUIRTLE

Then send a longish prompt in the Claude tab and watch the status line.

From a clone instead

For hacking on it, a clone works the same way and takes precedence over the installed copy.

git clone https://github.com/zamarrowski/claudemon
cd claudemon
node tools/install.mjs

The 151 Pokemon ship with the plugin, so the only thing the install downloads is the sprites, which takes a few seconds. Updating and uninstalling are in the README.

The trainer card

Your six, drawn at the size they deserve, over your name, the days you have been at it, the badges in the colour of the type that gave them, the achievements you have earned, and the hours Claude has spent working while you played.

The trainer card: six Pokémon in two rows of three, each with its name, level and health bar, under the trainer name, the days played and the Pokédex count, with the eight badges, the fifteen achievements and the totals along the bottom. The Gyarados is red rather than blue, with a mark beside its name saying it is shiny
s, on the TRAINER screen — it writes the card, opens it, and leaves you where you were. A shiny is drawn shiny and marked, so the one you spent four thousand encounters on is the one people see. The line along the bottom means the picture carries its own way back here.

Or from a terminal, if you would rather not open the game. --out somewhere.png writes it elsewhere, --no-open leaves the window shut.

claudemon card

Either way it lands in ~/.claudemon/card.png and opens in whatever shows PNGs on your desktop. The game writes the file itself — the same pixel font and palette you see in the terminal, encoded with nothing but node:zlib. No browser, no canvas library, no dependency.

The day care

DAY CARE on the home menu, or c on the team screen. Two slots, filled from your team or your box, and two things happen to whoever waits in them — both only while Claude is working and the tab is open.

They keep growing. A Pokémon left there gains EXP for every step the game counts, levels up where it stands and restats as it does. It picks up the moves that come with the levels it reaches, and with all four slots taken there is nobody in there to ask which one to drop — so the one it has known longest goes, the way the day care has always done it. It still does not evolve in there; you take it out for that.

A pair leaves an egg. Two that can breed leave one behind — drawn on the screen, with how far along it is beside it — and the screen tells you whether they get on before you wait for it. The rules are the ones the games use, and Ditto is the centre of them: Ditto plus anything that can breed at all — genderless, always-male, always-female — with the egg taking the other parent’s base form, which is what makes one Ditto a tool rather than a curiosity. Two of one evolution line, opposite genders, with the egg taking the mother’s base form, so a Nidorina and a Nidorino leave a Nidoran♀ even though the two Nidoran lines are separate Pokédex entries. And Ditto with Ditto, two of a gender, two unrelated lines and anything legendary leave nothing — not even with a Ditto.

It only comes along while you are there. The egg has steps of its own — one for every six seconds Claude works with this tab open, counted by the game rather than by the hooks. So there is no offline progress, nothing hatches in a closed tab, and an egg you left at 420 steps is at 420 steps when you come back. Six hundred of them, which is about an hour of Claude actually working.

Which is what makes it a shiny hunt. An egg rolls its own shiny check at 1 in 512 rather than the 1 in 4096 the grass uses, so a hatch is the one shiny roll in the game you can work towards instead of wait for. It gets the line, the colours and the sound a shiny in the grass gets, and the Pokédex remembers it the same way.

The day care screen: an egg drawn as a pixel sprite beside the line Something is moving inside and a progress bar reading 214 of 600 steps, over a line saying The two seem to get along, with Ditto at Lv30 and a shiny Pikachu at Lv33 in the two slots
An egg on the way — Ditto in one slot and whatever you are hunting in the other. The bar is the only thing that tells you how far along it is, and it only moves while Claude does.
The day care screen with no egg: Rattata at Lv15 and Magnemite at Lv16 in the two slots, under a line reading The two prefer to play with other Pokémon, and Magnemite's experience bar part of the way to the next level
Or just raising them — a pair that leaves no egg still gains EXP for every step. The screen says so before you spend an hour waiting for something that is not coming.

One egg at a time, and taking a parent back does not take the egg with it.

Trading, by code

The only social thing in here, and it needs no server at all. t, on any Pokémon of yours — in the team screen or in the box — tells you what it is about to cost you, and then writes a code.

CMON1-eJxNkMFugzAMht_F53QChxXIrdIeYNJ62rRDBKYgIKAEKBPi3edAWSfl...

It lands on your clipboard and in ~/.claudemon/trade.txt, and getting it to whoever is taking the Pokémon is your business rather than the game's. On the other side, r — on either of those two screens — takes a pasted code, and the Pokémon turns up with its nickname, its level, its IVs, its bruises and the PP it had when it left.

A trade only goes one way, and the game holds you to it: the Pokémon leaves your game the moment the code is made rather than when somebody uses it, and there is no undo — which is why the screen asks first. Every code carries who made it, so your own is refused in your own game, and a code that has been taken in once brings nothing the second time it is pasted. Your last Pokémon stays where it is; somebody has to fight.

The code is the Pokémon — deflated and written out in base64, about three hundred characters of it. Nothing opens a socket, and nothing about it leaves your machine unless you are the one who sends it.

What's in it

Controls

Arrow keys move, enter confirms, esc goes back, q quits. Any key advances a battle message. That is the whole scheme — it is the same everywhere.