tdd

Guide users through the RED-GREEN-REFACTOR TDD cycle with pytest coverage checks.

Updated Jan 6, 2026
One-click install
npx skills add https://github.com/mikanfactory/dotfiles --skill tdd-mikanfactory
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/mikanfactory/dotfiles/tree/main/home/dot_claude/skills/tdd
Command: npx skills add https://github.com/mikanfactory/dotfiles --skill tdd-mikanfactory

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers adopt and maintain a Test-Driven Development (TDD) workflow, ensuring code quality and robustness from the start.

Core Features & Use Cases

  • Enforces TDD Cycle: Guides users through the RED-GREEN-REFACTOR loop.
  • Contextual Information: Provides current git status and identifies test files.
  • Coverage Check: Ensures a minimum of 80% test coverage.
  • Use Case: When starting a new feature, use this Skill to write failing tests first, then write the minimal code to pass them, and finally refactor, ensuring a solid foundation.

Quick Start

Follow the TDD workflow to implement your code, starting with writing a failing test.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I start writing code using TDD with pytest?

TDD with pytest begins by writing a failing test, then implementing minimal code to pass it, and finally refactoring. This Skill enforces the RED-GREEN-REFACTOR methodology to guide you through each cycle.

What is the RED-GREEN-REFACTOR cycle in test-driven development?

The RED-GREEN-REFACTOR cycle is a TDD methodology where you write a failing test, implement minimal code to pass it, and then refactor. This Skill guides you through each step to ensure code quality.

How do I ensure my test coverage meets a specific threshold during development?

To ensure test coverage meets or exceeds 80%, this Skill checks your pytest coverage during the development cycle. It enforces this threshold to maintain robustness as you implement new features.

Can I use this TDD workflow for refactoring existing code?

Yes, you can use this TDD workflow for refactoring. The Skill guides you through the RED-GREEN-REFACTOR loop, ensuring you have passing tests before you safely improve and clean up your existing code.

What context does this Skill check before I start writing tests?

Before writing tests, the Skill provides contextual information including your current git status and identifies existing test files. This helps you understand the current state of your project.

When should I use test-driven development for a new feature?

You should use test-driven development when starting a new feature to ensure code quality from the start. This Skill helps you write a failing test first, creating a solid foundation before implementation.