test-driven-development

Enforce RED-GREEN-REFACTOR cycles by writing failing tests before production code.

2.8k|332|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/moltis-org/moltis --skill test-driven-development-moltis-org
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/moltis-org/moltis/tree/main/crates/skills/src/assets/software-development/test-driven-development
Command: npx skills add https://github.com/moltis-org/moltis --skill test-driven-development-moltis-org

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams implement a strict test-first workflow, ensuring that production code is only written after a failing test is identified and repeated until green.

Core Features & Use Cases

  • Enforce RED-GREEN-REFACTOR cycles for feature development, bug fixes, and refactors.
  • Provide a clear, repeatable process that improves code quality, reliability, and maintainability.
  • Works with common test frameworks (e.g., pytest) and is language-agnostic when integrated with a test-driven workflow.

Quick Start

Write a failing test first, observe it fail, then implement the minimal code to pass.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I enforce test-driven development workflow across my codebase?▼

You enforce test-driven development by following a strict RED-GREEN-REFACTOR cycle, writing a failing test first and then implementing minimal production code to pass it. This ensures code is only written after a failing test is identified.

What is the RED-GREEN-REFACTOR cycle and how does it apply to bug fixes?▼

The RED-GREEN-REFACTOR cycle requires writing a failing test, implementing minimal code to pass it, then refactoring. For bug fixes, you first write a test that reproduces the bug, confirming it fails before applying the fix to reach green.

Does this test-driven development approach work with pytest workflows?▼

Yes, this approach explicitly supports pytest workflows and integrates with common automated testing frameworks. It is language-agnostic when applied within a test-driven workflow across different repositories.

What do I need to start writing tests before production code?▼

You need a test framework and code under test to start writing tests before production code. The workflow requires an automated testing setup to observe failing tests and validate minimal code implementations.

Can I use this RED-GREEN-REFACTOR process for refactoring existing code?▼

Yes, you can apply the RED-GREEN-REFACTOR process to refactoring existing code. It guides teams through ensuring tests remain green while improving code quality, reliability, and maintainability during refactors.

What's the best way to maintain TDD discipline during feature development?▼

The best way to maintain TDD discipline is to follow a repeatable RED-GREEN-REFACTOR process for feature development. Write a failing test first, observe it fail, then implement the minimal code to pass before refactoring.