grey-haven-tdd-python

Python Test-Driven Development expertise with pytest, strict red-green-refactor methodology, 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, or when user mentions 'Python TDD', 'pytest', 'FastAPI testing', 'red-green-refactor', 'Python unit tests', 'test-driven Python', or 'Python test coverage'.

⭐15stars🔀2forks📁View on GitHub🕐Updated Dec 27, 2025⬇️1downloads

When & Why to Use This Skill

This Claude skill provides expert-level guidance and automation for Python Test-Driven Development (TDD). By leveraging the pytest framework and a strict red-green-refactor methodology, it ensures high-quality code through systematic testing. It is specifically optimized for FastAPI endpoint testing and Pydantic model validation, making it an essential tool for building reliable, production-ready Python applications with high test coverage.

Use Cases

  • Implementing new Python features using a strict red-green-refactor workflow to ensure design clarity and minimize production bugs.
  • Developing robust FastAPI applications by writing comprehensive integration tests for endpoints, dependency injection, and middleware.
  • Validating data integrity and schema constraints in Pydantic models through automated unit tests and edge-case analysis.
  • Enhancing legacy Python codebases by introducing structured pytest suites and improving overall code reliability and maintainability.
namegrey-haven-tdd-python
description"Python Test-Driven Development expertise with pytest, strict red-green-refactor methodology, 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, or when user mentions 'Python TDD', 'pytest', 'FastAPI testing', 'red-green-refactor', 'Python unit tests', 'test-driven Python', or 'Python test coverage'."
# v2.0.43Skills to auto-load for subagents spawned from this skill
# v2.0.74Restrict tools available when this skill is active

TDD Python Skill

Python Test-Driven Development following strict red-green-refactor cycle with pytest and comprehensive coverage.

Description

Systematic Python implementation using TDD methodology, ensuring tests written first and driving design decisions.

What's Included

  • Examples: Python TDD cycles, FastAPI TDD, Pydantic model TDD
  • Reference: pytest patterns, Python testing best practices
  • Templates: pytest templates, TDD workflows

Use When

  • Implementing Python features with TDD
  • FastAPI development
  • Pydantic model development
  • tdd-python-implementer

Skill Version: 1.0