tdd

Guide users through the Red-Green-Refactor cycle for Test-Driven Development.

34|7|Updated Nov 29, 2025
One-click install
npx skills add https://github.com/jkitchin/skillz --skill tdd-jkitchin
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/jkitchin/skillz/tree/main/skills/development/tdd
Command: npx skills add https://github.com/jkitchin/skillz --skill tdd-jkitchin

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill guides you through disciplined Test-Driven Development, ensuring you write tests first, implement minimal code to pass, and refactor safely.

Core Features & Use Cases

  • Red-Green-Refactor cycle: structured, repeatable TDD iterations
  • Language-agnostic guidance: Python (pytest/unittest) and Emacs Lisp (ERT)
  • Test design patterns: AAA, Given-When-Then, boundary and edge-case coverage
  • Integration with CI: build, test, and refactor workflow in one framework

Quick Start

Try a simple Python TDD cycle: write a failing test, implement a minimal function, then refactor with tests green.

Frequently Asked Questions about tdd

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

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

Test-driven development follows a structured red-green-refactor cycle: write a failing test first, implement minimal code to pass it, then refactor with confidence. This Skill guides you through each phase with language-agnostic patterns for Python (pytest/unittest) and Emacs Lisp (ERT), ensuring disciplined iteration and safe code changes.

Can I use TDD across different programming languages?▼

Yes. This Skill provides language-agnostic TDD guidance covering Python and Emacs Lisp, with test design patterns like AAA and Given-When-Then that apply broadly. You adapt the red-green-refactor cycle to your language's testing framework while maintaining the same disciplined workflow.

What test design patterns does TDD use for edge cases?▼

TDD employs structured test design patterns including AAA (Arrange-Act-Assert), Given-When-Then, and boundary and edge-case coverage strategies. These patterns ensure comprehensive test suites that catch corner cases early and guide minimal implementation that satisfies all test conditions.

How do I integrate TDD into my build and CI workflow?▼

This Skill integrates the red-green-refactor cycle into CI pipelines by structuring build, test, and refactor actions as one framework. You write failing tests, implement code, refactor safely, and maintain a passing test suite within your continuous integration environment.

Why should I write tests before implementing code?▼

Writing tests first clarifies requirements, prevents over-engineering, and provides immediate feedback on your design. The red-green-refactor cycle ensures you implement only what's needed to pass tests, then refactor with a safety net, reducing bugs and improving code quality.