ccdwyer/context-dungeon

一个会根据真实 Claude Code 会话自行运行的 roguelike:context 是 HP,错误会生成怪物,绿色测试会击杀它们,提交会打开宝箱,而 PR 是楼层首领。
ccdwyer/context-dungeon

Context Dungeon 是一个 Claude Code 插件,会把你的实时会话变成自行运行的 roguelike。用 /dungeon 打开它,观察剩余 context window 充当队伍 HP,失败的命令和测试会生成以错误命名的怪物,通过的运行会发动攻击(干净的运行会成为带有战利品的 LIMIT BREAK),真实提交会打开宝藏箱,pull request 则变成楼层首领。完成回合会获得 XP,压缩会在篝火旁休息,而 context 用尽会触发记录在 Hall of Fame 中的团灭。提示列上方的一行 ticker 显示 HP 和当前敌人,可用 /dungeon ticker 切换。Mod 只观察,不会阻止或重写工具调用;它会忽略子代理和后台命令,也绝不记录命令行。通过 /plugin marketplace add ccdwyer/claude-mods 和 /plugin install context-dungeon@ccdwyer-mods 安装。它完全在本地运行,不访问网络,并在 Claude Code 的本地插件存储中保存统计信息,采用 MIT 许可证。
请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。
claude plugin marketplace add ccdwyer/context-dungeon claude plugin install context-dungeon

A roguelike that plays itself from your real Claude Code session. Open it with /dungeon and watch your work turn into a dungeon crawl.
| In your session | In the dungeon |
|---|---|
| Context window remaining | The party's HP |
| A failing command or test run | A monster spawns, named after the error: TypeError Wraith, ENOENT Imp, Red Test Tonberry. A search that finds nothing (rg, grep, diff) doesn't count |
| Another failure while it's alive | It feeds on the error and grows stronger, up to a cap |
| A passing test run, typecheck or lint | An attack. A clean run is a LIMIT BREAK that slays the foe and drops loot |
| A real commit (from Claude Code's git metadata, not the command text) | A treasure chest |
| A pull request opened | The floor boss appears |
| The pull request merged | The boss falls and the stairs to the next floor open |
| Each finished turn | XP; levels grow the party |
| A compaction | Resting at a bonfire: HP restored, kill streak spent |
| Running out of context | A wipe. The run goes into the Hall of Fame and a new party gathers; it can't wipe again until context frees up |
Runs, best floor, best level and the top five runs are kept across sessions in the Hall of Fame. When the pane is closed, a one-line ticker above the prompt shows HP and the current foe. Press × to hide it, or run /dungeon ticker to toggle it.
The mod only watches. It never blocks or rewrites a tool call, and it ignores subagents and backgrounded commands. HP updates when each turn finishes. The battle log never shows command lines, which can contain secrets.
| A failing test spawns a monster | A clean run is a LIMIT BREAK, the commit opens a chest |
|---|---|
|
|
|
/dungeon opens the dungeon pane./dungeon fame opens the Hall of Fame./dungeon ticker shows or hides the ticker./plugin marketplace add ccdwyer/claude-mods
/plugin install context-dungeon@ccdwyer-mods
/reload-plugins
claude plugin validate .
claude plugin test .
Events this mod hooks, as claude plugin validate reads the module:
session.startcommand.run{command=dungeon}ui.close{id=context-dungeon}tool.callturn.completesession.compactsession.endui.render{component=PanerequestId=context-dungeon}ui.render{component=AbovePrompt}Engine calls it makes: $.clock.now, $.command.register, $.session.usage, $.state.get, $.state.set, $.store.get, $.store.set (via remember), $.ui.open (via openPane), $.ui.resolve, $.ui.toast (via openPane).
A tool.call hook sits in the middle of every tool call: it can see the call, refuse it, or add context to its result. This mod uses that only for the behaviour described above.
It runs entirely on your machine. It sends nothing over the network. Game stats are kept in Claude Code's local plugin store.
The mod collects no analytics or telemetry, and its author receives no data from it.
Full policy: PRIVACY.md.
MIT