score-loop
Run an unattended experiment loop that hill-climbs one rerunnable numeric score — local grader-mirroring harness, one hypothesis per commit, keep only gains…
от KrishP147★ 37 звёзд на GitHub
Установить score-loop в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
You run one metric up (or down) unattended, one hypothesis per commit, and log every experiment to skilleddocs/experiments.md. Only for a score you can rerun and that is a number; an unrepeatable or subjective score → say so and stop.
Commands: setup (default; also when experiments.md has no setup header), resume, status, summary.
1. Setup (confirmed once)
- Fill the header below from the request and the repo; ask only for what's missing. Create the loop branch off the current HEAD.
- Harness first. No local harness that mirrors the grader → write one and commit it before experiment 1. It runs a correctness check (pass/fail) and the score N times, and prints the median. It must defeat caching/memoisation: fresh inputs or a fresh process per timed run, and the correctness check never warms the timed call. A near-zero or implausible score is
invalidunless correctness proves otherwise. - Noise margin: run the harness once on the baseline; propose margin = (max − min of its N runs) / baseline median, as a %.
- Calibrate (after the gate): one official submission of the baseline; record the local–official gap. A gap wider than the margin (as a % of the baseline) → fix the harness before experiment 1. No official grader → skip and write
calibration: none (no official grader). - Freeze time = deadline − lead, lead = max(10% of remaining, min(30 min, 50% of remaining)) (≥5h left: 10%; 1-5h: 30 min; <1h: half the remaining time); no deadline → no freeze. One experiment (one harness run, as timed on the baseline) plus the calibration must fit before freeze; otherwise refuse, say so, and stop.
- Gate: show the filled header, how the score could be gamed and how the harness blocks it (proxy-metric gaming: the score improves without the real goal improving, e.g. work moved outside the measured region or special-cased fixed inputs; the correctness check, fresh or hold-out inputs and timing the whole call guard it), and each outward action (the calibration submission, the quota, any paid step). One explicit yes covers this setup; anything vaguer is a no. Then write the header, run the calibration, and go unattended.
# Score loop: <slug>
- metric: <name>, <higher|lower> is better
- grader: <official grader cmd/URL, or none>
- harness: <local cmd> (correctness check + median of N=<n>)
- submission: <path or cmd>
- quota: <official submissions pre-approved, or 0 = ask each time>
- spend cap: <amount, or 0 = no paid steps>
- deadline: <local datetime, or none> freeze: <datetime>
- noise margin: <p>% of best (spread <s> / baseline median <m>, from <n> runs: <values>)
- calibration: local <x> vs official <y>
- K: 5 parallel: 1
- branch: <prefix>score-loop/<slug> resume: /score-loop resume
## Ledger
| n | time | commit | hypothesis | local median | official | keep/revert | note |
|---|---|---|---|---|---|---|---|
## Next ideas
- <idea>
## Tried
- <idea>: <why it failed>
<prefix> is the user's branch prefix with its slash (from their CLAUDE.md), or empty. Commit experiments.md or leave it untracked per TRACKING.md.
2. Loop
Per experiment:
- Pick the most promising idea from Next ideas; the list empty → add 3 from what the ledger shows so far and Tried (not repeating Tried ones).
- Make one change for that one hypothesis; commit
exp <n>: <hypothesis>. - Run the harness (local runs are ungated).
- Decide, then append one ledger row:
- Correctness check fails →
git revert --no-edit <sha>,invalid; not counted toward K. - Gain = the median's relative improvement over the best median (direction-aware); m = the margin.
- Gain > m →
keep; it is the new best. - m/2 < gain ≤ m → borderline: rerun both now, interleaved so drift hits both alike: N single runs each in ABBA order (best, candidate, candidate, best, repeated), which cancels steady drift exactly (harness at N=1; correctness already passed), and take each fresh median. Candidate's fresh median beats the best's fresh median by more than m/2 →
keep; elsegit revert --no-edit <sha>,noise. The fresh medians only decide this row; the best stays unless the candidate is kept (then its fresh median is the new best). Note:borderline: fresh best <b> (was <best>), fresh cand <c> (was <cand>), gain <g>% vs m/2 <h>%. - 0 ≤ gain ≤ m/2 →
git revert --no-edit <sha>,noise. - Worse (gain < 0) →
git revert --no-edit <sha>,revert.
- Correctness check fails →
- A failed idea moves from Next ideas to Tried with one line why. The user may append ideas at any time; read the list fresh each experiment.
Ledger rows are append-only: reverted rows stay, a correction is a new row.
Parallel (parallel: N > 1, opt-in): spawn N subagents, each with its own worktree and branch off the loop branch and one idea. Each runs the harness and returns its median and correctness. One row per variant; merge only the best qualifying variant into the loop branch, then remov
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- README.md
FAQ
Что делает скилл score-loop?
Run an unattended experiment loop that hill-climbs one rerunnable numeric score — local grader-mirroring harness, one hypothesis per commit, keep only gains beyond the noise margin, auto-revert the rest, append-only results ledger; stops on budget, deadline or plateau. Use for "improve this score", "hill-climb a metric", "optimize until plateau/deadline", or "resume" / "status" / "summary" of a score loop.
Как установить скилл score-loop?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл score-loop запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
AnthropicUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
xlsx
AnthropicUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
pptx
AnthropicUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…