Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generate a small set of independent candidate solutions in worktrees, judge them against one explicit rubric, and apply the winner only after PASS verification.
.claude/skills/hmbown-best-of-n/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-08 | ✗→✓ | ▲ Improved | -10% | 0% |
| case-09 | ✗→✓ | ▲ Improved | -2% | 0% |
| case-14 | ✗→✓ | ▲ Improved | -12% | 0% |
| case-15 | ✗→✓ | ▲ Improved | -27% | 0% |
| case-16 | ✗→✓ | ▲ Improved | -18% | 0% |
Use this skill when a consequential design, implementation, explanation, or debugging task has several plausible solutions and comparison is worth the extra model work. In Operate mode this is the preferred ensemble pattern for high-stakes or ambiguous approaches. Do not use it for a tiny change or when the user has already chosen the approach.
launching candidates. Include correctness, fit to the request, simplicity, risk, and verification.
N from 2 to 4 for a quick comparison (default 3). For an explicitexperimental search, use the Workflow search option: 2–16 live candidates, with larger validated populations queued at the Workflow host's 16-worker concurrency gate rather than launched at once.
do not steer candidates toward different conclusions unless diversity is an explicit part of the request.
create_goal or active /goal) when the tournamentspans more than one parent turn.
Start the candidates as parallel background agent workers and return agent_ids immediately so the parent stays free. For proposals, reviews, or research, keep them read-only:
json{ "action": "start", "name": "candidate_1", "prompt": "Produce candidate 1 for the task below. Return the proposal, evidence, risks, and rubric self-score. Do not edit files.\n\n<TASK AND RUBRIC>", "type": "worker", "model_strength": "same", "write_authority": "read_only" }
Launch the remaining candidates with the same contract, then use agent wait or completion events to collect every result. Do not show one candidate another candidate's answer before generation finishes.
When candidates must implement code, give each one:
type: "builder"worktree: truewrite_authority: "worktree_write"write_roots or exact_filesNever run parallel writers in the parent checkout. Each builder must return the structured candidate contract (candidate id, hypothesis, paths, commands, self-verdict, risks, and artifact references). A self-verdict is evidence to inspect, not a hard-gate result.
Optional diversity: pin different model / Fleet fleet_profile values when the project has multiple capable routes; otherwise keep model strength same.
Use one read-only reviewer worker, or the parent when the result is small, to score all candidates against the original rubric. The judge must:
Do not ask candidates to vote for themselves. Do not silently merge incompatible approaches into a new unreviewed solution.
For proposal-only work, return the winning answer with a compact score summary. For code work:
a larger search admits candidates. Any evaluator change starts a revision.
and let the runtime—not that worker—run hard gates and scoring.
baseline. A different read-only model may look for gaming, but deterministic tests remain the authority.
explicit user action; NONE is valid when every candidate fails.
The checked-in operate_best_of_n.workflow.js recipe supports strategy: "search" for structured 2–16 candidate generation and review. It does not yet turn prompt-listed commands into hidden runtime gates. Do not advertise those gates until the runtime evaluator host consumes a frozen WorkflowSearchSpec.
Stop early when one candidate reveals a hard constraint that invalidates the tournament. Report the negative result rather than spending the remaining budget to manufacture variety.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 20,636 | 14,883 | -28% | 1 | 1 | 0% | 3,730 | 1,447 | -61% | 0 | 0 | — |
case-02 | fail→fail | 18,260 | 5,140 | -72% | 1 | 1 | 0% | 2,923 | 1,385 | -53% | 0 | 0 | — |
case-03 | fail→fail | 29,438 | 41,344 | +40% | 1 | 1 | 0% | 4,809 | 1,445 | -70% | 0 | 0 | — |
case-04 | pass→fail | 6,117 | 4,862 | -21% | 1 | 1 | 0% | 1,054 | 1,292 | +23% | 0 | 0 | — |
case-05 | fail→fail | 2,731 | 4,049 | +48% | 1 | 1 | 0% | 303 | 1,226 | +305% | 0 | 0 | — |
case-06 | fail→fail | 8,250 | 5,124 | -38% | 1 | 1 | 0% | 1,585 | 1,317 | -17% | 0 | 0 | — |
case-07 | pass→pass | 9,640 | 2,242 | -77% | 1 | 1 | 0% | 1,614 | 1,371 | -15% | 0 | 0 | — |
case-08 | fail→pass | 14,671 | 7,690 | -48% | 1 | 1 | 0% | 2,639 | 2,372 | -10% | 0 | 0 | — |
case-09 | fail→pass | 9,415 | 3,142 | -67% | 1 | 1 | 0% | 1,581 | 1,549 | -2% | 0 | 0 | — |
case-10 | pass→pass | 10,802 | 1,677 | -84% | 1 | 1 | 0% | 1,745 | 1,281 | -27% | 0 | 0 | — |
case-11 | pass→pass | 9,294 | 7,561 | -19% | 1 | 1 | 0% | 1,778 | 1,901 | +7% | 0 | 0 | — |
case-12 | pass→pass | 5,668 | 2,265 | -60% | 1 | 1 | 0% | 1,126 | 1,485 | +32% | 0 | 0 | — |
case-13 | pass→pass | 11,645 | 3,459 | -70% | 1 | 1 | 0% | 1,728 | 1,637 | -5% | 0 | 0 | — |
case-14 | fail→pass | 11,595 | 3,959 | -66% | 1 | 1 | 0% | 1,962 | 1,727 | -12% | 0 | 0 | — |
case-15 | fail→pass | 12,867 | 4,305 | -67% | 1 | 1 | 0% | 2,396 | 1,754 | -27% | 0 | 0 | — |
case-16 | fail→pass | 24,202 | 1,502 | -94% | 1 | 1 | 0% | 1,554 | 1,277 | -18% | 0 | 0 | — |
case-17 | pass→pass | 10,498 | 3,470 | -67% | 1 | 1 | 0% | 1,758 | 1,707 | -3% | 0 | 0 | — |
case-18 | pass→pass | 8,117 | 3,621 | -55% | 1 | 1 | 0% | 1,548 | 1,664 | +7% | 0 | 0 | — |
case-19 | pass→pass | 10,730 | 4,385 | -59% | 1 | 1 | 0% | 1,670 | 1,905 | +14% | 0 | 0 | — |
case-20 | pass→pass | 12,093 | 6,090 | -50% | 1 | 1 | 0% | 1,971 | 1,899 | -4% | 0 | 0 | — |
case-21 | fail→pass | 11,179 | 2,064 | -82% | 1 | 1 | 0% | 2,317 | 1,440 | -38% | 0 | 0 | — |
case-22 | fail→pass | 10,440 | 7,715 | -26% | 1 | 1 | 0% | 1,899 | 2,191 | +15% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 15 counted toward the lift figure. The other 7 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +27 percentage points is the difference between those two pass rates over the 15 comparable cases. 3 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.6-flash | verified | 8/7/2026 | +23% |
Other measured skills in the registry, with their headline benchmark lift.