Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
bbeierle12 avatar

Test Driven Development

  • 55 installs
  • 8 repo stars
  • Updated August 4, 2026
  • bbeierle12/skill-mcp-claude

test-driven-development is a Claude skill that enforces the RED-GREEN-REFACTOR cycle, requiring a failing test before implementation code.

About

This skill enforces test-driven development through the RED-GREEN-REFACTOR cycle, requiring a failing test before implementation code. A developer uses it when starting a feature or fixing a bug, and it defines good-test qualities (fast, isolated, repeatable, self-validating, timely) plus a commit-after-each-phase strategy.

  • Enforces the RED-GREEN-REFACTOR cycle with strict discipline
  • Requires a failing test before any implementation code
  • Lists forbidden rationalizations that skip tests

Test Driven Development by the numbers

  • 55 all-time installs (skills.sh)
  • Ranked #1,195 of 2,153 Testing & QA skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

test-driven-development capabilities & compatibility

Capabilities
systematic debugging · writing plans
Use cases
testing · debugging
Pricing
Free
From the docs

What test-driven-development says it does

Enforces RED-GREEN-REFACTOR cycle with strict discipline against rationalization.
SKILL.md
Write code before test? Delete it. Start over.
SKILL.md
RED - Write a Failing Test First
SKILL.md
npx skills add https://github.com/bbeierle12/skill-mcp-claude --skill test-driven-development

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs55
repo stars8
Last updatedAugust 4, 2026
Repositorybbeierle12/skill-mcp-claude

What it does

Enforce a test-first RED-GREEN-REFACTOR cycle when implementing any feature or bugfix.

Who is it for?

Writing a failing test first, then minimal code, then refactoring, for any feature or bugfix.

Skip if: Throwaway exploration where no tests will be kept.

When should I use this skill?

Implementing any feature or bugfix, before writing implementation code.

What you get

Each change is driven by a failing test that then passes, with small frequent commits.

  • failing test
  • minimal passing implementation
  • refactored code

By the numbers

  • 3-step RED-GREEN-REFACTOR cycle
  • 7 forbidden rationalizations listed

Files

SKILL.mdMarkdownGitHub ↗

Test-Driven Development

The Iron Law of TDD

Write code before test? Delete it. Start over.

This is not negotiable. This is not optional. You cannot rationalize your way out of this.

The RED-GREEN-REFACTOR Cycle

1. RED - Write a Failing Test First

  • Write the smallest test that fails for the right reason
  • The test should fail because the feature doesn't exist yet
  • Run the test and verify it fails

2. GREEN - Make It Pass (Minimum Code)

  • Write the minimum code to make the test pass
  • Don't write more than necessary
  • Don't optimize yet
  • Don't refactor yet

3. REFACTOR - Improve the Code

  • Now you can clean up
  • Remove duplication
  • Improve naming
  • Extract methods/functions
  • All tests must still pass after refactoring

Forbidden Rationalizations

If you catch yourself thinking ANY of these, STOP:

  • "This is just a simple function" → WRONG. Simple functions need tests.
  • "I'll write tests after" → WRONG. That's not TDD.
  • "Let me just get it working first" → WRONG. Tests first.
  • "This doesn't need a test" → WRONG. Everything needs tests.
  • "I'll test it manually" → WRONG. Write automated tests.
  • "The test is obvious" → WRONG. Write it anyway.
  • "I'm just exploring" → WRONG. Explore with tests.

Test Quality Guidelines

Good Tests Are:

  • Fast - Tests should run in milliseconds
  • Isolated - No dependencies between tests
  • Repeatable - Same result every time
  • Self-validating - Pass or fail, no interpretation
  • Timely - Written before the code

Test Structure (Arrange-Act-Assert):

// Arrange - Set up the test conditions
const input = createTestInput();

// Act - Execute the code under test
const result = functionUnderTest(input);

// Assert - Verify the expected outcome
expect(result).toBe(expectedValue);

When to Use This Skill

  • Starting any new feature
  • Fixing any bug (write a test that reproduces the bug first)
  • Refactoring existing code (ensure tests exist first)
  • Any code change that could break existing functionality

YAGNI (You Aren't Gonna Need It)

Don't write code you don't need yet:

  • No speculative features
  • No "just in case" abstractions
  • No premature optimization
  • Build what's needed now, nothing more

DRY (Don't Repeat Yourself)

But only during REFACTOR phase:

  • First make it work (GREEN)
  • Then make it right (REFACTOR)
  • Duplication is okay temporarily
  • Remove it during refactor

Commit Strategy

  • Commit after each GREEN
  • Commit after each REFACTOR
  • Small, frequent commits
  • Each commit should pass all tests

Related skills

FAQ

What is the Iron Law of TDD?

Write code before test? Delete it. Start over.

What are good tests?

Fast, isolated, repeatable, self-validating, and timely.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.