{"slug": "show-hn-play-games-beside-claude-code-while-it-works", "title": "Show HN: Play – games beside Claude Code while it works", "summary": "A developer released Play, a set of eight terminal games — 2048, Tetris, Snake, Sudoku, Bounce, Pong, tic-tac-toe and Tic-Tac-Go — that run in a pane beside Claude Code while the agent works. Play installs via `npx skills add focks/playmod -g -a claude-code` and requires Claude Code version 2.1.333 or newer; games launch with commands such as `/play 2048` or the short form `/2048`. The 2048 game's Hint button asks Claude for the next best move with a one-line reason, while Sudoku hints run locally without model access and each generated puzzle keeps at least 36 clues.", "body_md": "Small games for Claude Code, played in a pane beside the chat.\n\n[Quick start](#quick-start) ·\n  [Games](#games) ·\n  [Install](#install) ·\n  [For agents](#for-ai-agents) ·\n  [Contributing](#contributing)\n\nEight games: 2048 (with a hint from Claude), Tetris, Snake, Sudoku, Bounce (a brick breaker), Pong, tic-tac-toe and Tic-Tac-Go (a push puzzle). Type `/play 2048`, `/play tetris`, `/play snake`, `/play sudoku`, `/play bounce`, `/play pong`, `/play tictactoe` or `/play tictacgo` and play while Claude works. Each game also has a short command: `/2048`, `/tetris`, `/snake`, `/sudoku`, `/bounce`, `/pong`, `/tictactoe` (or `/ttt`) and `/tictacgo` (or `/ttg`).\n\n| `/play 2048` | `/play tetris` | \n| `/play snake` | `/play sudoku` | \n| `/play bounce` | `/play pong` | \n| `/play tictactoe` | `/play tictacgo` | \n\n1. Check `claude --version` is 2.1.333 or newer.\n2. Run `npx skills add focks/playmod -g -a claude-code` .\n3. Start a new Claude Code session and type `/play` .\n\nThe games, in order: 2048, Tetris, Snake, Sudoku, Bounce, Pong, tic-tac-toe and Tic-Tac-Go.\n\nSquare, adaptively sized tiles in the original game's colors with large digits. The 💡 Hint button asks Claude for the next best move with a one-line reason and highlights that move's button. Your best score is kept across sessions.\n\n| Key | Action | \n|---|---|\n| Arrow keys, or `w`` a``s`` d` | Move up, left, down, right | \n| `h` (💡 Hint) | Ask Claude for the next move | \n| `n` | New game | \n\nClassic Tetris with the 7 classic piece colors, a ghost piece, a next-piece preview, and levels that speed up every 10 lines. Cells are square and scale with the pane. The game waits while the pane does not have focus. Your best score is kept across sessions.\n\n| Key | Action | \n|---|---|\n| `←``→` , or`a`` d` | Move left, right | \n| `↑` , or`w` | Rotate | \n| `↓` , or`s` | Soft drop | \n| Space, or `x` | Hard drop | \n| `p` | Pause | \n| `n` | New game | \n\nEat the orange food, grow your snake, and avoid the walls and your own body. Every five meals increases the speed. Square cells scale with the pane, the game waits while the pane is unfocused, and your best score is kept across sessions.\n\n| Key | Action | \n|---|---|\n| Arrow keys, or `w`` a``s`` d` | Steer up, left, down, right | \n| `p` | Pause or resume | \n| `n` | New game | \n\nSnake buffers two turns for quick corners and ignores reverse turns. Its board uses merged color runs to keep rendering light; food placement has bounded work even on a nearly full board.\n\nA fresh 9×9 puzzle with exactly one solution, pencil notes, conflicts shown in red, and local hints. Move the selection with the arrow keys. The board highlights the selected cell, its row, column and box, and every cell holding the same digit. Given digits are bold and fixed, your entries are blue, and duplicates turn red. Pencil marks show in the cell, and the selected cell's notes are listed below the grid.\n\n| Key | Action | \n|---|---|\n| Arrow keys, or `w`` a``s`` d` | Select the cell above, left, below, right | \n| `1` to`9` | Enter a digit or toggle a pencil mark | \n| `0` , Backspace or Delete | Erase the selected entry or its notes | \n| `m` | Toggle notes mode | \n| `h` | Reveal the selected cell, or the next unfinished cell | \n| `n` | New puzzle | \n\nPuzzles are generated only when opened for the first time or restarted. A bounded bit-mask solver checks uniqueness; each puzzle keeps at least 36 clues. Hints run locally and do not use model access.\n\nA brick breaker. Move the paddle with the arrow keys, launch the ball, and break five rows of bricks without letting the ball past you. You have three lives; clearing every brick starts the next, faster level. Higher rows score more, and where the ball lands on the paddle sets its direction: the outer two cells on each side send it that way, the middle keeps its course. The game waits while the pane is unfocused, and your best score is kept across sessions.\n\n| Key | Action | \n|---|---|\n| `←``→` , or`a`` d` | Move the paddle left, right | \n| Space, `↑` , or`w` | Launch the ball | \n| `p` | Pause or resume | \n| `n` | New game | \n\nPong against the computer. Move your paddle on the left with the arrow keys and serve; where the ball meets a paddle sets its angle: the top cell sends it up, the bottom cell sends it down, and the middle two keep its course. The computer moves one row at a time and only every other step, so a steep ball gets past it. The first side to 7 points wins, and whoever lost a point serves next. The game waits while the pane is unfocused, and the games you have won are kept across sessions.\n\n| Key | Action | \n|---|---|\n| `↑``↓` , or`w`` s` | Move your paddle up, down | \n| Space, or `e` | Serve the ball | \n| `p` | Pause or resume | \n| `n` | New game | \n\nThree in a row against the computer, on a 3×3 board with large block marks that scale with the pane. You play X and move first; swap sides and the computer opens as X. On Hard the computer plays perfectly, so the best you can do is draw; on Easy it plays a random cell about 60% of the time. A keypad of buttons 1 to 9 places a mark directly, laid out like a number pad with 1 at the top left. The winning line turns green, and your wins, losses and draws are kept across sessions.\n\n| Key | Action | \n|---|---|\n| Arrow keys, or `w`` a``s`` d` | Choose the cell above, left, below, right | \n| Enter, Space, or `e` | Place your mark on the chosen cell | \n| `1` to`9` | Place your mark directly, in keypad order | \n| `l` | Switch between Easy and Hard | \n| `x` | Swap sides and start a new game | \n| `n` | New game | \n\nA push puzzle modelled on Google's daily Tic-Tac-Go, with 12 original levels (not Google's boards) from a one-move opener to a 26-move finale. Each move steps you one cell up, down, left or right, and you are an O with eyes. Walking into an X or O tile pushes it one cell the same way, but only when the cell behind it is empty and on the board: there are no chain pushes and no pulling. Walls and the edge stop you, and a blocked step does not count as a move. Line up three Os, horizontally or vertically (not diagonally), with yourself counting as one, to solve the level; four or more in a line count too. Three Xs in a line lose, and a move that makes both lines is a loss. A solved or lost board freezes until you undo, reset or change level. Undo is unlimited and reverts one move at a time, a winning or losing move included. Every level shows its par, the fewest moves possible, which a solver checked when the levels were made. Levels are not locked, and the levels you solved and your fewest moves on each are kept across sessions.\n\n| Key | Action | \n|---|---|\n| Arrow keys, or `w`` a``s`` d` | Move up, left, down, right, pushing a tile | \n| `u` , or Backspace | Undo the last move | \n| `r` | Reset the level | \n| `[` and`]` | Previous and next level | \n\nWith no game named, lists the games.\n\nEach key is also an on-screen button, so you can click instead. Keys work while the game's pane has focus.\n\nThe open [skills CLI](https://github.com/vercel-labs/skills) copies `skills/play-games/` into Claude Code's skills folder, where Claude Code loads the mod at session start.\n\nGlobal (all projects):\n\n```\nnpx skills add focks/playmod -g -a claude-code\n```\n\nCurrent project only:\n\n```\nnpx skills add focks/playmod -a claude-code\n```\n\nStart a new Claude Code session afterwards; already-open sessions do not pick it up. Then type `/play` to choose a game.\n\nThe skills CLI lists the folder as the `play-games` skill; the mod inside it is named `play`.\n\nAt the prompt of a terminal Claude Code session:\n\n```\n/plugin install play --marketplace focks/playmod\n```\n\nAnswer `y` to add the marketplace, then choose a scope.\n\n```\ngit clone https://github.com/focks/playmod.git play\ncd play\nclaude --plugin-dir ./skills/play-games\n```\n\nThe plugin is now named `play`, and its skill folder is `play-games`. Remove the previous installation (` npx skills remove playmod-games -g`, or `/plugin uninstall playmod`) before installing `play`. Use the same project or global scope as your previous install. The renamed plugin has a separate best-score store.\n\n1. Start a new Claude Code session. Mods load when a session starts, so a session that was open during the install does not have them.\n2. Check that the mod loaded: `claude plugin list` should show`play@skills-dir` with`Status: loaded` . If it is missing, check the folder exists:`ls ~/.claude/skills/play-games/.claude-plugin/plugin.json` (or`.claude/skills/play-games/` in the project for a project install).\n3. Install for Claude Code: pass `-a claude-code` to`npx skills add` . Without`-g` , the install belongs to the current project only, and Claude Code loads it after you trust that folder.\n4. Check `claude --version` : play needs 2.1.333 or newer. On an older build the log in step 5 shows`\"ui.key\" is not an event` . Update with`claude update` , or`npm install -g @anthropic-ai/claude-code@latest` .\n5. Start Claude Code with `claude --debug-file /tmp/claude.log` , then`grep play /tmp/claude.log` : lines ending`/play listed` ,`/2048 listed` ,`/tetris listed` ,`/snake listed` ,`/sudoku listed` ,`/bounce listed` ,`/pong listed` ,`/tictactoe listed` and`/tictacgo listed` mean the commands registered; any other play line says why it did not.\n\n```\nnpx skills remove play-games -g\n```\n\nOr, if installed as a plugin: `/plugin uninstall play`.\n\nAsk your agent to install play by giving it this line:\n\n```\nInstall play for Claude Code by following https://github.com/focks/playmod/blob/main/llms.txt\n```\n\n[llms.txt](https://github.com/focks/playmod/blob/main/llms.txt) holds the install steps an agent can follow, with checks before and after. [AGENTS.md](https://github.com/focks/playmod/blob/main/AGENTS.md) holds the instructions for agents that change this repository.\n\nplay is a Claude Code mod. It runs inside Claude Code with the permissions of a mod, reads and writes only its own state and store (best scores, progress), starts no processes and reads no files.\n\nPressing 💡 Hint in 2048 sends Claude the board, the legal moves, and the outcome of each move. Nothing else from your session is sent. The request uses the session's own model access (Sonnet), so it counts toward your usage. This is the only network or model use; nothing else leaves the machine. See [SECURITY.md](https://github.com/focks/playmod/blob/main/SECURITY.md).\n\nIf Claude cannot answer, a built-in two-ply expectimax search picks the move instead, and the hint line says it came from the local search.\n\nClaude Code 2.1.333 or newer. Older builds, 2.1.330 (stable) included, have no key event for the arrow keys and refuse the mod. Update with `claude update`, or `npm install -g @anthropic-ai/claude-code@latest`, and check with `claude --version`.\n\nLayout:\n\n```\n.claude-plugin/marketplace.json   marketplace listing\ndocs/media/                       README clips (.webp) and stills (.png), one pair per game, plus hero.png\nscripts/                          record-media.py and record-media.sh regenerate docs/media\nskills/play-games/                the mod (named play) and its skill\n  SKILL.md                        instructions for the agent\n  hooks/register.tsx              wires every game into the engine\n  hooks/keys.ts                   arrow and special keys (ui.key hooks)\n  hooks/layout.ts                 shared layout helpers\n  hooks/<game>/                   one folder per game\n  hooks/shared/                   common random source\n  tests/                          tests\n  types/                          shared state types\nAGENTS.md  llms.txt               instructions and install steps for agents\nDESIGN.md  PRODUCT.md             visual conventions and product intent\nREVIEWING.md                      review guide\n```\n\nRun the tests:\n\n```\nclaude plugin test skills/play-games\n```\n\nValidate the plugin and the marketplace:\n\n```\nclaude plugin validate skills/play-games\nclaude plugin validate .\n```\n\nType-check. Load the plugin once so Claude Code writes `skills/play-games/.claude-plugin/types/`, then run the compiler:\n\n```\nclaude --plugin-dir ./skills/play-games\nnpx -p typescript@5.6.3 tsc -p skills/play-games\n```\n\nRegenerate the README clips and stills from a live session (needs tmux, Python 3 with Pillow, and the macOS fonts Menlo, Apple Color Emoji and Apple Symbols):\n\n```\nscripts/record-media.sh\n```\n\n`scripts/record-media.py` does the capture and encoding; see [CONTRIBUTING.md](https://github.com/focks/playmod/blob/main/CONTRIBUTING.md#media).\n\nContributions are welcome. See [CONTRIBUTING.md](https://github.com/focks/playmod/blob/main/CONTRIBUTING.md), [AGENTS.md](https://github.com/focks/playmod/blob/main/AGENTS.md), [DESIGN.md](https://github.com/focks/playmod/blob/main/DESIGN.md) and [REVIEWING.md](https://github.com/focks/playmod/blob/main/REVIEWING.md). Everyone taking part follows the [Code of Conduct](https://github.com/focks/playmod/blob/main/CODE_OF_CONDUCT.md). Report vulnerabilities as described in [SECURITY.md](https://github.com/focks/playmod/blob/main/SECURITY.md), not in a public issue.\n\n- Tic-Tac-Go is modelled on the concept of Google's daily Tic-Tac-Go game. The 12 levels here are original.\n- 2048 is by Gabriele Cirulli. This version uses the colors of the original 2048.\n- Tetris is by Alexey Pajitnov.\n\nMIT. See [LICENSE](https://github.com/focks/playmod/blob/main/LICENSE).", "url": "https://wpnews.pro/news/show-hn-play-games-beside-claude-code-while-it-works", "canonical_source": "https://github.com/focks/playmod", "published_at": "2026-12-02 09:50:56+00:00", "updated_at": "2026-12-02 10:15:58.423543+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "ai-tools"], "entities": ["Claude Code", "Play", "Anthropic", "2048", "Tetris", "Sudoku", "Tic-Tac-Go"], "also_reported_by": [], "takeaway": "Play ships as a Claude Code skill installed with `npx skills add focks/playmod -g -a claude-code` on Claude Code 2.1.333 or newer, adding eight pane games launched by `/play <game>` or short commands like `/2048`, with 2048's hint button calling Claude for the next move.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/show-hn-play-games-beside-claude-code-while-it-works", "markdown": "https://wpnews.pro/news/show-hn-play-games-beside-claude-code-while-it-works.md", "text": "https://wpnews.pro/news/show-hn-play-games-beside-claude-code-while-it-works.txt", "jsonld": "https://wpnews.pro/news/show-hn-play-games-beside-claude-code-while-it-works.jsonld"}}