test-driven-development

Enforce test-first development with RED-GREEN-REFACTOR for existing test runners.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the critical issue of coding agents shipping unverified, incorrect code by enforcing a test-first workflow, eliminating the risk of "it looks right" bugs that pass manual review but fail in production.

Core Features & Use Cases

  • TDD Loop Guidance: Walks you through the RED (write failing test) → GREEN (write minimal passing code) → REFACTOR cycle for all feature, bugfix, and behavior changes in repos with existing test runners.
  • Bug Fix Regression Protection: Provides a dedicated workflow for reproducing bugs as failing tests first, creating permanent checks that prevent the bug from being reintroduced in future changes.
  • Use Case: When fixing an off-by-one error in a checkout total calculation, use this Skill to write a test asserting the correct total first, watch it fail, then implement the fix to pass the test, ensuring the error never returns.

Quick Start

Use the test-driven-development skill to write a failing test for the new user profile update feature before writing any of the feature's implementation code.

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 AI coding agents?

To enforce test-driven development, this Skill requires agents to write a failing test validating correct behavior before any production code is written, strictly following the RED-GREEN-REFACTOR loop to prevent shipping unverified changes.

What is the RED-GREEN-REFACTOR loop in test-first development?

The RED-GREEN-REFACTOR loop is a test-first workflow where you write a failing test (RED), write minimal passing code (GREEN), and then refactor, ensuring all feature and behavior changes are verified before shipping.

Does test-driven development work with pytest and vitest?

Yes, test-driven development applies to codebases with existing test runners including bun test, vitest, pytest, and cargo test, guiding the test-first workflow across these platforms.

How to use regression testing for bug fixes?

Regression testing for bug fixes involves reproducing the bug as a failing test first, then implementing the fix to pass the test, creating permanent checks that prevent the bug from being reintroduced in future changes.

When should I not use test-first development for refactoring?

Test-first development is required for all feature development, bug fixes, refactors, and behavior changes, but is limited to codebases with existing test runners, meaning it should not be used in projects lacking test infrastructure.