Run the Elixir Gym, the adversarial consumer-agent tester for the MCP tool families, as subagents on the Gym's own account. `/gym` runs one run on today's rotation; `/gym <family>` runs one family; `/gym sweep` loops over all ten families (Gym run, fix, deploy, re-run) until each has a clean run. Use for Gym runs, the pre-launch stability sweep, or re-checking a family after a fix.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Gym?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/jthingelstad-gym)
---
name: gym
description: Run the Elixir Gym, the adversarial consumer-agent tester for the MCP tool families, as subagents on the Gym's own account. `/gym` runs one run on today's rotation; `/gym <family>` runs one family; `/gym sweep` loops over all ten families (Gym run, fix, deploy, re-run) until each has a clean run. Use for Gym runs, the pre-launch stability sweep, or re-checking a family after a fix.
---
# The Elixir Gym
The Gym is the tester that fails the way a stranger's agent fails. It finds
payloads where correct data leads a competent agent to the wrong conclusion.
Its brief is `brief.md` in this directory: Jamie's prompt, unchanged except
where running here requires it. **You orchestrate; subagents are the
Gym.** Never do a Gym run's work in your own context. Your job is to
assign, collect, fix, deploy and keep the grid.
Why it exists (Jamie, 2026-09-23): Elixir is not public yet. The first
outside user's experience must not be finding bugs. The sweep's exit is the
build we announce.
## Scope: eight active families, MCP only
`badges`, `battles`, `cards`, `clans`, `elixir`, `game`, `players`, `war`
These are the tool-name prefixes. `live_*` is out, and so are the web app
and email: the Gym does not test them, because they derive from the MCP
(Jamie, 2026-09-23). The grid is `coverage.md` in this directory.
`/api/v1` is Sign in with Elixir's `GET /api/v1/me` alone (JSON API 5.0.0)
and mirrors no tool, so no Gym fix reaches it.
## The Gym's account
- **Principal:** the `gym` test account: a person with no
address and no player, following POAP KINGS `#J2RGCRVG`
(docs/notes/2026-11-23-test-identities-are-people.md).
- Scope: `cr:read feedback:write`.
- Door: `https://elixir.poapkings.com/mcp`.
- **Subjects:** it has no player and no primary clan, so an omitted
`player_tag` or `clan_tag` refuses `no_subject`. Name both, always.
The regression pass (`acceptance/run.mjs --gym`) fills an omitted clan
with `#J2RGCRVG` (`withClanDefault`, `acceptance/lib.mjs`).
- **Budget and history:** it spends from its own hourly bucket and its
own daily quota (`mcp_daily_quota` on the account), not Jamie's. The
feedback it files is its own, so the call audit and the queue can tell
Gym traffic from people. It has no address, so no answer is mailed.
- **Credentials:** `call.mjs` reads the URL and token from `.env` here
(mode 0600, ignored by git). Never print, cat or read the token.
- **Re-minting:** `node infra/scripts/mint-test-key.mjs gym
.claude/skills/gym/.env.pending`, then the `{test_account}` payload it
prints through `npm run op` (dry run, then `"dry_run": false`), then
move `.env.pending` over `.env`. The op revokes the old key.
Subagents also inherit Jamie's own `mcp__elixir-mcp__*` connection. The
brief forbids them from using it, and your assignment header repeats that.
## One run: `/gym` or `/gym <family>`
1. **Preflight.**
- Check that the connection answers: `node .claude/skills/gym/call.mjs game_clock '{}'`.
- Check that `acceptance/gym.json` parses.
- The run itself takes no lock: the subagent writes only its report,
under `reports/` (ignored by git). Recording the result in
`coverage.md` (tracked) is an edit in your own worktree, landed by
pull request (`/ship`, "Merge").
2. **Build the legacy list.** Findings #1–#89 were filed from Jamie's
account, before the Gym had its own.
- Read them with Jamie's connection (`mcp__elixir-mcp__elixir_my_feedback`,
every page), or with the migrate op `{feedback_read}`.
- Keep the items that touch the assigned family.
- Give each item one line: id, status, `shipped_in`, tool, what was wrong.
Keep it short; this is the regression and exclusion input, not the history.
3. **Assign.** Spawn ONE `general-purpose` subagent with this prompt:
```
You are the Elixir Gym. Read /Users/otto/Projects/clash-royale/elixir-mcp/.claude/skills/gym/brief.md
in full and follow it exactly. Work from the repo root.
ASSIGNMENT HEADER
Date: <YYYY-MM-DD>
Family: <family> (assigned by <sweep round N | /gym>) — or "rotation" for bare /gym
Report path: .claude/skills/gym/reports/<date>-<family>-r<N>.md
Connection: node .claude/skills/gym/call.mjs ONLY. Never use mcp__elixir-mcp__* tools.
Legacy list (filed from Jamie's account before 2026-09-23; treat as your own history):
<the lines>
Shipped since the last run of this family: <What's new entries and commits, one line each, if a sweep round>
Scratch files: /tmp/gym-<family>/ only (Gyms running together collided in one directory on 2026-09-23).
```
4. **Check the appendix** with
`node .claude/skills/gym/check-appendix.mjs <report>`. If it fails, send
the problems back to the same subagent (SendMessage) to fix. Never fix
the Gym's cases yourself: nothing is hand-translated.
5. **Record the result** in `coverage.md` (a PR). The
run is **clean** when:
- it filed no new findings (`praise` does not count),
- every regression it checked was CONFIRMED FIXED.
Open questions are not findings: carry them into the grid's notes.
## The sweep: `/gym sweep`
The loop Jamie asked for (2026-09-23): as many runs as it takes, not one a
day, until every family has a clean run on the build we will announce.
**Order.**
1. Families with no clean run yet, in list order.
2. Families whose last clean run predates a deploy that touched them.
`elixir`, `game` and `badges` are light. `battles` and `cards`
read selected personal and clan history and can be heavy on the database (db.t4g.micro
again since 2026-10-08; a sweep drained its EBS byte balance on 2026-09-23, so
run heavy families one at a time).
**Parallelism.**
- The `gym` token has its own bucket, `hourly_rate_limit` 1,000,000
(Jamie, 2026-09-23; NOTES), so two Gyms may run at once. Before that, at
300 calls an hour, badges and battles together emptied the hour.
- Never two heavy families together.
- If a `rate_limited` refusal comes back, drop to one and wait for the hour.
Gym runs are read-only, so they may run while you fix another family.
**Per family, per round:**
1. **Run** the Gym on it, as in "One run".
2. **If the run is clean,** mark the family clean in the grid, noting
contract version and date, and move on.
3. **If the run has findings, fix them. Jamie's standing authority for the
sweep: fix and deploy without asking.** Work it by `docs/OPERATIONS.md`,
"Feedback":
- Edit in your own worktree. The deploy and the `{feedback_respond}`
writes (through `npm run op`) take the production lock themselves;
a held lock is a wait.
- Verify every finding against the record before touching code. The Gym
is evidence, not authority. A finding you refute gets an answer with
the evidence, not a fix. Its case still joins `gym.json` as filed, with
a `refuted` field giving the answer; the interpreter skips it with
that reason (148.1, 148.4: event content is outside the meta population
by decision).
- **Prune a refuted case once what it tests is gone.** When the field,
argument or behavior a refuted case exercises has left the contract
(a removed war-day field, a retired trophy band, a changed timeline
order), delete the case from `gym.json`; git keeps it. Keep a refutation where the Gym misread data that still exists
(148.x, 183.x, 234.1, 238.3, 248.x, 249.2, 264.x): it guards against
the same misreading next time. A case marked `refuted` that says it
is held for Jamie is an open question, not a refutation; carry it in
the grid's notes.
- **Check a cited request id's age.** A Gym can cite an old request id
as live evidence (a 6.35.0 lead on 2026-09-24 was a call from the
night before). Pull the capture with `acceptance/bites/fetch.mjs` and
read its `captured_at` before building a stale-deploy theory.
- Fix at the source. The site docs and a What's new file in
`apps/site/src/_data/updates/` go in the same commit.
- Merge the report's appendix into `acceptance/gym.json` unchanged.
Fetch each finding's bite:
`acceptance/bites/fetch.mjs <date> <request-id prefix> <name> <feedback id>`.
New verbs go into `acceptance/gym-interp.mjs`.
- **Attested facts are counted, never quoted** into a note, a report
excerpt, `gym.json` or anything else in this public repo: say "3
`clan_message` items", never what one says or who said it. The Gym
reads its clan's facts; the fetcher stubs `attested` and `account`
items in a bite, and `bites.test.mjs` fails on one that holds more.
- **One What's new entry per family round** when the round is worth
telling, not one per finding. A breaking tool change is off the table
in a sweep; anything that would need one is a Jamie decision.
- Ship with `/ship` (`.claude/skills/ship/`), deploying with
`--acceptance=<family>`: only that family's cases. A Gym deploy
always names its family; the whole suite (`--acceptance`) is only
for a change to shared code (protocol, tools.mjs, shared.mjs,
ingest). On 2026-09-23 a full gate on every deploy, plus the Gym
runs, drained the database's EBS byte balance in one afternoon.
Since 2026-11-13 no deploy runs the Gym's own blocks: the gate is
the other suites. Run the regression pass yourself, once per
session, narrowed to the family: `node acceptance/run.mjs --gym
--family <family>` (paced; check the database's byte balance
first).
A change to a tool follows `/tool-change`.
- Answer each item with `{feedback_respond}`, `done` with the UTC day it went live in `shipped_in`,
following `docs/OPERATIONS.md`, "Feedback" (a compare-and-set, then a
read-back). Add a short change note in `docs/notes/` for the round.
Commit, merge through a PR (`/ship`'s Merge step), deploy, answer.
4. **Re-run** the family (round N+1). The header says what shipped since.
5. **Stop the family after three rounds without a clean run.** Park it as
`needs Jamie` with the reason and keep sweeping the others.
**Stop and ask Jamie instead of fixing** (park the family, continue the
rest):
- a fix that changes what a number MEANS rather than how it is described,
- a new tool,
- a refusal that breaks existing callers,
- anything touching a decision or declined idea in `docs/DECISIONS.md` (for example a branded
metric, or the 7.0.0 refusals),
**The sweep ends when** all ten families are clean, or clean-or-parked. The
final message to Jamie has four parts:
- the grid,
- what shipped, with commits,
- the parked decisions, each as one question,
- whether the build is ready to announce.
Push a notification only for a regression of a shipped fix, a "blocks
correct answers" finding, or the sweep finishing.
## Standing rules
- Never read the token and never run `call.mjs` with output that could
include it. It prints bodies, never headers.
- Gym subagents never edit the repo. You are the only writer.
- The daily Claude Cloud Gym routine is retired (Jamie, 2026-09-25); this
skill replaces it. Do not re-create it: it ran on Jamie's connector and
budget and double-filed against a sweep.