tdd-workflow

Guide Python TDD red-green-refactor cycles with pytest verification.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/caicai557/windsurf-project --skill tdd-workflow-caicai557
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/caicai557/windsurf-project/tree/main/.agent/skills/tdd-workflow
Command: npx skills add https://github.com/caicai557/windsurf-project --skill tdd-workflow-caicai557

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides the TDD cycle to build reliable software with test-driven development.

Core Features & Use Cases

  • Red-green-refactor cycle
  • Quick verify gate
  • Testing patterns

Quick Start

Trigger phrases:

  • "Add tests for X"
  • "Implement X with TDD"
  • "Fix bug in X (TDD)"

Frequently Asked Questions about tdd-workflow

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

FAQPage Schema
How do I implement test-driven development with the red-green-refactor cycle?

Test-driven development with red-green-refactor means writing failing tests first, then implementing minimal code to pass them, then refactoring. This Skill guides you through each phase—writing specs, creating failing pytest tests, coding the minimal solution, verifying all tests pass, and documenting changes in your Python project.

Can I use TDD with pytest in my Python project?

Yes. This Skill works with Python projects using pytest, test directories, and virtual environments (.venv). It guides developers through the complete TDD cycle: reading specifications, writing failing tests, implementing code, running the test suite, and verifying all tests pass.

What's the best way to add tests before writing code?

Test-first development means writing failing tests that specify behavior before implementation. This Skill walks you through creating pytest tests from specifications, then building minimal code to satisfy them, ensuring your implementation matches requirements from the start.

How do I verify my code changes don't break existing tests?

After implementing changes, run your pytest test suite to verify all tests pass. This Skill includes a verify gate that checks your entire test suite, ensuring your changes work correctly and catch regressions before you document and commit.

Does TDD work for bug fixes, or only new features?

TDD applies to both. Write a failing test that reproduces the bug, implement the minimal fix, verify tests pass, then refactor. This Skill supports the red-green-refactor cycle for bug fixes using the same pytest workflow and verify gate as feature development.