ds-best-of-n — скилл для Claude Code: что делает и как установить
Скилл ds-best-of-n для Claude Code запускает несколько независимых вариантов одной задачи и собирает итоговый результат из лучшего. Включается для сложных артефактов, где первый вариант может оказаться неудачным.
MIT 539 установок ★ 320 обновлён 2026-10-28
npx skills add aicodeking/deepseek-stack --skill ds-best-of-n -a claude-codeЧто делает ds-best-of-n
Скилл создаёт несколько независимых версий результата, проверяет их и объединяет сильные части. Сначала агент задаёт общий промпт и критерии оценки, затем запускает попытки параллельно в отдельных местах. Если субагенты недоступны, варианты создаются последовательно в новых контекстах.
Каждую версию агент проверяет сборкой, тестами или пробным запуском и отбрасывает те, что не работают. Из оставшихся выбирает основу по общей структуре, а отдельные удачные решения переносит в неё, не сливая целые файлы. После этого запускает все проверки заново и показывает результат.
По умолчанию скилл запускает 3 попытки, а для широкого пространства вариантов — 5. Если ни одна версия не проходит проверку после повторного запуска с уточнённым промптом, агент сообщает о неудаче.
Какие задачи решает
- сравнить несколько вариантов одной задачи
- отсеять варианты, которые не проходят проверки
- перенести удачные решения в выбранную основу
- повторно проверить собранный результат
Примеры запросов агенту
- Сделай несколько вариантов этой задачи командой
/ds-best-of-n. - Попробуй три версии и собери итог из лучших частей.
- Сравни варианты реализации, проверь их тестами и объедини удачные решения.
Как установить ds-best-of-n
1Через Skills CLI (Vercel)
npx skills add aicodeking/deepseek-stack --skill ds-best-of-n -a claude-code2Вручную: положить файлы
~/.claude/skills/ds-best-of-n/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/ds-best-of-n/
1Через Skills CLI (Vercel)
npx skills add aicodeking/deepseek-stack --skill ds-best-of-n -a codex2Вручную: положить файлы
.agents/skills/ds-best-of-n/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add aicodeking/deepseek-stack --skill ds-best-of-n -a cursor2Вручную: положить файлы
.cursor/skills/ds-best-of-n/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install aicodeking/deepseek-stack skills/ds-best-of-n2Вручную: положить файлы
.github/skills/ds-best-of-n/SKILL.md1Через Skills CLI (Vercel)
npx skills add aicodeking/deepseek-stack --skill ds-best-of-n -a gemini-cli2Командой платформы
gemini skills install https://github.com/aicodeking/deepseek-stack --path skills/ds-best-of-nВручную: положить файлы
.devin/skills/ds-best-of-n/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add aicodeking/deepseek-stack --skill ds-best-of-n -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о ds-best-of-n
Как установить ds-best-of-n в Claude Code?
Выполните npx skills add aicodeking/deepseek-stack --skill ds-best-of-n -a claude-code. Файл скилла находится по пути ~/.claude/skills/ds-best-of-n/SKILL.md.
Что делает ds-best-of-n?
Скилл запускает несколько вариантов одной задачи, проверяет их и переносит лучшие отдельные решения в выбранную основу. Затем повторно проверяет итог.
Сколько вариантов запускает ds-best-of-n?
По умолчанию запускаются 3 попытки. Для широкого пространства вариантов скилл использует 5.
Исходный текст
SKILL.md · MIT
--- name: ds-best-of-n description: "Run N independent attempts at the same task in parallel, pick the strongest as the base, and graft the best parts of the others into it. Use when one attempt at a non-trivial artifact could land on the wrong shape, or for /ds-best-of-n, 'try a few versions', 'best of 3'." --- # ds-best-of-n One attempt is a sample, not an answer. DeepSeek is cheap enough that three to five attempts usually cost less than one round of fixing a bad first try. ## Steps 1. Frame the task. Write one prompt that every attempt gets unchanged. Write a private rubric of 3 to 6 concrete, checkable criteria. Attempts never see the rubric. 2. Pick N. Use 3 by default and 5 when the design space is wide. Give each attempt its own output location, such as a git worktree or a separate temp folder. 3. Spawn N subagents at once with the prompt, the shared context and their output path. Ask each for the artifact plus a short note on alternatives it rejected. If a harness cannot run subagents, run the attempts one after another in fresh contexts. 4. Check each attempt. Run its build, tests or a quick probe. Record pass or fail with output. Discard attempts that do not run. 5. Score the survivors against the rubric. Pick the one with the best overall structure as the base. Structure beats polish. 6. List the specific strong parts of the other attempts: a test, an edge case, a cleaner function. Graft only those into the base. Do not merge whole files. 7. Re-run the full checks on the grafted result and show the output. ## Stop when - The grafted result passes every check and you have reported base, grafts and scores. - Or no attempt passes after one re-run with a clarified prompt. Report what failed. ## Rules - Never pick by reading the attempt's own summary. Pick by running it. - Do not let one attempt see another before scoring. - Keep the losing attempts until the final checks pass.
© aicodeking · MIT · aicodeking/deepseek-stack