cd /news/ai-agents/show-hn-play-games-beside-claude-cod… · home › topics › ai-agents › article
[ARTICLE · art-180115] src=github.com ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Show HN: Play – games beside Claude Code while it works

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.

key 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.

read11 min views3 publishedDec 2, 2026
Show HN: Play – games beside Claude Code while it works
Image: Michielbdejong (auto-discovered)

Small games for Claude Code, played in a pane beside the chat.

Quick start · Games · Install · For agents · Contributing

Eight 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).

| /play 2048 | /play tetris | | /play snake | /play sudoku | | /play bounce | /play pong | | /play tictactoe | /play tictacgo |

  1. Check claude --version is 2.1.333 or newer.
  2. Run npx skills add focks/playmod -g -a claude-code .
  3. Start a new Claude Code session and type /play .

The games, in order: 2048, Tetris, Snake, Sudoku, Bounce, Pong, tic-tac-toe and Tic-Tac-Go.

Square, 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.

Key Action
Arrow keys, or w`` a``s`` d Move up, left, down, right
h (💡 Hint) Ask Claude for the next move
n New game

Classic 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.

Key Action
←``→ , ora`` d Move left, right
↑ , orw Rotate
↓ , ors Soft drop
Space, or x Hard drop
p
n New game

Eat 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.

Key Action
Arrow keys, or w`` a``s`` d Steer up, left, down, right
p or resume
n New game

Snake 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.

A 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.

Key Action
Arrow keys, or w`` a``s`` d Select the cell above, left, below, right
1 to9 Enter a digit or toggle a pencil mark
0 , Backspace or Delete Erase the selected entry or its notes
m Toggle notes mode
h Reveal the selected cell, or the next unfinished cell
n New puzzle

Puzzles 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.

A 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.

Key Action
←``→ , ora`` d Move the paddle left, right
Space, ↑ , orw Launch the ball
p or resume
n New game

Pong 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.

Key Action
↑``↓ , orw`` s Move your paddle up, down
Space, or e Serve the ball
p or resume
n New game

Three 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.

Key Action
Arrow keys, or w`` a``s`` d Choose the cell above, left, below, right
Enter, Space, or e Place your mark on the chosen cell
1 to9 Place your mark directly, in keypad order
l Switch between Easy and Hard
x Swap sides and start a new game
n New game

A 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.

Key Action
Arrow keys, or w`` a``s`` d Move up, left, down, right, pushing a tile
u , or Backspace Undo the last move
r Reset the level
[ and] Previous and next level

With no game named, lists the games.

Each key is also an on-screen button, so you can click instead. Keys work while the game's pane has focus.

The open skills CLI copies skills/play-games/ into Claude Code's skills folder, where Claude Code loads the mod at session start.

Global (all projects):

npx skills add focks/playmod -g -a claude-code

Current project only:

npx skills add focks/playmod -a claude-code

Start a new Claude Code session afterwards; already-open sessions do not pick it up. Then type /play to choose a game.

The skills CLI lists the folder as the play-games skill; the mod inside it is named play.

At the prompt of a terminal Claude Code session:

/plugin install play --marketplace focks/playmod

Answer y to add the marketplace, then choose a scope.

git clone https://github.com/focks/playmod.git play
cd play
claude --plugin-dir ./skills/play-games

The 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.

  1. 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.
  2. Check that the mod loaded: claude plugin list should showplay@skills-dir withStatus: 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).
  3. Install for Claude Code: pass -a claude-code tonpx skills add . Without-g , the install belongs to the current project only, and Claude Code loads it after you trust that folder.
  4. 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 withclaude update , ornpm install -g @anthropic-ai/claude-code@latest .
  5. Start Claude Code with claude --debug-file /tmp/claude.log , thengrep 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.
npx skills remove play-games -g

Or, if installed as a plugin: /plugin uninstall play.

Ask your agent to install play by giving it this line:

Install play for Claude Code by following https://github.com/focks/playmod/blob/main/llms.txt

llms.txt holds the install steps an agent can follow, with checks before and after. AGENTS.md holds the instructions for agents that change this repository.

play 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.

Pressing 💡 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.

If 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.

Claude 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.

Layout:

.claude-plugin/marketplace.json   marketplace listing
docs/media/                       README clips (.webp) and stills (.png), one pair per game, plus hero.png
scripts/                          record-media.py and record-media.sh regenerate docs/media
skills/play-games/                the mod (named play) and its skill
  SKILL.md                        instructions for the agent
  hooks/register.tsx              wires every game into the engine
  hooks/keys.ts                   arrow and special keys (ui.key hooks)
  hooks/layout.ts                 shared layout helpers
  hooks/<game>/                   one folder per game
  hooks/shared/                   common random source
  tests/                          tests
  types/                          shared state types
AGENTS.md  llms.txt               instructions and install steps for agents
DESIGN.md  PRODUCT.md             visual conventions and product intent
REVIEWING.md                      review guide

Run the tests:

claude plugin test skills/play-games

Validate the plugin and the marketplace:

claude plugin validate skills/play-games
claude plugin validate .

Type-check. Load the plugin once so Claude Code writes skills/play-games/.claude-plugin/types/, then run the compiler:

claude --plugin-dir ./skills/play-games
npx -p typescript@5.6.3 tsc -p skills/play-games

Regenerate 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):

scripts/record-media.sh

scripts/record-media.py does the capture and encoding; see CONTRIBUTING.md.

Contributions are welcome. See CONTRIBUTING.md, AGENTS.md, DESIGN.md and REVIEWING.md. Everyone taking part follows the Code of Conduct. Report vulnerabilities as described in SECURITY.md, not in a public issue.

  • Tic-Tac-Go is modelled on the concept of Google's daily Tic-Tac-Go game. The 12 levels here are original.
  • 2048 is by Gabriele Cirulli. This version uses the colors of the original 2048.
  • Tetris is by Alexey Pajitnov.

MIT. See LICENSE.

── more in #ai-agents 4 stories · sorted by recency
── more on @claude code 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/show-hn-play-games-b…] indexed:0 read:11min 2026-12-02 · —