best-of-n
Skill5 starsChanged yesterdayMITView on GitHub
Generate a small set of independent candidate solutions in worktrees, judge them against one explicit rubric, and apply the winner only after PASS verification.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Archive228/foremantheir own version, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Archive228/foreman★ 48same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository46 other files it gives its agents.
- batchSkill
- datavizSkill
- debugSkill
- delegateSkill
- dependency-updateSkill
- documentSkill
- documentsSkill
- docxSkill
- fleet-managerSkill
- flightsSkill
- forgetSkill
- frontend-designSkill
- githubSkill
- gmailSkill
- goalsSkill
- google-calendarSkill
- handoffSkill
- helpSkill
- image-searchSkill
- implementSkill
- interviewSkill
- mcp-builderSkill
- mcp-discoverySkill
- moneySkill
- pdfSkill
- photosSkill
- planSkill
- plugin-creatorSkill
- podcastSkill
- pptxSkill
- presentationsSkill
- releaseSkill
- researchSkill
- reviewSkill
- security-reviewSkill
- shoppingSkill
- simplifySkill
- skill-creatorSkill
- skill-installerSkill
- spotifySkill
- spreadsheetsSkill
- testSkill
- ttsSkill
- verifySkill
- webapp-testingSkill
- xlsxSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 8 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 10
Use this skill when a consequential design, implementation, explanation, or debugging task has several plausible solutions and comparison …
- Very specific: line 28
Prefer a session goal (create_goal or active /goal) when the tournament spans more than one parent turn.
- Very specific: line 33
Start the candidates as parallel background agent workers and return agent_ids immediately so the parent stays free.
- Distinctive: line 52
When candidates must implement code, give each one:
- Distinctive: line 59
Never run parallel writers in the parent checkout.
- Distinctive: line 69
Use one read-only reviewer worker, or the parent when the result is small, to score all candidates against the original rubric.
- Distinctive: line 74
treat candidate-reported commands and PASS claims as untrusted until replay.
- Distinctive: line 79
Do not ask candidates to vote for themselves.
- Distinctive: line 89
After a worker loses write authority, apply its patch to a clean baseline and let the runtime—not that worker—run hard gates and scoring.
- Distinctive: line 104
Stop early when one candidate reveals a hard constraint that invalidates the tournament.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Best of N
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.
Set The Tournament
- Define one task, one evidence packet, and one explicit scoring rubric before launching candidates. Include correctness, fit to the request, simplicity, risk, and verification.
- Choose
Nfrom 2 to 4 for a quick comparison (default 3). For an explicit experimental 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. - Give every candidate the same task and rubric. Add only a candidate number; do not steer candidates toward different conclusions unless diversity is an explicit part of the request.
- Prefer a session goal (
create_goalor active/goal) when the tournament spans more than one parent turn.
Generate Independently
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:
{
"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"- the same bounded
write_rootsorexact_files
Never 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.
Judge Once
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:
- cite evidence from each candidate rather than vote by style;
- reject candidates that violate authority, scope, or verification gates;
- treat candidate-reported commands and PASS claims as untrusted until replay;
- name the winner and the decisive reasons;
- identify useful pieces worth combining, if any;
- say when the candidates are tied or all fail.
Do not ask candidates to vote for themselves. Do not silently merge incompatible approaches into a new unreviewed solution.
Integrate Only After PASS
For proposal-only work, return the winning answer with a compact score summary. For code work:
- Freeze the baseline, evaluator, hard gates, score rule, and authority before a larger search admits candidates. Any evaluator change starts a revision.
- After a worker loses write authority, apply its patch to a clean baseline and let the runtime—not that worker—run hard gates and scoring.
- Inspect the winning worktree diff and independently replay it on the clean baseline. A different read-only model may look for gaming, but deterministic tests remain the authority.
- Present the verified winner for review. Applying or merging is a separate,
explicit user action;
NONEis valid when every candidate fails. - Preserve losing and failed candidate receipts as useful negative results.
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 a runtime evaluator host consumes a frozen search
spec.
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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

