Games·terminal·no license file
tictactoe
Tic-tac-toe against a minimax opponent above the prompt, painted with kitty graphics.

tictactoe puts a tic-tac-toe board above the Claude Code prompt for a quick game while Claude works. You play X and “Claude” plays O, but the opponent is a minimax function inside the plugin, not the model: a game sends no tokens. In Ghostty and kitty the board is a painted image with glowing marks and an animated win line. Every other terminal gets a board in box-drawing characters.
What it does
- Two levels. Hard plays perfect minimax and never loses. Easy plays random cells but takes a win when one is open.
- A menu bar with Game, Level, View and Help that opens over the board and works with the mouse or the keyboard.
- A scoreboard: status pill, YOU / DRAW / CLAUDE tallies in block digits, a win-rate bar, games played, your current streak and the last ten results. It survives restarts.
- Turn awareness.
/tictactoeruns even mid-turn, and the scoreboard notes when Claude finishes its turn. - A compact layout when the band above the prompt is short.
Install
Needs Claude Code 2.1.287 or later and an interactive terminal that reports the mouse. The author’s own minimum is 2.1.278, the build the image board was rewritten for. The image board also needs Ghostty or kitty outside tmux, plus python3. There is no marketplace: clone the repo and load the plugin folder with --plugin-dir.
git clone https://github.com/empire/claude-mods
cd claude-mods
claude --plugin-dir ./tictactoe
Run /tictactoe. Click a cell to play; the first click also gives the board the keyboard. 1 to 9 play a cell, arrows or WASD move the highlight and Enter or Space plays it. r starts a new game, x switches the level, m opens the menu and Esc hands the keyboard back to the prompt. /tictactoe again or /tictactoe stop closes the board. /tictactoe text, /tictactoe kitty and /tictactoe auto pin the board style, and the choice is saved.
If you want more than one game up there, cc-arcade bundles nine.
How it works
Claude’s move comes from hooks/game.ts: a full minimax search on Hard, a random free cell on Easy unless a winning cell is available. The module never calls the model, which is why play costs nothing and keeps working while Claude is busy.
The board is a Client surface module that owns the pointer and the keys. The hooks module mounts it in the AbovePrompt band on ui.render, applies its events (results, level, board style, close) on ui.message, and counts turn.complete so the board can say Claude is done.
To choose a renderer it reads TERM, TERM_PROGRAM, TMUX and KITTY_WINDOW_ID. In Ghostty or kitty outside tmux it runs python3 once to read the terminal’s cell size in pixels from /dev/tty, so the picture matches its cell box and a click maps straight onto a board cell. The hooks module then draws the band as Claude Code’s own Image element, placed beneath the board module’s region; the board leaves its cells as empty gaps, so the picture shows through them, and a menu paints after the picture, so it covers it. Each frame is painted as RGBA pixels in TypeScript and swapped into the mounted image with $.ui.blit, with no redraw. If the terminal draws the image’s alt text instead, the board falls back to text.
Until 19 September 2026 the plugin wrote the kitty graphics upload to /dev/tty through a second python3 helper and showed it through kitty placeholder cells. Claude Code 2.1.278 refuses text that holds those placeholder characters, so that path is gone and the Image element took its place.
It stores four keys in Claude Code’s plugin store: the score, the last 20 results, the level and the board style. It makes no network calls and reads no prompts, commands or files.
Limitations
- Draws only in an interactive terminal. The hook steps aside on other surfaces, so nothing appears in the desktop app or on mobile.
- The image board needs Ghostty or kitty, not inside tmux, and
python3with access to/dev/tty. Elsewhere you get the text board. - Version 0.2.0 since 17 September 2026; the image board was rewritten two days later without a version bump. The repository has no license file, so its screenshots are not shown here, and the author notes the function hooks API may change between Claude Code releases.
Similar Claude Mods
katzensteg
SDL games and HTML pages in panels beside the transcript, with tools so Claude can play.
claude-games
Four games above the prompt that react to Claude's tests and commits. Zero tokens.
intermission
Multiplayer Doom deathmatch in a pane while Claude works, handed back when it needs you.
paste-view
Previews of pasted text and thumbnails of pasted images, drawn above the prompt.
Popular Claude Mods
The whole directory →pii-guard
Reversible Taiwanese PII redaction for tool results, prompts and writes, all on loopback.
RemCTL
Today's Apple Reminders above the prompt, plus tools for Claude to manage them.
claude-latex
TeX math, TikZ diagrams and LaTeX blocks typeset in Claude's replies, in the desktop app.
claude-code-usage-quota
5-hour and weekly plan limits, a run-out forecast and the context, with auto compact.





