tdd-workflow

Implements test-driven development using the RED/GREEN/REFACTOR cycle with evidence capture and mutation testing.

1|Updated Aug 17, 2026
One-click install
npx skills add https://github.com/NalinDalal/skillset --skill tdd-workflow-nalindalal
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/NalinDalal/skillset/tree/main/skills/engineering/tdd-workflow
Command: npx skills add https://github.com/NalinDalal/skillset --skill tdd-workflow-nalindalal

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing tests after implementation often produces tests that merely confirm existing behavior rather than verify desired behavior, leaving gaps that let real bugs slip through. This Skill enforces a disciplined test-first workflow so every feature and bug fix is backed by a failing test before any code is written. ## Core Features & Use Cases - RED/GREEN/REFACTOR Cycle: Structured phases with concrete rules for writing failing tests, minimal implementations, and safe refactoring, each cycle lasting 5-15 minutes. - Evidence Capture & Git Checkpoints: Templates for documenting each phase and commit conventions (test/feat/refactor) at every transition so you can revert to known-good states. - Mutation Testing: Integrates Stryker to verify tests actually catch bugs, targeting a mutation score above 80% to expose test gaps. - Use Case: When fixing a bug in a pricing module, write a regression test that reproduces the failure first, watch it fail, implement the minimal fix, then refactor while keeping all tests green. ## Quick Start Use the tdd-workflow skill to implement a calculateDiscount function test-first with the RED/GREEN/REFACTOR cycle.

Frequently Asked Questions about tdd-workflow

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

FAQPage Schema
How do I practice test-driven development with the RED GREEN REFACTOR cycle?▼

Write a failing test that defines the desired behavior (RED), confirm it fails for the right reason, then write the minimal code to make it pass (GREEN), and finally clean up the code while keeping tests green (REFACTOR). Each cycle should take 5-15 minutes, with a git commit at each phase transition.

What is mutation testing and how do I run it with Stryker?▼

Mutation testing introduces small changes to your code and reruns your tests; surviving mutants reveal test gaps. Install @stryker-mutator/core with the vitest runner, run npx stryker run, and aim for a mutation score above 80%.

Should I write tests before or after implementation code?▼

Write tests first. Tests written after code tend to confirm existing behavior rather than verify desired behavior, and skipping the RED phase means you never confirm the test actually fails for the right reason.

What should I do when a test is too complex to implement in one step?▼

Skip the complex test temporarily with it.skip or xit, write a simpler test first, and return to the complex one after the simpler tests pass. This keeps the GREEN phase incremental and avoids large implementation leaps.

What are common TDD anti-patterns to avoid?▼

Common anti-patterns include testing implementation details instead of behavior, writing giant test functions with multiple concepts, skipping the RED phase, and not committing between phases. Test behavior with one assertion per concept and commit at each phase transition.