Games·terminal·MIT
context-dungeon
A roguelike pane played by your session: errors spawn monsters, green tests slay them.

context-dungeon is a roguelike that plays itself from your real Claude Code session. Your remaining context is the party’s HP, a failed command summons a monster, a clean test run kills it and a commit opens a treasure chest. You run /dungeon and watch. Nothing asks the model anything, so it costs zero tokens.
What it does
- Failed commands summon a monster named after the error: a TypeError Wraith, an ENOENT Imp, an AssertionError Ghoul. Each new failure while it lives makes it stronger, up to a cap. A search that finds nothing (
grep,rg,diff) is an answer, not an error, and summons nothing. - Passing checks attack. A test run, typecheck or lint that comes back clean is a LIMIT BREAK: the monster dies and drops loot and gil, the game’s gold. A run that exits zero but still prints failures only scratches it.
- Commits open a treasure chest with loot and gil.
- Pull requests bring out the floor boss. Green runs wear it down, but it only falls when the PR is merged, and the merge opens the stairs to the next floor.
- Edits cast a spell on the file for a little XP.
- Finished turns give XP. Levels grow the party from one
@to four. - Compaction is a rest at a bonfire: HP back to full, kill streak lost.
- Running out of context wipes the party. A new one starts at whatever HP is left and cannot wipe again until context frees up.
A run lasts until the session ends, you run /clear or the party wipes. If it killed, looted or climbed, it then goes into the Hall of Fame, which keeps your total runs, kills, bosses and wipes, your best floor and level, and the top five runs, across sessions.
With the pane closed, a one-line ticker above the prompt shows your level, floor, HP and current foe, with a button to enter the dungeon. Click × or run /dungeon ticker to hide it.

Install
Needs Claude Code 2.1.287 or later.
claude plugin marketplace add ccdwyer/claude-mods
claude plugin install context-dungeon@ccdwyer-mods
The marketplace is the author’s catalogue of mods, which also lists speedrun-splits; the second command installs only context-dungeon. In a session that is already open, run /reload-plugins. Then /dungeon opens the pane and /dungeon fame the Hall of Fame.
How it works
The mod hooks every tool call but only watches. Each call runs first, and the mod never blocks it, changes its result or adds context to it. Calls from subagents and commands sent to the background are ignored.
For a Bash call it reads the command line, the output and whether the call failed. The command line is parsed only to tell a check (Jest, Vitest, pytest, tsc, ESLint, go test, cargo test, npm test and the like) from a search whose empty result is not an error. Monster names come from the error text, and the battle log never shows command lines, which can carry secrets. Commits and pull requests come from the git record Claude Code attaches to the result, not from the command text. For Edit and Write it reads the file path, and the log shows the file name.
HP is the context percentage from session.usage, read once at the end of each turn. The current run and its battle log live in the session’s state and are cleared when the session ends. Only finished runs are saved, in Claude Code’s local plugin store, and only as numbers: floor, level, kills, chests, bosses, how the run ended and when. It makes no network calls and never calls the model.
Limitations
- Only single commands attack. A passing
npm test && npm run lintdeals no damage, because the mod cannot tell which command the exit status belongs to; a leadingcd dir &&is fine. A failed compound line summons a monster only if its output names an error. Watch, list and dry-run modes never count. - A boss falls only on a merge Claude Code runs. A PR merged on GitHub’s website goes unseen.
- HP moves once per turn, not during it.
- The pane needs room. In a narrow terminal it does not open, and a toast asks you to widen the terminal.
- Draws only in interactive sessions. The author shows it in the terminal only; the Desktop app’s Code tab is untested.
Similar Claude Mods
intermission
Multiplayer Doom deathmatch in a pane while Claude works, handed back when it needs you.
claude-games
Four games above the prompt that react to Claude's tests and commits. Zero tokens.
claude-doom
The original Doom engine and Freedoom, playable in a Claude Code pane with /doom.
prompt-rail
Your session's prompts as a rail: hover to read one, click to jump back to it.
Popular Claude Mods
The whole directory →claude-latex
TeX math, TikZ diagrams and LaTeX blocks typeset in Claude's replies, in the desktop app.
harness-mods
Model routing, secret redaction, read cache and subagent accounting, per-guard modes.
Human in the loop
Claude assigns you what only you can do. Tasks wait in a pane until you answer.
claude-pets
A pixel pet in a pane that reacts to your session and levels up as you work.







