isr431/desk-pet

isr431/desk-pet

Claude Code セッションの隣で暮らし、Claude の動きに反応する小さなアニメーションペットです。長いセッションもふと眺める楽しみがあります。

axolotl、quokka、tiny robot、dog、cat から選べます。それぞれ固有の反応を持ちます。
| When | Your pet | |---|---| | A turn starts | 起きて伸びをする | | Claude reads files | 小さな本を読む | | Claude edits code | ハンマーを振るか編み物をする | | Claude runs a shell command | ミニキーボードを猛烈に打つ | | Claude searches or fetches the web | 双眼鏡をのぞく | | Tests pass | 紙吹雪の中で踊る | | Tests fail | 岩の後ろに隠れてからのぞく | | A turn runs 5+ minutes | あくびをし、毛糸で遊び、砂の城を作る | | Claude needs your input | 返事があるまで手を振る | | A turn finishes | 小さなトロフィーか封筒を持ってくる | | Context compaction | 箱を積んで部屋を片付ける | | Nothing happening | 呼吸してまばたきする |
ペットの部屋(壁紙、カーテン付きの窓、ペンダントライト、木の床、ラグ)は現地時刻に合わせて変わります。夜明け(5–7)はピンクの日の出、朝(7–11)と正午(11–14)は青空と雲、午後(14–17)は金色の光、夕方(17–20)は夕日、夜(20–5)はライトが灯る星空です。窓の光は床を移動し、アイドルアイコンも時刻で変わります。ターミナルでは半ブロックピクセル(48 列、12 行)、Claude desktop app ではアニメーション SVG です。
場所は Side panel(既定。閉じても /desk-pet show で戻り、144 列以上のターミナルで自動表示)か Above the prompt(メッセージボックス直上の全幅カード)から選べます。
Claude Code でリポジトリをプラグインマーケットプレイスとして追加し、インストールします。
/plugin marketplace add isr431/desk-pet
/plugin install desk-pet@desk-pet
claude plugin marketplace add isr431/desk-pet
claude plugin install desk-pet@desk-pet
新しいセッションを開始し、/desk-pet でペットと設定を選びます。Desk Pet は function-hooks プラグインで、Claude Code 2.1.286 以降が必要です。API は early access なので将来変わる可能性があります。
claude --plugin-dir /path/to/desk-pet
Pet は axolotl、quokka、robot、dog、cat、Position は side panel または above the prompt、Sound は既定オフ、Reactions は既定オンです。/desk-pet は反応のプレビュー、/desk-pet cat は切り替え、/desk-pet show はパネル再表示、/config は Desk Pet: … 行を表示します。/desk-pet demo は全反応を順に再生します。
テストは npm test、pytest、go test、cargo test、vitest、jest、rspec などの shell コマンドから検出し、非ゼロ終了を失敗とします。Needs input には権限プロンプト、MCP elicitations、AskUserQuestion、計画承認を含みます。通知イベントで検出し、入力を送るか待機中のツールが終わると手振りを止めます。長時間コマンド承認後も終了まで手を振る制限があります。サブエージェントの反応も数えますが、起床・退屈・終了ギフトはメイン会話だけです。
Privacy policy にデータ処理を記載しています。Desk Pet は動作を見て描画するだけで、ネットワーク要求、ファイル読み取り、コマンド実行をせず、セッション間のデータも保持しません。フックはイベントをそのまま渡し、承認・ブロック・書き換えをしません。
| Hook | What it reads | Why | |---|---|---| | session.start | nothing | アニメーション、パネル、/desk-pet を開始 | | prompt.submit | nothing, not even your prompt's text | 返信時に Needs input の手振りを停止 | | turn.start, turn.complete | whether the turn ended with an answer, and whether it was a subagent's | 起床、5 分後の退屈、終了ギフト | | tool.call | ツール名、ファイル名(内容は読まない)、検索、URL ホスト、shell 命令の先頭約 38 文字、失敗の有無 | 反応とキャプション、テスト結果を判定 | | session.compact | whether it was a subagent's, or a background precompute | 片付け | | classic.Notification | notification type only(permission_prompt または elicitation_dialog) | Needs input の手振り開始 | | classic.PermissionDenied | nothing | 手振り停止 | | command.run | what you typed after /desk-pet | コマンド | | ui.render | the surface and the space available | 描画 |
キャプションは画面にだけ表示され、$.state にメモリ保持されます。ディスクや外部には送られません。設定変更は要求時だけで、desk-pet.pet、desk-pet.position、desk-pet.sound、desk-pet.react_… と pluginConfigs の範囲に限られます。他の設定、権限、環境変数には触れません。Sound はコード合成の短いチャイムです。Above the prompt では ctrl+x ctrl+a でカードを折りたためます。
claude plugin validate .
claude plugin test .
ピクセルアートは hooks/art.ts にあり、エンジン呼び出しのない TypeScript として Node でプレビューできます。
MIT
まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。
claude plugin marketplace add isr431/desk-pet claude plugin install desk-pet
A small animated pet that lives beside your Claude Code session and reacts to what Claude is doing, so long sessions are more fun to glance at.

