Maximum Productivity - Claude Games
Things absolutely no one asked for:
"How do you destroy all the productivity AI just gave you?
I got you.
Maximum Productivity is a VS Code extension that lets you play games while Claude cooks. 🎮🤖
Your AI stays productive. You don't have to.
Here's the situation: Claude Code is in there refactoring your auth middleware, writing your tests, running your build — and you're watching a spinner. Sitting there. Idle in front of the most productive coworker you've ever had. This extension fixes the real problem: the moment Claude starts working, a Sudoku slides in beside your editor. The moment Claude's done, it politely steps aside. Next wait, your puzzle is exactly where you left it — even after restarting VS Code. Nobody will ever know.
(The git history will know. Claude wrote it.)
Ships with a full-featured Sudoku. The framework is modular, so more ways to not work are one small module away.
Quick start (three steps, then never work again)
- Install the extension. You've done harder things. Barely.
- Click 🎮 Claude Games in the status bar — or run
Claude Games: Open — whenever you feel productivity coming on.
- For full autopilot, run
Claude Games: Enable Claude Auto-Open (also offered on first launch). From then on the game opens itself whenever Claude starts working, and a "Claude is ready" banner appears the moment your presence is required again.
Nothing ever closes on its own — finish your move like the professional you are. Every move auto-saves.
Sometimes someone is looking at your screen. One click handles it:
- In the game panel's top bar, click ▶ Auto-open: on — it flips to ⏸ Auto-open: off and the panel stops appearing.
- Or run
Claude Games: Pause Auto-Open (until next open) from the command palette.
- While paused, the status bar shows
🎮 Claude Games ⏸. Subtle. Deniable.
- Resuming is automatic: when the coast is clear and you open the games yourself (status bar click or
Claude Games: Open), auto-open re-arms itself. No settings to dig through.
Want it off forever? That's the claudeGames.autoOpen setting. Want the hooks gone entirely? Claude Games: Disable Claude Auto-Open. We don't judge. (We judge a little.)
How it knows Claude is cooking
There's no official busy/idle API in the Claude Code extension, so Claude Games uses Claude Code hooks — the officially supported integration point, used responsibly, which is ironic given everything else about this extension. Enabling the integration merges these hooks into ~/.claude/settings.json (timestamped backup first; your existing hooks are untouched):
| Hook event |
What it means |
What we do |
UserPromptSubmit |
Claude got a job |
busy → game time |
PostToolUse |
Claude is still at it |
heartbeat, stay busy |
Stop |
Claude finished |
idle → banner + status bar highlight |
PermissionRequest |
Claude needs you |
idle — it's waiting on you, have some shame |
SessionStart / SessionEnd |
session lifecycle |
reset / clean up |
Each hook runs resources/hook.js (plain Node, zero dependencies), which writes a tiny state file to ~/.claude/waiting-games/sessions/<session_id>.json. The extension watches that folder and reacts. If you Esc-interrupt Claude (Stop never fires then), a stale timeout (default 3 minutes) figures it out on its own.
Privacy: everything is local. No telemetry, no network requests, no analytics dashboard where we track how bad you are at Sudoku. The only files touched: ~/.claude/settings.json (on explicit enable/disable only), the session files above, and your game saves in ~/.claude/waiting-games/saves/. Disabling removes exactly our hook entries and nothing else.
Multiple sessions and windows (for the overachievers)
Running several Claudes in parallel so you can be even more not-busy? Fully supported:
- Several sessions, one project: the status bar shows the count (
⟳ 2 Claude sessions). When one finishes while the others grind on, you get a status-bar flash and an in-game banner ("A Claude session is ready for you — 1 still running"). The big "Claude is ready" banner is reserved for the last one. Esc-interrupted sessions age out quietly — no false alarms.
- Several windows: each window only reacts to Claude working in its project. Game saves are shared machine-wide with newest-wins protection, so two windows can't clobber each other's puzzle. Your Sudoku progress is safer than most production databases.
The Sudoku (it's actually good)
- Three difficulties (Easy / Medium / Hard). Every puzzle has exactly one solution — mathematically guaranteed, which is more than can be said for your sprint planning.
- Pencil notes, unlimited undo, optional error highlighting, and a timer that only counts while you actually play. Paused time doesn't count against you. Unlike standup.
- Keyboard-first: arrows /
hjkl move · 1–9 fill · N notes mode · Backspace erase · U or Ctrl/Cmd+Z undo.
- Auto-saves every move; resumes across waiting phases and VS Code restarts.
Commands
| Command |
What it does |
Claude Games: Open |
Open the panel (also re-arms paused auto-open) |
Claude Games: New Game |
Straight to a fresh puzzle |
Claude Games: Pause Auto-Open (until next open) |
Stealth mode |
Claude Games: Enable Claude Auto-Open |
Install the hooks (one-time, with backup) |
Claude Games: Disable Claude Auto-Open |
Remove exactly our hook entries. Coward. |
Settings
| Setting |
Default |
Description |
claudeGames.autoOpen |
true |
The main event. Turn off to only slack on purpose |
claudeGames.staleBusyTimeoutMinutes |
3 |
How long before an interrupted Claude counts as idle |
claudeGames.sudoku.highlightErrors |
true |
Red numbers when you're wrong. Builds character |
Adding a new game (contribute to the problem)
Each game is one self-contained module — persistence, the picker card, pause/resume on Claude state changes, and corrupt-save recovery are all handled by the framework. You write the fun part:
// src/webview/games/mygame.ts
import { GameDefinition, GameModule } from '../framework/types';
class MyGame implements GameModule {
mount(container, ctx) { /* build DOM; call ctx.save(state) on every move */ }
setState(raw) { /* restore; throw on invalid input */ }
getState() { return { version: 1, state: /* serializable */, updatedAt: Date.now() }; }
pause() { /* stop timers */ }
resume() {}
newGame() {}
destroy() {}
}
export const myGameDefinition: GameDefinition = {
manifest: { id: 'mygame', title: 'My Game', icon: '🕹️', description: '…' },
create: () => new MyGame(),
};
Then add one line to src/webview/games.ts. That's it. Minesweeper PRs welcome.
Development
Yes, this extension was itself built by Claude Code. What was the author doing while Claude built it? Exactly.
npm install
npm run typecheck # tsc --noEmit
npm test # vitest (engine, hook merge, state aggregation, save store)
npm run build # esbuild → dist/
Press F5 in VS Code to launch an Extension Development Host. See docs/PUBLISHING.md for the full marketplace submission guide.
Manual smoke checklist
- [ ]
Claude Games: Open shows the picker; Sudoku plays with keyboard and mouse
- [ ] Enable integration → submit a Claude Code prompt → panel auto-opens without stealing focus
- [ ] Claude finishes → banner + status bar "Claude ready"; timer pauses
- [ ] Toggle Auto-open: off → next prompt does not open the panel; status bar shows ⏸; opening manually re-arms it
- [ ] Reload VS Code → resume puts you back in the same puzzle with history intact
- [ ] Switch color theme → board remains legible
- [ ] Disable integration → hook entries removed from
~/.claude/settings.json, foreign hooks untouched
License
MIT — free, as in "your afternoon, once Claude takes over".