ClaudeMods
☰
KO
● 0 명 접속 중 · 조회 0 회
후원프로젝트 제출
GitHub 저장소 · 작성자 Yash1927

tool-snake

Claude가 호출하는 각 도구가 보드에 먹이를 놓고, Claude가 끝나면 음성 점수를 알리며 멈추는 Snake pane을 채팅 옆에 여는 Claude Code plugin입니다.

번역 완료

이 mod 소개

tool-snake는 function hooks plugin으로 구현한 Claude Code mod입니다. 게임 pane은 채팅 옆에 dock되며(다른 레이아웃에서는 프롬프트 위) prompt를 제출하면 나타납니다. main agent가 도구를 호출할 때마다 도구 첫 글자가 적힌 색깔 칩을 하나 놓습니다(B Bash, E Edit, R Read, W Write, G Grep/Glob; 나머지 도구는 회색). 뱀은 Claude가 작업하는 동안에만 움직입니다. turn이 끝나면 게임이 멈추고 badge가 LIVE에서 DONE으로 바뀌며, toast와 음성 문장이 먹은 도구 호출 수를 알려 줍니다. session 최고 점수는 유지됩니다. Hooks는 prompt.submit(턴 시작, pane 열기), tool.call(먹이 추가), turn.complete(정지), ui.message(toast와 음성)입니다. 방향키/WASD로 조종하고 r로 다시 시작하며 Esc로 키 입력을 프롬프트에 돌려줍니다. /snake로 pane을 다시 엽니다. MIT License입니다.

설치

먼저 작성자의 README에서 marketplace와 플러그인 이름을 확인하세요. 저장소 구조에 따라 명령어가 달라질 수 있습니다.

claude plugin marketplace add Yash1927/claude-code-snake
claude plugin install tool-snake
원문 / README

tool-snake

Play snake inside Claude Code while it works. Every tool call Claude makes drops food into the game.

<p align="center"> <a href="media/tool-snake-launch.mp4"><img src="media/tool-snake-demo.gif" width="800" alt="Claude Code with the tool-snake pane docked beside the chat: each tool call in the chat drops a colored chip onto the snake board"></a> </p> <p align="center"><a href="media/tool-snake-launch.mp4">Watch the 30-second launch video (sound on)</a></p>

What it does

  • A game pane opens next to the chat when you send Claude a prompt.
  • Every tool call Claude makes drops food, shown as the tool's first letter in the tool's color: B Bash, E Edit, R Read, W Write, G Grep (and Glob). Other tools drop a gray chip.
  • The snake only moves while Claude is working. When Claude finishes, the game pauses, the badge flips from LIVE to DONE, and it tells you, in a toast and out loud, how many of its tool calls you ate: "Claude is done. You ate 9 of its 14 tool calls."
  • Your best score is kept for the session.

Play

  1. Get the mod and start Claude Code with it:
    git clone https://github.com/Yash1927/claude-code-snake
    claude --plugin-dir claude-code-snake
    
  2. Send Claude a prompt. The game pane opens.
  3. Click the game to give it the keys. Arrows or WASD steer, r restarts after a crash, Esc gives the keys back to the prompt.
  4. /snake opens the pane any time.

The game needs the terminal or the desktop app. In the fullscreen layout the pane docks beside the chat; otherwise it sits above the prompt.

How it works

tool-snake is a Claude Code mod: a plugin of function hooks that runs in the session.

| file | what it does | | --- | --- | | hooks/register.tsx | Hooks prompt.submit (start a turn, open the pane), tool.call (add food for the main agent's calls), turn.complete (stop) and ui.message (toast and speak the final count), and draws the pane. | | hooks/game.tsx | The game: a 22x12 board with 2-character square cells, stepped every 110 ms, edges wrap. Draws the header, board, legend and hint. | | tests/snake.test.tsx | Food from tool calls, eating, pausing when Claude is done, steering, the spoken line, and the pane on the terminal. |

Test

claude plugin validate tool-snake
claude plugin test tool-snake

The launch video

The video in media/ is built entirely in code, with no After Effects. An HTML page draws every frame from a single time value, Playwright renders it at 60 fps, and ffmpeg encodes it. It runs this mod's own game logic, so the board, chips and the final 9 of 14 are what the mod produces for those tool calls. Source and re-render steps are in video/.

License

MIT © Yash Rastogi (@yashx26)

비슷한 프로젝트