test-driven-development

Enforce test-first development using the red-green-refactor cycle.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enforces Test-Driven Development as the default workflow for features and bug fixes, ensuring tests fail first, then green, and finally refactor.

Core Features & Use Cases

  • Red-Green-Refactor workflow with clearly defined steps
  • Enforces running focused tests for the new behavior being added
  • Keeps tests minimal, descriptive, and well-named
  • Integrates with tooling to validate tests before production code

Quick Start

Write a failing test for the new feature, then implement the minimal code to pass it, and finally refactor for clarity.

Frequently Asked Questions about test-driven-development

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

FAQPage Schema
How do I write tests before implementing features?

Test-driven development starts by writing a failing unit test for the desired behavior first. Write a minimal test that describes what the feature should do, watch it fail (red phase), then implement only the code needed to pass it (green phase), and finally refactor for clarity while keeping tests passing.

What is the red-green-refactor workflow?

Red-green-refactor is a TDD cycle: write a failing test (red), implement minimal code to pass it (green), then improve the code without changing behavior (refactor). This ensures each piece of production code is validated by a focused test before it ships.

When should I use test-driven development for bug fixes?

Apply TDD to bug fixes by first writing a test that reproduces the bug and fails on current code, then fix the bug with minimal changes to make the test pass. This prevents regression and documents the expected behavior.

Can I use TDD with unit, integration, and end-to-end tests?

Yes. TDD applies across test levels—use unit tests for isolated components, integration tests for component interactions, and end-to-end tests for full workflows. Run only the relevant test subset for each change to keep feedback fast.

How do I keep tests minimal and well-named in TDD?

Write tests that focus on one behavior each with descriptive names that explain the scenario. Avoid testing implementation details; test observable outcomes. This keeps the test suite maintainable and clarifies intent for future developers.

What's the best way to integrate linting and type checks with TDD?

After passing tests (green phase), run lint and type checkers to catch code-quality issues before production. This ensures your implementation is not only functionally correct but also adheres to style and type safety standards.