/peiraloop:init "<what to improve, how it is measured, what must stay valid, budget>"from peiraloop
Set up a peiraloop experiment in this repository: turn the user's goal ("make X faster while tests pass, budget 1 hour and $5") into .peiraloop/spec.json with an objective, a trustworthy evaluator command, constraints, an editable scope, protected evaluator files and a budget, then validate it with a calibration run. Use when the user invokes /peiraloop:init, or asks in their own words to set up or define a peiraloop experiment. Never use it for a request that does not mention peiraloop.
Ships in peiraloop. 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.
Help the user define one experiment. The spec is the contract that decides what counts as better, so its quality matters more than speed.
node ${CLAUDE_PLUGIN_ROOT}/core/cli.mjs (also on PATH as peira in this session)Current state:
!node ${CLAUDE_PLUGIN_ROOT}/core/cli.mjs preflight
Steps:
{"metrics": {...}} as its last stdout line, show it to the user, and write it only after they agree. Benchmarks must not read anything the agent may change except the code under test..peiraloop/spec.json:
objective: one metric, its direction, and a minEffect the user cares about. Never 0 for a noisy metric.evaluator.kind: deterministic only if the same code always gives the same number (sizes, counts); otherwise noisy.evaluator.prepare: whatever a fresh clone needs before the evaluator runs (installing dependencies, building). Runs happen in fresh checkouts outside the repository.guards: the test commands that must keep passing. constraints: limits on other metrics.scope: the narrowest paths the agent needs. protected: the benchmark, its data, the tests, and dependency manifests.budget: what the user said. Ask if they did not say. The dollar figure caps agent spend as estimated by Claude Code at list price.check --calibrate and report the metric values, the noise and the smallest effect the run can detect. If the check fails, fix the spec or the evaluator and try again. If the smallest detectable effect is far above minEffect, say so plainly and suggest raising minEffect, more sampling.looks, or a less noisy benchmark./peiraloop:run.Do not start a run from this skill.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub kiyeonjeon21/peiraloop --plugin peiraloop4 skills in this plugin
/reportExplain the results of a peiraloop run from its evidence: the confirmed improvement against the baseline, every trial with its outcome and interval, cost and time; and help reproduce a result or create a branch at the best commit. Use when the user invokes /peiraloop:report or asks about the results of a peiraloop run. Never use it for a request that does not mention peiraloop./runStart or resume a peiraloop experiment run: an agent proposes one change per trial in an isolated, sandboxed worktree, the protected evaluator measures it against the current best, and code accepts, rejects or marks it inconclusive until a budget or stop rule ends the run. Use when the user invokes /peiraloop:run, or asks in their own words to run or resume a peiraloop experiment. Never use it for a request that does not mention peiraloop. Arguments: --resume to continue an interrupted run; --new-evaluator only after the user confirmed the evaluator change; --allow-underpowered only after the user accepted a noisy evaluator./statusShow the progress of the current or latest peiraloop run: trials so far and their outcomes, the best verified value, time and estimated cost against the budget, and the trial in flight. Use when the user invokes /peiraloop:status or asks how a peiraloop run is going. Never use it for a request that does not mention peiraloop.