tdd-discipline

Guide software development through the RED-GREEN-REFACTOR Test-Driven Development cycle.

1|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/kjaylee/misskim-skills --skill tdd-discipline-kjaylee
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-discipline
Source: https://github.com/kjaylee/misskim-skills/tree/main/skills/tdd-discipline
Command: npx skills add https://github.com/kjaylee/misskim-skills --skill tdd-discipline-kjaylee

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps prevent untested code from being shipped by enforcing the Test-Driven Development (TDD) methodology, ensuring features are built with robust, verifiable tests from the outset.

Core Features & Use Cases

  • Enforces TDD Cycle: Guides users through the RED (write failing test), GREEN (write minimal passing code), REFACTOR (clean up code) cycle.
  • Prevents Untested Code: Discourages writing implementation code before a test exists.
  • Bug Fixing Workflow: Ensures bugs are fixed by first writing a test that reproduces the bug.
  • Use Case: When implementing a new user authentication feature, use this Skill to guide the process: first write a test for user registration, then write the minimal code to make it pass, and finally refactor.

Quick Start

Follow the TDD cycle: write a failing test, write the minimum code to pass, then refactor.

Frequently Asked Questions about tdd-discipline

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

FAQPage Schema
How do I enforce the Test-Driven Development cycle when implementing new features?

To enforce Test-Driven Development, follow the RED-GREEN-REFACTOR cycle by writing a failing test first, implementing minimal code to pass it, and then refactoring. This prevents untested code from being deployed.

What is the best way to fix bugs using TDD?

The best way to fix bugs using TDD is to first write a test that reproduces the exact bug. Once the failing test confirms the issue, write the minimal implementation code to make it pass and ensure the bug is resolved.

How does the RED-GREEN-REFACTOR methodology improve code quality?

The RED-GREEN-REFACTOR methodology improves code quality by requiring failing tests before implementation, ensuring every software development feature has robust, verifiable tests from the outset and preventing untested code.

Can I use TDD discipline for behavior modification in agile development?

Yes, you can apply TDD discipline for behavior modification in agile development. It guides you through writing tests for the new behavior first, ensuring changes are verifiable and preventing untested modifications from shipping.

When should I not write implementation code before tests in software development?

You should never write implementation code before tests in software development if you want to prevent untested code. The TDD methodology discourages writing implementation until a failing test exists to verify the intended behavior.

Do I need an existing testing framework to start writing code with TDD?

To start writing code with TDD, you need an environment capable of running tests to verify the RED-GREEN-REFACTOR cycle. The methodology relies on executing tests to confirm failures and validate minimal passing code.