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