implementing-python-tdd

Coordinate Python TDD lifecycle from planning to self-audit.

Updated Aug 18, 2025
One-click install
npx skills add https://github.com/masa-codehub/gemini_agent --skill implementing-python-tdd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: implementing-python-tdd
Source: https://github.com/masa-codehub/gemini_agent/tree/main/.gemini/skills/implementing-python-tdd
Command: npx skills add https://github.com/masa-codehub/gemini_agent --skill implementing-python-tdd

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

This skill guides developers through a complete Python Test-Driven Development cycle, turning requirements into failing tests and producing clean, well-tested code.

Core Features & Use Cases

  • End-to-end TDD workflow (Red/Green/Refactor) for Python projects with automated quality checks.
  • Includes goal setting, environment preparation, test creation from specs, implementation, static analysis, and self-audit.
  • Use cases include onboarding new features, maintaining code quality in legacy code, and coaching teams on TDD best practices.

Quick Start

Initiate a Python TDD sprint by creating a feature branch, writing a failing test per the specs, and iterating until all tests pass.

Frequently Asked Questions about implementing-python-tdd

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

FAQPage Schema
How do I start a Python TDD cycle for a new feature?

To start a Python TDD cycle, create a feature branch, define goals from specs, write a failing pytest test, and iterate implementation until tests pass. This structured workflow ensures requirements are met with clean code.

What is the Red Green Refactor workflow in Python development?

The Red Green Refactor workflow in Python development involves writing failing tests, implementing minimal code to pass them, and refactoring for quality. It guides developers from requirements to well-tested code.

Can I use pytest with Ruff and Mypy for automated code quality checks?

Yes, you can use pytest with Ruff and Mypy for automated code quality checks. The TDD workflow integrates static analysis using Ruff and Mypy alongside pytest coverage verification to ensure clean code.

What's the best way to maintain code quality in legacy Python projects?

The best way to maintain code quality in legacy Python projects is applying a structured TDD workflow. It guides goal setting, test creation from specs, and automated static analysis to safely refactor and improve code.

Does Python TDD include a structured self-audit before pull requests?

Yes, Python TDD includes a structured self-audit before pull requests. The workflow coordinates environment preparation, implementation, coverage verification, and a retrospective self-audit to satisfy PR requirements.