best-of-n
Qué hace
Esta skill hace que la IA genere algunas soluciones candidatas para una tarea importante, las puntúe con la misma rúbrica y use la mejor después de verificarla. Es para decisiones de alto riesgo o ambiguas en las que comparar opciones merece el esfuerzo extra.
Cuándo usarla
- ✓Cuando un diseño o una implementación tiene varios enfoques plausibles que comparar.
- ✓Cuando una tarea de depuración o de explicación es lo bastante arriesgada como para justificar revisar varias respuestas.
- ✓Cuando quieres una rúbrica de puntuación clara aplicada antes de elegir un enfoque.
Link de la skill
https://github.com/codewhale-hq/Codewhale/blob/main/crates/skills/assets/skills/best-of-n/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Prueba tres formas distintas de diseñar esta capa de caché, puntúalas y aplica solo la mejor después de que pase las pruebas.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La IA lanza varios candidatos independientes con la misma tarea y rúbrica, recoge sus resultados, los evalúa y aplica el ganador solo cuando la verificación se supera.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
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.
Preguntas frecuentes
¿Cuántos candidatos se usan?
Por defecto son tres, y la skill permite de dos a cuatro para una comparación rápida.
¿Es un desperdicio para cambios pequeños?
La skill dice que no se use para cambios mínimos ni cuando el enfoque ya está elegido.
¿Pueden los candidatos modificar archivos?
Las propuestas, revisiones e investigaciones son de solo lectura, mientras que los candidatos de implementación trabajan en worktrees separados.
Detalles
Descripción original del autor
Generate a small set of independent candidate solutions in worktrees, judge them against one explicit rubric, and apply the winner only after PASS verification.
repo: codewhale-hq/Codewhale
Popularidad
- Estrellas en GitHub
- 41 mil
- Posición en el ranking
- #6520
- Licencia
- MIT
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
dataviz
41 milAyuda a tu agente a elegir un gráfico o un panel adecuado para tus datos, con etiquetas claras, notas sobre las fuentes y comprobaciones de ejes y valores que faltan.
debug
41 milAyuda a tu agente a encontrar la causa real de un error reproduciéndolo, acotándolo y corrigiéndolo solo cuando lo apruebes, en lugar de adivinar.
delegate
41 milEnseña a tu agente a dividir una tarea grande en ayudantes paralelos enfocados, manteniendo la planificación, la integración y la comprobación final en sus propias manos.
dependency-update
41 milAyuda a tu agente a actualizar un conjunto concreto de dependencias de software, leer sus notas de versión, corregir los cambios que rompen compatibilidad y ejecutar las comprobaciones del proyecto.
Skills parecidas
add-model-provider
394 milPermite que tu agente conecte un nuevo proveedor de modelos de IA a OpenClaw con comandos de configuración seguros, mantenga las claves API fuera del texto plano y haga una prueba en vivo.
acp-router
394 milAyuda a tu agente a enviar una tarea a un asistente de programación como Claude Code o Cursor a través de OpenClaw, para que el trabajo se ejecute en esa herramienta.
browser-automation
394 milEnseña a tu agente a controlar páginas web paso a paso, incluidos los inicios de sesión, las pestañas y la recuperación cuando una página deja de responder.