Appearance
Claude Code plugin
A backgammon position appears in a pane while Claude is working. When Claude needs you, your place is kept.
13 14 15 16 17 18 19 20 21 22 23 24
○ · · · · · │ ● ● · ● ● ●
○ · · · · · │ ● ● · ● ● ·
· · · · · · │ ● · · · ● ·
· · · · · · │ · · · · · ·
· · · · · · │ · · · · · ·
────────────────────── [4 1] ──────────────────────
· · · · · · │ ○ · · · · ·
· · · · · · │ ○ · · · · ·
· · · ○ ○ · │ ○ · · · · ·
● · · ○ ○ ○ │ ○ · · · · ●
● · · ○ ○ ○ │ ○ · · · · ●
12 11 10 9 8 7 6 5 4 3 2 1
you roll 4-1 — what is the play?Install
bash
claude plugin marketplace add BowTiedBlox/gammonchain
claude plugin install gammonchain@gammonchainWhat it is for
The gap between submitting a prompt and reading the answer is a minute of nothing. It is not long enough to do anything with and it is exactly long enough to break concentration. The plugin fills it with a real decision: one position from a match this server recorded, chosen because a reference engine says one play is clearly best, graded to a hundredth of a point of equity.
It is the same position pipeline as the daily puzzle, served from a pool instead of one a day.
The handover is the point
A break that gets snatched away is not a break. The rules the plugin follows, in the order they matter:
- Claude finishing does not take the puzzle away. The pane says Claude is done and waits for your answer. You will not lose a position you were thinking about because the model happened to finish.
- When Claude needs you, that wins immediately. The clock stops, a notice appears, and one key hands you back to the prompt. The same position is still there when you come back, with the clock where you left it — being asked a question should not cost you the position you were thinking about.
- A short turn is not a break. Nothing opens until Claude has been working for two seconds, because a turn that finished before you looked away was not a wait.
Pressing Esc gives the keyboard back to the prompt without closing the pane.
Playing
Type the play the way you would write it down, and press Enter.
| You type | It means |
|---|---|
13/7 8/7 | two checkers to your 7 point |
24/18/13 | one checker, two hops |
bar/20 | entering from the bar |
13/11(2) | the same hop twice |
6/off | bearing off |
Hits are inferred, so 13/7* and 13/7 are the same play. The numbers down both edges are always your numbers, whichever seat the position puts you in, so what you see is what you type.
A play the rules refuse is refused in the pane, with the reason — the plugin carries the server's own rules engine, copied verbatim rather than reimplemented, so it agrees with the server about what is legal and can still check a move with the network down.
Three words work in the same field, because a text field takes every keystroke while it has the keyboard:
| You type | It does |
|---|---|
? | lists the legal plays — your options, never which one is best |
n | next position |
q | close the pane |
Commands
| Command | What it does |
|---|---|
/gammonchain | open a position now, mid-turn if you like |
/gammonchain-pause | stop opening positions for this session |
/gammonchain-stats | this machine's key, today's score, what is left of the allowance |
Your account is a key
There is no sign-up, no password and no email. The first run generates an Ed25519 key pair and keeps the private half in ~/.gammonchain/plugin-key.json, mode 0600. The public half is the identity gammonchain knows you by, and it is what your score is attached to — the same kind of key, and the same security model, as a player in the browser.
Every request is signed rather than carrying a token. See the HTTP API for the scheme.
Keep that file. Losing it means a new identity; copying it to another machine means both machines are you.
On macOS, GAMMONCHAIN_KEY_STORE=keychain puts the key in the login keychain instead. It is not the default, because security will only accept a secret as a command-line argument, where it is briefly visible to ps — and the file it would replace is readable at rest by anyone who could run that ps anyway.
Answers are graded on the server
A position arrives without its answers. Nothing in the plugin knows which play is best until you have committed to one, which is also why a hint can only list your options.
Grading needs the network. With no connection your answer goes on a queue and is replayed later, and until then the pane says answer saved, not correct. The first answer to a position stands — on the server and in the queue — so a replay can never change a verdict you have already seen.
Settings
| Variable | Default | What it does |
|---|---|---|
GAMMONCHAIN_URL | https://gammonchain.com | the server to play against |
GAMMONCHAIN_DIR | ~/.gammonchain | where the key lives |
GAMMONCHAIN_KEY_STORE | file | keychain to use the macOS login keychain |
GAMMONCHAIN_TIMEOUT_MS | 8000 | how long to wait before deciding the network is gone |
Thirty answers a day are free. The pane shows what is left and when the allowance comes back, which is midnight UTC. Skipping a position you do not fancy costs nothing, because the allowance counts answers rather than positions served.
If the pane does not appear
A pane a plugin opens by itself needs a terminal at least 144 columns wide, or 110 once you have opened this one yourself. That is Claude Code's rule, not the plugin's, and it exists so a plugin cannot take over a small screen. /gammonchain opens the pane at any width, and when a pane is waiting for room the plugin says so above the prompt instead of showing you nothing.
Running it against your own server
Point GAMMONCHAIN_URL at your instance. The pool routes exist on any gammonchain server; an instance with no recorded matches has nothing to build positions from, so fill it first.