/sd:analyze-event-resultsfrom sd
Downloads Tabroom tournament data and analyzes speech event results: break rounds, standings, and why competitors did or didn't advance. Activated by a tabroom.com link or tournament name with event/competitor questions.
Ships in sd. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
One script downloads a Tabroom tournament's public data and writes one speech event's ballots, standings and a break analysis to a directory. Run it; do not open the result pages, parse them, or rank entries by hand. Its totals and seeds are checked against Tabroom's own, and a hand-built ranking has no such check.
The data comes from Tabroom's documented backup endpoint, /api/download_data.mhtml?tourn_id=<n>: one plain GET, no login, the whole tournament as JSON. Never crawl the result pages for data instead; they need a login and Tabroom asks automated readers to stay off them. The script opens a result page in exactly one case, described under Input: to read which event a result_id link belongs to, one page, in the user's own signed-in browser.
$ARGUMENTS:
tourn_id: a round's results, Final Places, Prelim Seeds, or the Invite, Entries, Judges, Pairings, Live Updates or Results tab;tournament: line on stderr gives the dates of the one chosen: when the user named a month or year, check it against that line, and if it is the wrong year pass that year's tournament URL instead.--event): its name or abbreviation ("Novice Oratory", NOO). Pass it whenever the user names the event.--competitor, optional): the entry the user is asking about. Part of the name is enough.--event can be left out when something else names the event: a round_id or event_id in the link, a --competitor who is in exactly one speech event, or a result_id link (Final Places, Prelim Seeds). For a result_id link the script reads the event's abbreviation off that page through the gstack browser, because the JSON carries no result ids; when the browser is not available or not signed in to Tabroom, it fails and lists the events.
When nothing names the event and the user did not say, run once without --event: the error lists the tournament's speech events. Ask the user which, or pick it when their words make it plain.
If the question is about a person ("why didn't she break") and no name is given, ask for the name before running.
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/tabroom_event_results.py" "<url or tournament name>" [out_dir] [--event "<name>"] [--competitor "<name>"]
Run it through the Bash tool outside the sandbox: it needs the network, and for a result_id link the gstack browser. Run it from the user's working directory, not from the plugin's: the gstack browser keeps one daemon per directory, and starting it from another directory closes the user's signed-in window. An existing output directory is reused and its files overwritten.
To re-run on an earlier download (another event or competitor, no network):
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/tabroom_event_results.py" --from-raw "<earlier out_dir>" [out_dir] --event "<name>" [--competitor "<name>"]
Output contract: the final stdout line is OUTPUT_DIR:<abs path>, and it is the only line on stdout. Everything else goes to stderr: tournament: (which tournament a name search resolved to), event: (which event was chosen and from what), NOTE:, WARNING:, a one-line count summary, and ERROR:. No marker means failure; stop and report the ERROR: line. One case writes the data and still fails: a --competitor that matches no entry, or several. The error lists the matches; re-run with --from-raw and a name from standings.csv.
| File | Contents |
|---|---|
analysis.md | Numbered sections: objective, key findings, how the break worked, who broke, judge point scales, data and checks. With --competitor, two more after "how the break worked": the competitor's rooms, and what one rank better would have changed |
standings.csv | One row per entry in prelim seed order: ranks and points by round, rank total, reciprocals, points, 1sts, whether they broke, elimination ranks, final place, Tabroom's own seed |
ballots.csv, ballots.json | One row per ballot: round, stage, section, room, speaking order, entry, code, name, school, judge, rank, points |
event.json | Tournament, dates in its own timezone, event, rounds, tiebreakers as Tabroom names them, break size, the check result, captured_utc |
result_sets.json | Tabroom's own result sets for the event (Final Places, Prelim Seeds) |
raw/tournament_<id>.json | The whole tournament as served, every event included |
Answer the user's question from analysis.md, leading with its Key findings. Say which tournament and event were analysed, from the tournament: and event: lines.
When the question is about a competitor, state, in this order:
fetch:tabroom-results reads them).When the question is about the event as a whole (no --competitor), state, in this order:
Then give the output directory. When the user wants the analysis kept, hand analysis.md and the directory to their note-writing skill; this skill writes no notes.
Each stderr WARNING: changes what can be claimed:
| Warning | What to say |
|---|---|
prelim tiebreakers not read from Tabroom's result sets | The seeding order (ranks, reciprocals, points) is assumed, not read from the tournament |
rebuilt total(s) differ from Tabroom's | Report the mismatches in "Data and checks" before any conclusion; the seeding may be wrong |
rebuilt seed(s) differ from Tabroom's Prelim Seeds | Tabroom's seed order is the authority; report the differences and do not explain the cut by the rebuilt order |
rebuilt totals were not checked | No result set with prelim totals is published; the seeding is unverified |
entries that broke are not the top seeds | The tournament broke on something else; do not explain the cut by these tiebreakers |
no scored ballots for: <round> | That round is unpublished or empty; name it |
"Data and checks" in analysis.md also says when points were read from result-set strings instead of ballots, and when some ballots carry no points at all.
From a checkout of the mstack repository (the tests are not part of an installed plugin):
uv run --group dev pytest plugins/sd/scripts/tests/ -v
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub mayank-io/mstack --plugin sd