Test-Driven-Development

Guide the red-green-refactor cycle for test-first code development.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/slapglif/swe-agent --skill test-driven-development-slapglif
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Test-Driven-Development
Source: https://github.com/slapglif/swe-agent/tree/main/.swe/skills/test-driven-development
Command: npx skills add https://github.com/slapglif/swe-agent --skill test-driven-development-slapglif

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill ensures that your code is robust and correctly verifies behavior by mandating a "test-first" approach. It prevents bugs, reduces debugging time, and builds confidence in your codebase by proving tests actually catch issues.

Core Features & Use Cases

  • Red-Green-Refactor Cycle: Guides you through writing a failing test, then minimal code to pass it, and finally refactoring for cleanliness.
  • Behavior Verification: Forces you to see tests fail, proving they accurately test the intended behavior, not just existing code.
  • Anti-Rationalization: Explicitly counters common excuses for skipping TDD, ensuring disciplined practice.
  • Use Case: When implementing a new user authentication flow, start by writing a test that expects an empty email to be rejected. Watch it fail, then write the minimal code to make that test pass.

Quick Start

I'm using the Test-Driven-Development skill to implement the new user profile update feature.