tdd
БесплатноБез исполняемых скриптовНе проверенGuide test-driven development workflow. Suggest when: "test first", "TDD", "write tests before", "red green refactor" mentioned, or when implementing features…
от ohdearquant★ 413 звёзд на GitHubОб этом скилле
TDD Workflow
Orchestrate test-driven development: Red → Green → Refactor.
Activation Triggers
- "TDD", "test-driven", "test first", "red green refactor"
- Bug fix where proving the bug first is valuable
- Feature with clear acceptance criteria
- "write the test before implementing"
The Cycle
| Phase | Action | Gate |
|---|---|---|
| RED | Write failing test expressing desired behavior | Run it — MUST fail. If it passes, it tests nothing new. |
| GREEN | Write minimum code to make the test pass | Run it — MUST pass. No over-engineering. |
| REFACTOR | Clean up while staying green | Run ALL tests — MUST pass. Never refactor with failures. |
Run commands
# lionagi Python
scripts/ci.sh test-python tests/test_feature.py::test_name # single test
scripts/ci.sh test-python # full suite
scripts/ci.sh test-python-cov # with coverage
# Rust
cargo test test_name -- --nocapture # single test
cargo test --workspace # full workspace
Key Principles
- Test must fail first: A test that passes before implementation proves nothing
- Minimal implementation: Don't over-engineer in the GREEN phase
- Refactor only when green: Never refactor with failing tests
- Small cycles: Keep each cycle focused on one behavior
- One behavior per test: Each test verifies one specific behavior
- Use the project runner: Follow the repository's configured test and CI entry points
Coverage Gates
Meet the repository's configured coverage threshold. Do not substitute generic percentages for project policy.
For lionagi, check with scripts/ci.sh test-python-cov.
See methodology.md for detailed cycle steps, multi-cycle patterns,
parallel agent TDD through the plugin's MCP server (fanout.submit), anti-patterns, and
lint/quality commands.
Relevant Source Files
lionhub/src/lionhub/serve/mcp/server.py,lionhub/src/lionhub/serve/mcp/verbs.py—fanout.submit/agent.submit, the MCP path for parallel and single-agent TDD sessionslionhub/src/lionhub/serve/cli/orchestrate/fanout.py—li o fanout, the checkout-local equivalent for parallel workerslionhub/src/lionhub/serve/cli/agent.py—li agent, the checkout-local equivalent for a single-agent implementation sessiondocs/internals/ci.md— documents the supported Python test, coverage, lint, and format entry pointpyproject.toml— project test and Pyright configuration
Установить tdd в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashReadWriteEditGlobGrepВложенные файлы
FAQ
Что делает скилл tdd?
Guide test-driven development workflow. Suggest when: "test first", "TDD", "write tests before", "red green refactor" mentioned, or when implementing features or bug fixes where a test-first approach is beneficial. Enforces Red-Green-Refactor cycle.
Как установить скилл tdd?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл tdd запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic