sp-test-driven-development

Enforce Red-Green-Refactor TDD by requiring tests before production code.

4|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/AlphaComposite/openclaw-superpowers-port --skill sp-test-driven-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sp-test-driven-development
Source: https://github.com/AlphaComposite/openclaw-superpowers-port/tree/main/skills/sp-test-driven-development
Command: npx skills add https://github.com/AlphaComposite/openclaw-superpowers-port --skill sp-test-driven-development

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enforces strict Red-Green-Refactor TDD discipline. Use when implementing any feature or bugfix, before writing implementation code.

Core Features & Use Cases

  • Red-Green-Refactor workflow: write a failing test, verify it fails, implement minimal production code, run tests, and refactor.
  • Guardrails for feature work: ensures production code is not added without corresponding tests, covering new features, bug fixes, and refactors.
  • Quality-focused practice: promotes meaningful tests, realistic scenarios, and maintainable design.

Quick Start

Write a failing test for the new feature, then implement the minimal production code to pass, and refactor while keeping tests green.

Frequently Asked Questions about sp-test-driven-development

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

FAQPage Schema
How do I enforce a test-driven development workflow for new features?

Test-driven development is enforced by requiring a failing test before any production code is written. This guardrail ensures strict adherence to the Red-Green-Refactor cycle across new features, bug fixes, and refactors.

What is the Red-Green-Refactor cycle in TDD?

The Red-Green-Refactor cycle in TDD involves writing a failing test, verifying it fails, implementing minimal production code to pass the test, and refactoring while keeping tests green. It ensures meaningful test coverage and disciplined maintenance.

How to apply test-first discipline to bug fixes and refactoring?

Test-first discipline for bug fixes and refactoring requires writing a failing test that captures the bug or desired behavior before implementation. This prevents production code changes without corresponding tests and maintains code quality.

Does this test-driven development approach work for existing code refactors?

Yes, this test-driven development approach works for existing code refactors by applying the Red-Green-Refactor workflow. It ensures that refactored production code is always backed by meaningful tests to prevent regressions.

Why should I require failing tests before writing production code?

Requiring failing tests before production code enforces strict TDD discipline and prevents untested code from entering your project. This practice promotes maintainable design, realistic test scenarios, and overall code quality.

What's the best way to maintain code quality during software development?

Maintaining code quality during software development is best achieved through a deterministic Red-Green-Refactor workflow. This test-driven practice ensures production code is always guided by meaningful tests and disciplined maintenance.