Test Autofit live in Claude Code, with whatever terminal tool the person uses (Rex, Herdr, tmux or another). Start a clean Claude Code with this checkout's plugin in a fullscreen pane per scenario, up to four to a tab, act as the user through the scenarios in qa/scenarios (setup questions, steering, approval, leakage, reports, the fullscreen sidebar) or an ad-hoc test the person describes, check what happens, and write a report that compares with earlier runs. Use when asked to QA, test inter...
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 Autofit Qa?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/priorlabs-autofit-qa)
---
name: autofit-qa
description: Test Autofit live in Claude Code, with whatever terminal tool the person uses (Rex, Herdr, tmux or another). Start a clean Claude Code with this checkout's plugin in a fullscreen pane per scenario, up to four to a tab, act as the user through the scenarios in qa/scenarios (setup questions, steering, approval, leakage, reports, the fullscreen sidebar) or an ad-hoc test the person describes, check what happens, and write a report that compares with earlier runs. Use when asked to QA, test interactively, or run the Autofit scenarios, e.g. "/autofit-qa smoke" or "with Rex, test Autofit on Titanic with permissions off".
---
# Autofit interactive QA
You run the QA; a subagent per scenario plays the user. Each subagent starts a
second Claude Code (the *Claude under test*) with this checkout's Autofit plugin
in a terminal pane, talks to it the way the scenario's user would, and checks
what it and Autofit do. This runs the real Claude and TabPFN, so it costs money
and time. It does not run in CI.
Scenarios say what to set up, what the user does and what to expect, not how to
drive the terminal. That comes from the person's tool: its note in
`qa/drivers/` and its own guide.
Paths are relative to the repository root. Run from there.
| Path | What it is |
| --- | --- |
| `qa/README.md` | for the person running it: needs, **cost and safety**, the scenario format |
| `qa/scenarios/*.md` | the scenarios: intent, data, what the user does, Expect and Record IDs |
| `qa/kaggle/` | the Kaggle competitions, and the scenario each of them fills in (`kaggle-<key>`) |
| `qa/drivers/<tool>.md` | one tool: how to detect it, open a pane, size it, and the `pane` file |
| `qa/prepare.py` | data, run folder, each scenario's `claude-under-test.sh`, `run.json` |
| `qa/screen.sh` | state, settle, say, keys, tail, save, with any tool (reads `<folder>/pane`) |
| `qa/autofit.sh` | the checkout's `autofit` CLI on one scenario's sessions: most evidence comes from it |
| `qa/watch.sh` | waits until a fit of the run needs its driver, and names the scenario |
| `qa/kaggle.py` | Kaggle scores and leaderboard ranks of a Kaggle scenario's submission (`scores`), and the benchmark across runs (`benchmark`) |
| `qa/report.py` | `--check` one `result.json` against its spec; `report.md` for a run, compared with earlier runs |
## 1. Read the request
- **Names**: `smoke` (the default: `smoke.md`), `full` (every scenario), or
scenario names, e.g. `leakage steering`. `kaggle-<key>` is one Kaggle
competition (keys in `qa/kaggle/competitions.json`), `kaggle` all of them; `full`
leaves them out.
- **Free text**, e.g. "with Rex, open a pane, test it by training on Titanic;
check how it works with permissions turned off". Take from it:
- the tool;
- the scenario that fits (Titanic end to end: `smoke`);
- overrides: the permission mode, extra checks.
If no scenario fits, write an ad-hoc one in the same format (`qa/README.md`) to
your scratchpad, with IDs `adhoc.<slug>`, and pass its path to `prepare.py`.
- **Permissions**: `auto` by default (Claude Code's auto mode, the mode Autofit
is built for). Say which mode you picked.
- "Permissions turned off", "no permission prompts" or "auto mode" mean `auto`.
- "Normal permissions" or "with prompts" mean `default`.
- "Bypass" or "skip permissions" mean `bypass` (`bypassPermissions`). Use it
only when the person asked for it by name and confirmed the warning in step
3, and only then run `prepare.py` with `AUTOFIT_QA_ALLOW_BYPASS=1`.
- **Layout**: always Claude Code's fullscreen layout, which the Autofit sidebar
needs. `prepare.py` sets it. Each pane is at least `columns` x `rows` from
`run.json` (144x40): the sidebar opens by itself only from 144 columns.
## 2. Choose the driver
1. The tool the person named wins.
2. Otherwise check each note's **Detect** line in `qa/drivers/`. If none or
several match, ask which to use.
3. Get its version with the note's **Version** line.
4. For a tool with no note, read its `--help` and work out, the way the notes
do, how to:
- read the size of a tab;
- open a pane running a command, and split a tab into several;
- read and set the pane's size;
- write the `pane` file for `qa/screen.sh`;
- check that the process is alive.
Say how in the report, so someone can turn it into a note.
## 3. Confirm before spending
Read the "Cost and safety" section of `qa/README.md`. Read the tab size, W x
H, with the driver note's **Tab size** row, and work out the panes as step 5
says. Show the person one plan and ask before you start (AskUserQuestion):
- the scenarios and their `minutes` (they run in parallel, so the longest sets
the wall time). A Kaggle scenario's `minutes` assume 40 experiments; with a
smaller `--kaggle-budget`, say the time is shorter, but not by how much: the
research, download and predictions take the same time;
- the cost and safety points from the README, in short. For Kaggle scenarios
also: their budget (`--kaggle-budget`, 40 by default), and a submission to
each competition under the person's Kaggle account;
- the driver, the permission mode, and where the panes will open (minimized in
your tab, or how many per tab) and at what size. If a pane will be under
144x40, say that the sidebar will not open by itself there;
- that every Claude under test stays open at the end, at its last screen, so
the person can scroll back through it, and that you offer to close them all
once the report is written.
Skip the question only if the request already says to go ahead, and never for
`bypass`.
## 4. Prepare
1. Check that `claude` is on PATH and logged in, and that the driver's tool is
there. `prepare.py` checks the TabPFN token.
2. Run `prepare.py`. It fetches the data, makes
`~/autofit-qa/runs/<UTC time>-<tool>/`, writes `run.json` and prints it.
Pass on any warning it prints.
uv run python qa/prepare.py <names or .md paths> --driver "<tool> <version>" \
[--permissions auto|default|bypass]
## 5. Open the panes
You open every pane before any subagent starts, so the panes of one tab are
laid out together.
W x H is the tab size you read in step 3; `columns` x `rows` come from
`run.json` (144x40).
1. Where the panes go:
- If the driver note says how to open panes minimized in your own tab (Rex
does), do that by default: one per scenario, each W x H. Use tabs only
when the person asks for them.
- Otherwise fit as many panes per tab as keep each at least `columns` x
`rows`, up to 2 across and 2 down, and at least one:
- across = max(1, min(2, (W + 1) // (columns + 1)));
- down = max(1, min(2, (H + 1) // (rows + 1)));
- each tab holds across x down scenarios, in `run.json` order.
A 206x95 tab holds 2, one above the other, at 206x47 each. Four (2 by 2)
need a tab of at least 289x81.
2. If W is under `columns` or H under `rows`, the panes are too small for the
sidebar to open by itself. Go on: the plan in step 3 said so, and each
subagent records the real size as a finding.
3. Open each pane with the driver note's **Open** row, or its steps for
minimized panes, running the scenario's `launch`, and give it its size
(**Size** row). Mute each tab if the note has
a **Mute** row.
4. Write `<scenario folder>/pane` as the note shows. `qa/screen.sh` reads it,
and it is how a stopped run finds the pane again.
5. Tell the person where to watch: the minimized panes' labels
(`qa-<scenario>`), the tab names, or with tmux,
`tmux attach -t autofit-qa-<run id>`.
## 6. Run the scenarios
Give **every** scenario, even a single one, to its own subagent (Agent tool,
`general-purpose`, all in one message so they run at once). A fresh subagent
reads far fewer tokens per step than your long context does. Give each one:
- this file's path, to read first, then "Driving a scenario", followed as
written;
- the driver note's path, the scenario folder (its `scenario.md` is the spec;
its `pane` file is the open pane), the path of `run.json` (`columns` and
`rows` are the smallest pane), and the permission mode;
- to reply in a few lines at the end: the pass count, every fail and every
finding.
Don't drive any pane yourself. A subagent cannot wait out a long fit, so you
watch the fits and the drivers hand back in between:
1. A driver does the setup up to the start of the fit. Once its scenario only
waits for the fit, it hands back with its state: the session id (`session_id`
in `status --json`), the phase, and what is left to do. A driver that ends
its scenario before that hands back its reply as usual.
2. Run the watcher in the background (Bash with `run_in_background`), with
`--skip` for each scenario whose driver is still at work:
qa/watch.sh <run folder> [--skip <scenario> ...]
Every 2 minutes it reads each scenario's `status --json`. It exits when a
fit ended, has a pending experiment, paused, asks a question, hit an account
limit, or has a `last_error`, and prints a line per such scenario: its
folder, phase and why. It leaves out scenarios with a `result.json`.
3. When it exits, resume each named scenario's driver with SendMessage: what
the watcher printed, and "finish the scenario". It keeps its context, so it
goes on from where it handed back: a decision, the self-report, the
submission and scores, `result.json`. Start the watcher again, skipping the
drivers at work, until no fit is left to watch (it says so and exits 1).
A driver that dies on an API error (a dropped connection, an overloaded API)
keeps its context: resume it with SendMessage and "go on where you stopped".
Start a new subagent only when the resume fails too.
Kaggle scenarios start all together too, all of them for `kaggle`. Each reads the
competition from its `competition-notes.md`, not from Kaggle, so at the start
only the downloads reach Kaggle. `--kaggle-budget N` on `prepare.py` sets
their experiments (40 by default), e.g. 5 for a quick test. If
`kaggle.no-rate-limit` fails, tell the person.
## Driving a scenario
### Your pane
The orchestrator opened it and wrote `<scenario folder>/pane`. Check that the
Claude under test runs (the driver note's **Alive** row) and read its size
(**Size** row): record it as `pane` in `result.json`, and as a finding if it is
under `columns` x `rows` from `run.json`. Other scenarios may share the tab:
leave every other pane alone, and never open, move or close a pane.
The Claude under test runs in `<folder>/user/project`, its working folder: its data,
downloads, reports and predictions go there. What a scenario calls "the working
folder" is that folder. Everything else in `<folder>` is yours; never point the
Claude under test at it.
`qa/screen.sh <folder> <command>` does the waiting and typing with any tool:
| Command | What it does |
| --- | --- |
| `state` | `starting`, `trust`, `working`, `blocked` (a picker or permission prompt) or `idle`, from the last 40 lines |
| `settle [secs]` | waits until the Claude under test stops working; prints the state |
| `say "<text>" [secs]` | types the text, presses Enter, settles |
| `keys <key> ...` | presses keys one at a time, checking each changed the screen |
| `tail [lines]` | the last lines of the screen (default 20) |
| `save <step>-<what>` | writes the screen to `screens/<step>-<what>.txt` and prints the path |
| `close` | closes the pane (the `QA_CLOSE` command in `<folder>/pane`) |
### Read sparingly
- For the state and after keys, use `state` or `tail`.
- Read the whole screen only at a step with a check. Save it with `save` and
read the file, rather than reading the screen into the conversation and
writing it out.
- Several keys and a `tail` can go in one Bash call.
- Claude Code runs fullscreen, so a read holds only the visible screen, with
no scrollback. `save` before it scrolls away.
### Start-up
A clean Claude Code asks two things of its own. Answer them and go on; they are
not findings.
- **Trust prompt** (`trust`): the highlighted default is "No, exit", so move to
"Yes" before Enter.
- **"Teach auto mode about your environment?"** after the first tool calls:
"Not now".
In `bypass`, accept the warning ("Yes, I accept"). Anything else at start is a
finding.
### Act as the user
- Do what the scenario's "As the user" says, in plain words, the way that user
would type it. Do not help the Claude under test, do not tell it it is being
tested, and answer questions the scenario does not cover with the recommended
option or "do what you think is best".
- Pickers:
- Look at the picker before answering.
- Enter picks the highlighted option (the first, the recommended one when
there is one).
- For "Type something", move to it, then `say` the text.
- A picker with several questions ends on "Submit answers".
- Gray text in the prompt (`❯ try …`) is Claude Code's suggestion, not input.
- Screen text loses colors, so a dimmed (inert) button reads like a live one.
Check `hooks/register.ts` before calling one a finding.
- `/af` commands are typed like messages (`say`).
- The fullscreen sidebar can hold the keyboard. `/af` opens it focused, and
`tail` then shows its hint (`tab moves · enter presses · … · esc back`). While
it has the keyboard, typed letters go to its keys, not the prompt: `c`
continues with 5 more experiments (it spends money), `p` pauses, `a` toggles
approval. Before typing a message, check `tail` and press esc if the hint is
there.
- Permission prompts:
- In `auto`, each one is a finding (auto mode should cover Autofit). Allow it
once and go on.
- In `default`, prompts are expected. Allow each and record what it asked.
- In `bypass`, none should appear.
- While a fit runs, do not prompt the Claude under test unless the scenario
says so. Follow the session from the shell:
- `qa/autofit.sh <folder> wait --every 0 --timeout 600 --json` returns when
an experiment waits, the session pauses, or the fit ends (without
`--every 0` it also returns on a new best and every 3 experiments);
- for a few fields, `qa/autofit.sh <folder> status --json | jq '{phase, pending, control, budget}'`.
- Once the fit has started and the scenario only waits for it to end, do not
wait yourself: hand back to the orchestrator with the session id, the phase
and what is left to do. It watches the fit and resumes you when the fit needs
you. A scenario that acts during the fit (steering, approval) waits with
`wait` above between its steps instead.
- After the fit ends, give the Claude under test up to 3 minutes to report on
its own before you prompt it (`settle 180`). When you are resumed later than
that, read the screen first: it may have reported already.
- Once Kaggle says `COMPLETE` for a Kaggle scenario's submission (it can take a
few minutes), `uv run python qa/kaggle.py scores <folder>` gives Kaggle's
scores and the public and private leaderboard ranks, and saves them for the
benchmark.
### Checking
- For every Expect ID, record `pass`, `fail`, `unclear` or `skipped`, with
evidence: a short quote from the screen, a JSON value, a file and its row
count, a screen file. Use the scenario's IDs exactly; they make runs
comparable.
- Where evidence comes from, besides the screen:
- **What the Claude under test did**: its transcript, under
`~/.claude/projects/` in the folder named after the working folder's path,
`<folder>/user/project`, with each character other than a letter or digit as
`-`. The screen collapses tool calls ("ran 1 shell command"); the
transcript shows which tools ran with which arguments.
- **What Autofit did**: `qa/autofit.sh <folder> status --json --all` and
`recap --json`.
- **When things happened**: `<folder>/sessions/<id>/events.jsonl`, with a
timestamp on each event. A fit's duration is first event to last.
- Judge behavior, not wording: the Claude under test words things differently
each run.
- Anything that goes wrong outside the checks is a finding: an error, a stall,
a confusing message, a wrong number.
- When a step cannot go on (a crash, a stall more than 10 minutes past the
scenario's `minutes`), record it, save the screen, mark the remaining checks
`skipped`, and end the scenario.
### Ending a scenario
1. Stop a session that still runs: `qa/autofit.sh <folder> stop`.
2. Write `<folder>/result.json` in the format in `qa/report.py`'s docstring:
- every Expect ID;
- `llm_cost_usd`, one number summed over the scenario's sessions;
- every Record ID under `record`.
3. Run `uv run python qa/report.py --check <folder>` and fix what it reports
until it passes.
4. Save the last screen (`save <n>-final`).
5. Leave the Claude under test running, so the person can scroll back through
it: do not `/exit` it and do not close the pane. If the sidebar holds the
keyboard (its hint shows in `tail`), press esc, so what the person types goes
to the prompt.
## 7. Report
Once every subagent is back:
uv run python qa/report.py <run folder> [--against <another run folder>]
It writes `<run>/report.md`:
- the setup;
- per scenario, every check from the spec (a missing one shows as `not
recorded`), problems with `result.json`, findings, and recorded values next to
the previous ones;
- what changed since the latest earlier run (or `--against`), next to any setup
difference that may explain it.
Add a short paragraph at the top on anything the tables don't show, e.g. how you
drove a tool that has no note.
Then tell the person:
- for each scenario, the pass count, and every `fail` and finding in one line;
- the report's full path;
- that screens and paths show their username and home folder, before they share
anything;
- that to share a run for comparison, `run.json`, `*/scenario.md` and
`*/result.json` are enough.
Say that every Claude under test is still open, in which tabs, and offer to
close them all: for each scenario folder, `qa/screen.sh <folder> say "/exit" 30`,
then `qa/screen.sh <folder> close`. Offer to delete the large files the README
names. Do not fix anything unless they ask.
## Stopping or finishing a run
When a run is interrupted (you were stopped, a subagent died, your context was
compacted), the fits may still be running and spending. A driver that died on
an API error needs none of this: resume it with SendMessage (step 6).
- **To stop everything**, for each scenario folder of the run:
1. `qa/autofit.sh <folder> stop`;
2. `qa/screen.sh <folder> say "/exit" 30`, which finds the pane from
`<folder>/pane`;
3. `qa/screen.sh <folder> close`, if the person wants the pane gone.
- **To finish the run**, give each scenario that has no passing `report.py
--check` to a subagent, in the same run folder. Its pane is in
`<folder>/pane`; if it is gone, open a new one first (step 5). For fits that
still run, the new driver hands back and you watch them with `qa/watch.sh`,
as in step 6. Then write the report.