test-driven-development

Enforces Red-Green-Refactor cycles for features and bug fixes using Jest or Vitest harnesses.

1|1|Updated Jun 11, 2026
One-click install
npx skills add https://github.com/valtterimelkko/agent-workflow-skills --skill test-driven-development-valtterimelkko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/valtterimelkko/agent-workflow-skills/tree/main/skills/test-driven-development
Command: npx skills add https://github.com/valtterimelkko/agent-workflow-skills --skill test-driven-development-valtterimelkko

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill solves the problem of unreliable, untested, or over-engineered code by enforcing a strict Red-Green-Refactor cycle that ensures every feature is verified by a failing test before implementation.

Core Features & Use Cases

  • Red-Green-Refactor Cycle: Provides a structured workflow to ensure tests are written before production code, preventing bias and ensuring comprehensive coverage.
  • Anti-Pattern Prevention: Includes a comprehensive guide to avoid common testing pitfalls like mocking real behavior or polluting production code with test-only methods.
  • Use Case: Use this skill when starting a new feature or fixing a bug to ensure the solution is minimal, verified, and regression-proof.

Quick Start

Apply the test-driven development workflow to implement the new user authentication feature by writing the failing test first.

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 for new feature implementation?

To enforce test-driven development, apply a strict Red-Green-Refactor cycle that requires writing a failing test before any production code. This workflow ensures every feature is verified, preventing bias and guaranteeing regression-proof implementation.

What's the best way to prevent testing anti-patterns when fixing bugs?

The best way to prevent testing anti-patterns when fixing bugs is to follow a comprehensive guide that avoids mocking real behavior and polluting production code with test-only methods. This ensures reliable regression prevention and high code quality.

Do I need a specific testing harness to execute the Red-Green-Refactor cycle?

Yes, you need a standard testing harness like Jest or Vitest to execute the Red-Green-Refactor cycle. These frameworks provide the necessary environment to run failing tests first and verify the minimal production code that follows.

Why does test-first discipline prevent over-engineered code?

Test-first discipline prevents over-engineered code by enforcing a rigorous Red-Green-Refactor cycle that ensures every feature is verified by a failing test. This structured workflow guarantees the final solution is minimal and strictly addresses the requirement.