Pick an axolotl, quokka, tiny robot, dog or cat. Each one has its own take on every reaction.
| When | Your pet | |---|---| | A turn starts | wakes up and stretches | | Claude reads files | reads a tiny book | | Claude edits code | hammers (quokka, robot, dog) or knits (axolotl, cat) | | Claude runs a shell command | types furiously at a mini keyboard | | Claude searches or fetches the web | peers through binoculars | | Tests pass | dances in a shower of confetti | | Tests fail | hides behind a rock, then peeks out | | A turn runs 5+ minutes | gets bored: yawns, plays with yarn, builds a sandcastle | | Claude needs your input | waves until you respond | | A turn finishes | brings you a little trophy or envelope | | Context compaction | tidies its room, stacking boxes | | Nothing happening | breathes and blinks |
Your pet lives in a little pixel room (wallpaper, a curtained window, a pendant lamp, a wooden floor and a rug) that follows your local time of day: a pink sunrise at dawn (5–7), blue skies and drifting clouds in the morning (7–11) and at noon (11–14), golden light in the afternoon (14–17), a sunset in the evening (17–20), and a starry night with the lamp glowing (20–5). Sunlight through the window falls across the floor and shifts with the sun, and the caption's idle icon changes with the hour. It's drawn with half-block pixels in the terminal (48 columns by 12 rows) and as an animated SVG in the Claude desktop app.
You choose where it sits:
/desk-pet show brings it back. A terminal opens the panel by itself only when it's at least 144 columns wide.In Claude Code, add this repository as a plugin marketplace, then install the plugin:
/plugin marketplace add isr431/desk-pet
/plugin install desk-pet@desk-pet
Or from a shell:
claude plugin marketplace add isr431/desk-pet
claude plugin install desk-pet@desk-pet
Start a new session and your pet appears. Run /desk-pet to pick your pet and settings.
Desk Pet is a function-hooks plugin. It needs Claude Code 2.1.286 or newer. The function-hooks API is early access, so a future release may change it.
To try it from a local checkout without installing:
claude --plugin-dir /path/to/desk-pet
You can change these in three places:
/desk-pet opens a settings pane with a preview button for each reaction./desk-pet cat (or axolotl, quokka, robot, dog) switches pets./desk-pet show reopens the side panel./config in the terminal lists every setting as a "Desk Pet: …" row. Pet and position are typed there as text (axolotl, quokka, robot, dog, cat; panel, above); anything else falls back to the default./desk-pet demo plays every reaction in turn, which is handy for a screenshot or a GIF.
npm test, pytest, go test, cargo test, vitest, jest, rspec and similar). A non-zero exit counts as a failure.AskUserQuestion and plan approval. Permission prompts and MCP elicitations are noticed through Claude Code's notification event, the same one that drives desktop notifications. The pet stops waving when you send a prompt or when the tool call it was waiting on finishes. One known gap: after you approve a long-running command, the pet keeps waving until that command ends, because the hooks API has no event for the moment a prompt is answered.Privacy policy: the disclosure below describes the mod’s data handling.
Desk Pet only watches what Claude is doing and draws a pet. It makes no network requests, reads no files, runs no commands, and keeps no data of its own between sessions.
Hooks. Every hook looks, then passes the event on unchanged. None of them approves, blocks or rewrites anything.
| Hook | What it reads | Why |
|---|---|---|
| session.start | nothing | starts the animation, opens the side panel and registers /desk-pet |
| prompt.submit | nothing, not even your prompt's text | stops the "needs input" wave as soon as you reply |
| turn.start, turn.complete | whether the turn ended with an answer, and whether it was a subagent's | wake-up, boredom after 5 minutes, the end-of-turn gift |
| tool.call | the tool's name, plus a file's name (never its contents), a search pattern or query, a URL's host, the first ~38 characters of a shell command, and whether the call failed | picks the reaction and its caption, and spots test runs and whether they passed |
| session.compact | whether it was a subagent's, or a background precompute | the tidying-up reaction |
| classic.Notification | the notification's type only (permission_prompt or elicitation_dialog) | starts the "needs input" wave |
| classic.PermissionDenied | nothing | stops the wave when a prompt is refused |
| command.run | what you typed after /desk-pet | the command |
| ui.render | the surface and the space available | draws the pet |
Captions appear on your screen only. The current caption is held in memory for the session ($.state) so the panel can redraw it. It is never written to disk or sent anywhere.
Settings it writes. Desk Pet changes a setting only when you ask: a button in the /desk-pet settings pane, or /desk-pet cat (or another pet). Each write is to one of Desk Pet's own settings (desk-pet.pet, desk-pet.position, desk-pet.sound or a desk-pet.react_… switch), which Claude Code saves in your settings file under pluginConfigs, exactly as /config would. It never touches any other setting, permission or environment variable.
Sound. Off by default. When on, it plays a short chime that it synthesizes in code.
In the "above the prompt" position, press ctrl+x ctrl+a to collapse the card in the terminal.
claude plugin validate .
claude plugin test .
The pixel art lives in hooks/art.ts. It's plain TypeScript with no engine calls, so you can import it under Node to render previews.
MIT