tdd

Drive Python feature implementation with failing tests and pytest.

190|33|Updated Dec 3, 2025
One-click install
npx skills add https://github.com/DeL-TaiseiOzaki/claude-code-orchestra --skill tdd-del-taiseiozaki
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/DeL-TaiseiOzaki/claude-code-orchestra/tree/main/.claude/skills/tdd
Command: npx skills add https://github.com/DeL-TaiseiOzaki/claude-code-orchestra --skill tdd-del-taiseiozaki

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enforces Test-Driven Development by driving feature implementation with failing tests first.

Core Features & Use Cases

  • Test-first development: Write failing tests to define expected behavior before coding.
  • Red-Green-Refactor cycle: Iteratively implement, verify with tests, and clean up design.
  • Python-focused tooling: Applies to unit development in Python projects using pytest.

Quick Start

Create a failing test for a small feature, implement minimal code to pass, and then refactor while keeping tests green.

Frequently Asked Questions about tdd

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I start test-driven development in Python?

To start test-driven development in Python, create a failing pytest that defines expected behavior, implement minimal code to pass the test, and then refactor while keeping tests green. This enforces the Red-Green-Refactor cycle for incremental unit-level coding.

What is the Red-Green-Refactor cycle in unit testing?

The Red-Green-Refactor cycle is a test-driven development workflow where you write a failing test, implement minimal code to pass it, and clean up the design while maintaining test success. It drives feature implementation incrementally across Python projects.

Does this TDD approach work with pytest for Python unit testing?

Yes, this test-driven development approach applies to unit development in Python projects using pytest. It drives feature implementation by requiring failing tests first, ensuring minimal code passes, and refactoring while maintaining test success.

Why write failing tests before code in test-driven development?

Writing failing tests before code in test-driven development defines expected behavior upfront and enforces incremental coding. This approach ensures every feature is driven by test requirements and verified through pytest before implementation proceeds.

When should I not use test-driven development for Python projects?

Test-driven development is designed for unit-level development and incremental coding tasks. It may not suit exploratory programming or integration-level tasks where expected behavior is not yet defined, as it requires writing tests before code and maintaining green tests during refactoring.

What's the best way to refactor code while keeping pytest tests green?

The best way to refactor while keeping pytest tests green is to implement minimal code to pass tests first, then clean up design incrementally while continuously running tests. This test-driven development approach maintains test success throughout the refactoring process.