协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
best-of-n-solving【开发与工程】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.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
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.
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.
Identify the approaches — before launching, define 2-3 distinct strategies. For example, if optimizing a slow database query:
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").
Compare results — when all runners complete, evaluate:
Merge the winner — check out the winning branch and merge it, or cherry-pick specific commits. Clean up the other worktree branches.