TravisBumgarner/claude-mods/tree/main/dino
dino-break
Claude Code が長いタスクを処理している間、プロンプトの上の帯で動く ASCII 恐竜ランゲームのプラグイン
この mod について
dino
Claude Code が時間のかかる作業をしている間、プロンプトの上の帯で動く Chrome のオフライン恐竜ゲームを ASCII で再現します。プラグイン名は dino-break です。
HI 00412 00087 Claude is working...
.--.
(____)
__
/ o)
__/ / \|/
/\ |
_____._______._______._______._______.
Space/Up: jump P: pause X: close
読み込む
Mod には Claude Code v2.1.287 以降が必要です(claude --version)。
1 セッションだけで使う場合:
claude --plugin-dir ~/Programming/mods/dino
すべてのセッションで使う場合は、フォルダーを ~/.claude/settings.json の env ブロックに追加します。
{
"env": {
"CLAUDE_CODE_PLUGIN_DIRS": "~/Programming/mods/dino"
}
}
複数の mod を読み込むには、パスを : で区切ります。インタラクティブセッションはフォルダーを監視するため、保存すると編集内容が再読み込みされます。
/plugin を実行して読み込みを確認します。タブの下にある暗い行に dino-break と表示されます。
遊び方
| キー | 動作 |
| --- | --- |
| ゲームをクリック | キーボードをゲームに渡します(Esc でプロンプトへ戻ります) |
| D | 開始、または 3-2-1 のカウントダウン後に一時停止中のゲームを再開 |
| Space / Up / W | ジャンプ |
| P | 一時停止してスコアを保存 |
| X | 保存して閉じる |
/dino でゲームを手動で開閉できます。
自動で開く仕組み
この mod は start_break ツールを提供し、タスクに約 1 分以上かかりそうなときは最初にこれを呼び出すよう、システムプロンプトに行を追加します。Claude がターンを終えるとゲームを一時停止し、プレイ内容を保存してトーストを表示します。
Claude がタスクの長さを推測する仕組みなので、毎回起動するわけではありません。/dino は常に動作します。
スコア
Mod 自身の ~/.claude 配下のストアに保存されます(このリポジトリには保存されません)。
best:ハイスコアscores:直近 50 回の実行saved:一時停止したゲーム。次のセッションで「Press D to resume」と表示されます
ファイル
| ファイル | 内容 |
| --- | --- |
| .claude-plugin/plugin.json | マニフェスト |
| hooks/hooks.json | register.tsx を参照 |
| hooks/register.tsx | start_break ツール、/dino、帯、スコア保存 |
| hooks/game.tsx | ゲーム本体:キー、物理、描画(Client surface module として実行) |
| types/index.d.ts | 状態の契約 |
| tests/dino.test.tsx | 開始、一時停止、再開 |
開発
claude plugin validate ~/Programming/mods/dino
claude plugin test ~/Programming/mods/dino
Mod を一度読み込むと、Claude Code は型を .claude-plugin/types/ に書き込み、tsconfig.json を生成します。tsc -p . で型チェックできます。どちらも生成物で、gitignore の対象です。
この文章の作成時点では、claude plugin test は「hooks modules are turned off in this process」のため実行を拒否しました。そのためテストは型チェック済みですが、まだ実行されていません。
インストール
まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。
claude plugin marketplace add TravisBumgarner/claude-mods claude plugin install dino-break
原文 / README
dino
An ASCII take on Chrome's offline dino game that runs in a band above the Claude Code
prompt while Claude works on something long. The plugin is named dino-break.
HI 00412 00087 Claude is working...
.--.
(____)
__
/ o)
__/ / \|/
/\ |
_____._______._______._______.
Space/Up: jump P: pause X: close
Load it
Mods need Claude Code v2.1.287 or later (claude --version).
For one session:
claude --plugin-dir ~/Programming/mods/dino
For every session, add the folder to the env block of ~/.claude/settings.json:
{
"env": {
"CLAUDE_CODE_PLUGIN_DIRS": "~/Programming/mods/dino"
}
}
To load several mods, separate their paths with :. Interactive sessions watch the folder,
so edits reload when you save.
Run /plugin to check it loaded: the dim line under the tabs should name dino-break.
Play
| Key | Does |
| --- | --- |
| click the game | gives it the keyboard (Esc hands it back to the prompt) |
| D | start, or resume a paused run after a 3-2-1 countdown |
| Space / Up / W | jump |
| P | pause and save the score |
| X | save and close |
/dino opens or closes the game by hand.
How it opens on its own
The mod gives Claude a start_break tool and adds a line to the system prompt telling Claude
to call it first when a task looks like it'll take more than about a minute. When Claude
finishes the turn, the game pauses, saves your run, and shows a toast.
This depends on Claude guessing the task length, so it won't fire every time. /dino always
works.
Scores
Saved in the mod's own store under ~/.claude (not in this repo):
best: high scorescores: last 50 runssaved: the paused run, which comes back as "Press D to resume" in the next session
Files
| File | What |
| --- | --- |
| .claude-plugin/plugin.json | manifest |
| hooks/hooks.json | points at register.tsx |
| hooks/register.tsx | start_break tool, /dino, the band, saving scores |
| hooks/game.tsx | the game: keys, physics, drawing (runs as a Client surface module) |
| types/index.d.ts | state contract |
| tests/dino.test.tsx | start, pause, resume |
Develop
claude plugin validate ~/Programming/mods/dino
claude plugin test ~/Programming/mods/dino
After the mod loads once, Claude Code writes its types into .claude-plugin/types/ and a
tsconfig.json, and tsc -p . type-checks it. Both are generated and gitignored.
claude plugin test refused to run while this was written ("hooks modules are turned off in
this process"), so the test is type-checked but hasn't run yet.


