tdd-python
БесплатноБез исполняемых скриптовНе проверенPython Test-Driven Development expertise with pytest, strict red-green-refactor methodology, domain-first modeling (DDD), principled DRY discipline, FastAPI…
Об этом скилле
TDD Python Skill
Python Test-Driven Development following strict red-green-refactor cycle with pytest — sharpened by DDD at Red (model the domain first) and DRY at Refactor (deduplicate same-concept repetition only).
Description
Systematic Python implementation using TDD methodology. Tests are written first and drive design; domain vocabulary drives the tests; duplication is removed only when the same concept repeats, not when syntax coincidentally looks alike.
Discipline Layering
- Before Red — Model the Domain: Name the entity, value object, or aggregate in the business's language. Decide entity vs. value object. Reject primitive obsession — wrap
str/intinEmailAddress,Money,NewType, orpydantic.BaseModelwhen they carry rules. Keep domain logic out of FastAPI routes. - Red: Write a failing test. Name it in domain terms (
test_rejects_refund_when_amount_exceeds_daily_limit) — never mechanical (test_returns_false). - Green: Minimal code to pass. No speculative abstractions.
- Refactor — DRY with discipline: Deduplicate only when the same domain concept appears ≥3 times with the same meaning. Three similar lines beats a premature abstraction. Promote recurring primitives to value objects. When uncertain, inline.
What's Included
- Examples: Python TDD cycles, FastAPI TDD, Pydantic model TDD, value-object modeling
- Reference: pytest patterns, Python testing best practices, branded-type idioms (
NewType,frozen=True) - Templates: pytest templates, TDD workflows
Use When
- Implementing Python features with TDD
- Modeling domain concepts (entities, value objects, aggregates)
- FastAPI endpoint development (keeping domain rules out of routes)
- Pydantic model development
- Refactoring duplication after a green test
Related Agents
tdd-python-implementer
Skill Version: 1.1
Установить tdd-python в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteMultiEditBashGrepGlobTodoWriteВложенные файлы
FAQ
Что делает скилл tdd-python?
Python Test-Driven Development expertise with pytest, strict red-green-refactor methodology, domain-first modeling (DDD), principled DRY discipline, FastAPI testing patterns, and Pydantic model testing. Use when implementing Python features with TDD, writing pytest tests, testing FastAPI endpoints, developing with test-first approach, modeling domain concepts, refactoring duplication, or when user mentions 'Python TDD', 'pytest', 'FastAPI testing', 'red-green-refactor', 'Python unit tests', 'test-driven Python', 'domain modeling', 'value object', 'ubiquitous language', 'DRY', or 'Python test coverage'.
Как установить скилл tdd-python?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл tdd-python запускает скрипты?
Нет, скилл состоит только из инструкций (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