test-driven-development

Enforce test-first development through red-green-refactor cycles in TypeScript projects.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/namhoangg/agent-starter-kit --skill test-driven-development-namhoangg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/namhoangg/agent-starter-kit/tree/main/cursor/skills/test-driven-development
Command: npx skills add https://github.com/namhoangg/agent-starter-kit --skill test-driven-development-namhoangg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enforces test-first development to prevent defects and improve maintainability in feature work.

Core Features & Use Cases

  • Red-Green-Refactor cycle: write a failing test, implement minimal code to pass, then refactor for clarity.
  • Mandatory test verification: ensure all tests pass before shipping or introducing further changes.
  • Applicability: suitable for new features, bug fixes, and refactors across modern JavaScript/TypeScript projects.
  • Team discipline: fosters a shared protocol for design and verification across teams.

Quick Start

Write a failing test for a feature, implement the minimal code to pass, and refactor for readability.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
What is test-driven development and how does the red-green-refactor cycle work?

Test-driven development is a discipline where you write a failing test, implement minimal code to pass it, then refactor for clarity. This red-green-refactor cycle prevents defects and improves maintainability across modern JavaScript and TypeScript projects.

How do I start writing tests first for a new TypeScript feature?

Start test-driven development by writing a failing test that defines the feature's expected behavior, implement the minimal code required to make it pass, and then refactor the implementation for readability before moving forward.

Can I use test-driven development for bug fixes and refactoring existing code?

Yes, test-driven development is suitable for new features, bug fixes, and refactors across JavaScript and TypeScript projects. You write a failing test reproducing the bug or targeting the refactor area, then implement and verify.

Does test-driven development work for team environments sharing a JavaScript codebase?

Test-driven development fosters team discipline by establishing a shared protocol for design and verification. Teams follow mandatory test verification steps to ensure all tests pass before shipping, preventing regressions across the codebase.

What are the limitations of enforcing test-first development before shipping?

The primary constraint of test-first development is the strict requirement to write a failing test before any implementation. This mandatory verification prevents shipping regressions but requires strict adherence to the red-green-refactor cycle.