Agent skill

Best Of N Solving

by spencerpauly in spencerpauly/awesome-cursor-skills

Solve a hard problem by trying multiple approaches in parallel using isolated git worktrees.

CC0-1.0Auto-check passedDevelopment

Install Best Of N Solving

skills CLI
$ npx skills add spencerpauly/awesome-cursor-skills --skill best-of-n-solving -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install spencerpauly/awesome-cursor-skills best-of-n-solving --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/spencerpauly/awesome-cursor-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/resources/best-of-n-solving .claude/skills/best-of-n-solving && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
best-of-n-solving
GitHub stars
844
Token cost
~698 tokens
SKILL.md length
319 words
Files
1
Skills in repo
60
Repo updated
First seen
Licence
CC0-1.0

At a glance

Solve a hard problem by trying multiple approaches in parallel using isolated git worktrees.

  • Works in 4 steps: Identify the approaches — before… → Launch parallel runners — use the Task… → Compare results — when all runners… → …
  • Complex refactors
  • SKILL.md covers How It Works, Steps, When to Use This and Notes
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Best Of N Solving is an agent skill from spencerpauly/awesome-cursor-skills. Solve a hard problem by trying multiple approaches in parallel using isolated git worktrees. Each attempt runs in its own branch, and the best solution is selected. Use for complex refactors, tricky bugs, or architectural decisions where multiple strategies could work.

Its SKILL.md is about 700 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Git worktrees and Refactoring. The repository describes itself as: A curated list of awesome skills for Cursor. The licence is CC0-1.0.

When your agent uses it

  • Complex refactors
  • Architectural decisions where multiple strategies could work

Example prompts

  • “/best-of-n-solving”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Identify the approaches — before launching, define 2-3 distinct strategies. For example, if optimizing a slow database query
  2. Launch parallel runners — use the Task tool with subagent_type: "best-of-n-runner" for each approach. Launch them all in a single message…
  3. Compare results — when all runners complete, evaluate
  4. Merge the winner — check out the winning branch and merge it, or cherry-pick specific commits. Clean up the other worktree branches.

What it can do on your machine

Read from SKILL.md and the folder at commit 99cd265. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Best Of N Solving loads about 698 tokens when it runs. Until then it costs about 72 tokens; SKILL.md has 319 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~72
When it runs · the whole SKILL.md, loaded when a task matches
~698

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from spencerpauly/awesome-cursor-skills at commit 99cd265, republished under its CC0-1.0 licence (© spencerpauly). 319 words, ~698 tokens.

