ds-tdd — скилл для Claude Code: что делает и как установить
Скилл ds-tdd для Claude Code ведёт исправление бага через тест: сначала проверяет, что тест падает по нужной причине, затем предлагает минимальную правку.
MIT 542 установок ★ 320 обновлён 2026-10-28
npx skills add aicodeking/deepseek-stack --skill ds-tdd -a claude-codeЧто делает ds-tdd
ds-tdd помогает воспроизвести баг тестом до изменения рабочего кода. Скилл ищет подходящий стиль тестов в проекте, добавляет узкую проверку и запускает её: падение должно указывать именно на баг, а не на опечатку или отсутствующий импорт. Затем он вносит минимальную правку и повторно запускает новый тест вместе с соседним набором тестов.
Если полноценный тест слишком сложен из-за тяжёлой настройки, хрупких моков или состояния, доступного только в production, скилл предлагает ближайшую исполняемую проверку и объясняет пропуск теста. После трёх неудачных попыток исправления он останавливается, сообщает результат и запускает /ds-unstick. Вывод тестов нужно показать и до исправления, и после него.
Какие задачи решает
- воспроизвести баг тестом до правки кода
- проверить, что тест падает именно из-за бага
- исправить дефект минимальным изменением
- запустить новый тест и соседний набор проверок
- остановить исправления после трёх безуспешных попыток
Примеры запросов агенту
- Исправь этот баг через TDD: сначала добавь регрессионный тест.
- Для этого дефекта напиши тест, который сначала падает по нужной причине.
- Примени
/ds-tddк багу в этом модуле.
Как установить ds-tdd
1Через Skills CLI (Vercel)
npx skills add aicodeking/deepseek-stack --skill ds-tdd -a claude-code2Вручную: положить файлы
~/.claude/skills/ds-tdd/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/ds-tdd/
1Через Skills CLI (Vercel)
npx skills add aicodeking/deepseek-stack --skill ds-tdd -a codex2Вручную: положить файлы
.agents/skills/ds-tdd/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add aicodeking/deepseek-stack --skill ds-tdd -a cursor2Вручную: положить файлы
.cursor/skills/ds-tdd/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install aicodeking/deepseek-stack skills/ds-tdd2Вручную: положить файлы
.github/skills/ds-tdd/SKILL.md1Через Skills CLI (Vercel)
npx skills add aicodeking/deepseek-stack --skill ds-tdd -a gemini-cli2Командой платформы
gemini skills install https://github.com/aicodeking/deepseek-stack --path skills/ds-tddВручную: положить файлы
.devin/skills/ds-tdd/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add aicodeking/deepseek-stack --skill ds-tdd -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о ds-tdd
Как установить ds-tdd в Claude Code?
Выполни npx skills add aicodeking/deepseek-stack --skill ds-tdd -a claude-code. Файл скилла находится по пути ~/.claude/skills/ds-tdd/SKILL.md.
Что делает ds-tdd?
Скилл сначала добавляет тест, который воспроизводит баг, затем вносит минимальную правку и запускает тесты повторно. Он требует показать результаты до и после исправления.
Что делает ds-tdd после нескольких неудачных попыток?
После трёх неудачных попыток исправить баг скилл останавливается, сообщает, что удалось выяснить, и запускает /ds-unstick.
Исходный текст
SKILL.md · MIT
--- name: ds-tdd description: "Fix a bug by first writing a focused test that fails for the right reason, then making the smallest change that makes it pass. Use when the user asks for TDD or a regression test, when a bug has a cheap local test target, or for /ds-tdd." --- # ds-tdd Make the bug executable before touching production code, so the fix is proven, not claimed. ## Steps 1. Pin down the bug: expected behavior, actual behavior, the code path, and the smallest way to reproduce it. 2. Find the nearest existing test style for that code path. Use it. Do not build a new harness just for this. 3. Write the smallest test that would have caught the bug. It checks intended behavior, not the current implementation. 4. Run it. Show the output. It must fail, and fail for the bug, not for a typo or missing import. If not, fix the test first. 5. Make the smallest production change that gives the intended behavior without breaking nearby contracts. 6. Run the new test and the surrounding suite. Show the output. 7. If a clean test is impractical (heavy setup, brittle mocks, production-only state), use the closest runnable check instead: a script, a repro command or a log check. Say why you skipped the test. ## Stop when - The new test failed before the fix and passes after it, both shown with output, and the surrounding suite passes. - Or after three fix attempts the test still fails. Stop, report what you learned and run /ds-unstick. ## Rules - Never edit a test to match a wrong implementation. - Do not weaken existing assertions without a clear, stated reason. - No test beats a bad test: one that mostly tests mocks, depends on timing, or would be deleted right after.
© aicodeking · MIT · aicodeking/deepseek-stack