Download SKILL.mdSave it as .claude/skills/best-of-n-solving/SKILL.md (or your agent's skills folder).
name
best-of-n-solving
description
Solve a hard problem by trying multiple approaches in parallel using isolated git worktrees. Each attempt runs in its own branch, and the best solution is selected. Use for complex refactors, tricky bugs, or architectural decisions where multiple strategies could work.

Best-of-N Problem Solving

Use this skill when facing a hard problem with multiple possible approaches — complex refactors, tricky bugs, performance optimization, or architectural decisions where you're not sure which strategy will work best.

How It Works

Cursor's best-of-n-runner subagent type creates isolated git worktrees — each attempt gets its own branch and working directory. Multiple approaches run in parallel without interfering with each other. You compare the results and pick the winner.

Steps

  1. Identify the approaches — before launching, define 2-3 distinct strategies. For example, if optimizing a slow database query:

    • Approach A: Add a composite index and rewrite the query
    • Approach B: Denormalize the schema with a materialized view
    • Approach C: Add application-level caching with Redis
  2. Launch parallel runners — use the Task tool with subagent_type: "best-of-n-runner" for each approach. Launch them all in a single message so they run concurrently:

    Task 1: { subagent_type: "best-of-n-runner", prompt: "Approach A: ..." }
    Task 2: { subagent_type: "best-of-n-runner", prompt: "Approach B: ..." }
    Task 3: { subagent_type: "best-of-n-runner", prompt: "Approach C: ..." }

    Each runner gets its own branch and worktree. Include clear success criteria in the prompt (e.g., "run the tests and report if they pass", "measure the query time").

  3. Compare results — when all runners complete, evaluate:

    • Which approach passes all tests?
    • Which has the cleanest implementation?
    • Which has the best performance characteristics?
    • Which is easiest to maintain long-term?
  4. Merge the winner — check out the winning branch and merge it, or cherry-pick specific commits. Clean up the other worktree branches.

When to Use This

  • A bug that could have multiple root causes
  • A refactor where you're choosing between patterns (e.g., composition vs. inheritance)
  • Performance optimization with multiple strategies
  • Trying different libraries or approaches for the same feature
  • Any situation where "just try it" is faster than analyzing

Notes

  • Each runner is fully isolated — they can't see each other's changes.
  • Keep prompts specific: include the file paths, the problem statement, and clear success criteria.
  • For simpler problems, this is overkill — just use a single agent.
  • The branches are real git branches, so you can inspect them manually if needed.

© spencerpauly, CC0-1.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in resources/best-of-n-solving of spencerpauly/awesome-cursor-skills.

Open the folder on GitHubat commit 99cd265

Compare with similar skills

Best Of N Solving next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Best Of N Solving compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Best Of N Solving this skillspencerpauly/awesome-cursor-skills844—~698Automated safety check: PassCC0-1.0
Migrate Core Code to Submodulestinyhumansai/openhuman42k—~2.6kAutomated safety check: PassGPL-3.0
Subagent Coordinatorflyxl/datazen114—~936Automated safety check: PassGPL-3.0
Batch Orchestrationrohitg00/pro-workflow2.9k—~1.2kAutomated safety check: PassNone
Nv Park And Reviewnovuhq/novu40k—~1.6kAutomated safety check: PassCustom licence
React Refactor Tournamentragnar-pwninskjold/tech-snacks137—~1.3kAutomated safety check: PassMIT

Similar skills

  • Migrate Core Code to Submodules

    tinyhumansai/openhuman

    Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

    42k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Orchestrate multi-track parallel feature development with subagents and git worktrees.

    114 GitHub stars~936 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Batch Orchestration

    rohitg00/pro-workflow

    Decompose large-scale changes into independent units and spawn parallel agents in isolated worktrees.

    2.9k GitHub stars~1.2k tokensUpdated 12 days ago
    Agent WorkflowsAuto-check passed
  • Commit local changes as a baseline, hop into a lightweight review worktree, run a thermo-nuclear code quality review scoped to ONLY that commit, commit the resulting refactor as a separate follow-up…

    40k GitHub stars~1.6k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • React Refactor Tournament

    ragnar-pwninskjold/tech-snacks

    Review React/Next.js code against the real vercel-react-best-practices skill, backlog the performance findings keyed to actual rule ids + impact tiers, rank the most over-subscribed tiers, then fix…

    137 GitHub stars~1.3k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Omk Coding

    KaimingWan/oh-my-kiro

    Enforces coding best practices: deep-read before modify, LSP-first navigation, TDD red-green-refactor, minimal changes, self-review, verification.

    107 GitHub stars~2.4k tokensUpdated 6 mo ago
    DevelopmentAuto-check passed

More from spencerpauly/awesome-cursor-skills

All 60 skills in this repo
  • Generating Images

    spencerpauly/awesome-cursor-skills

    Generate or edit images using the OpenAI Image API (gpt-image-2).

    844 GitHub stars~3.7k tokensUpdated 2 mo ago
    Auto-check: notes
  • Babysitting PR

    spencerpauly/awesome-cursor-skills

    Monitor a pull request for CI failures, review comments, and merge conflicts — then fix them automatically.

    844 GitHub stars~930 tokensUpdated 2 mo ago
    Auto-check passed
  • Grinding Until Pass

    spencerpauly/awesome-cursor-skills

    Keep iterating on code changes until the tests pass, the build succeeds, or linting is clean.

    844 GitHub stars~796 tokensUpdated 2 mo ago
    Auto-check passed
  • Parallel CI Triage

    spencerpauly/awesome-cursor-skills

    When GitHub Actions fails, fetch failing job logs and assign each failing job to a separate subagent that fixes its slice of the problem in parallel.

    844 GitHub stars~793 tokensUpdated 2 mo ago
    Auto-check passed
  • Parallel Exploring

    spencerpauly/awesome-cursor-skills

    Explore a large codebase in parallel by launching multiple explore subagents that each investigate a different area simultaneously.

    844 GitHub stars~787 tokensUpdated 2 mo ago
    Auto-check: notes
  • Profiling Performance

    spencerpauly/awesome-cursor-skills

    Profile a running web application's CPU performance using Cursor's built-in browser profiler.

    844 GitHub stars~686 tokensUpdated 2 mo ago
    Auto-check passed

Questions about Best Of N Solving

What does Best Of N Solving do?

Solve a hard problem by trying multiple approaches in parallel using isolated git worktrees. Best Of N Solving is an agent skill from spencerpauly/awesome-cursor-skills. Solve a hard problem by trying multiple approaches in parallel using isolated git worktrees.

When should I use Best Of N Solving?

Best Of N Solving fits situations like: complex refactors; architectural decisions where multiple strategies could work.

How do I install Best Of N Solving in Claude Code?

Run `npx skills add spencerpauly/awesome-cursor-skills --skill best-of-n-solving -a claude-code`. Or copy the skill folder (resources/best-of-n-solving in spencerpauly/awesome-cursor-skills) into .claude/skills/best-of-n-solving in your project. Claude Code loads it when a task matches its description.

How do I install Best Of N Solving in Codex?

Run `npx skills add spencerpauly/awesome-cursor-skills --skill best-of-n-solving -a codex`. Or copy the skill folder (resources/best-of-n-solving in spencerpauly/awesome-cursor-skills) into .agents/skills/best-of-n-solving in your project. Codex loads it when a task matches its description.

Can I use Best Of N Solving in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add spencerpauly/awesome-cursor-skills --skill best-of-n-solving -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/best-of-n-solving, .gemini/skills/best-of-n-solving, .github/skills/best-of-n-solving and .opencode/skills/best-of-n-solving in your project.

What does Best Of N Solving need to run?

SKILL.md names no scripts, command-line tools or credentials: Best Of N Solving is instructions for the agent only.

Does Best Of N Solving access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Best Of N Solving safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Best Of N Solving use?

Best Of N Solving is published under the CC0-1.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Best Of N Solving use?

About 698 tokens (SKILL.md is roughly 2.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Best Of N Solving?

Skills that share tags, products or a category with Best Of N Solving: Migrate Core Code to Submodules (tinyhumansai/openhuman, 42k stars), Subagent Coordinator (flyxl/datazen, 114 stars), Batch Orchestration (rohitg00/pro-workflow, 2.9k stars) and Nv Park And Review (novuhq/novu, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Best Of N Solving?

spencerpauly (a GitHub user) maintains it in spencerpauly/awesome-cursor-skills, which has 844 GitHub stars. The repository holds 60 skills in this directory. The repository was last updated on August 2, 2026.

Source: spencerpauly/awesome-cursor-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.