tdd

Enforce Red-Green-Refactor discipline with failing tests before production code.

4|2|Updated Dec 1, 2025
One-click install
npx skills add https://github.com/javatarz/credit-card-lending --skill tdd-javatarz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/javatarz/credit-card-lending/tree/main/.claude/skills/tdd
Command: npx skills add https://github.com/javatarz/credit-card-lending --skill tdd-javatarz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensures the Red-Green-Refactor discipline for all code changes, preventing untested behavior and accelerating growth with reliable tests.

Core Features & Use Cases

  • Red-Green-Refactor: Write a failing test, implement just enough code, and pass tests.
  • Mode Variants: Interactive, batch-ac, and autonomous modes adapt to your workflow.
  • TDD Integration: Works with the main development cycle and the /start-dev workflow.

Quick Start

Begin by writing a failing test for the next feature, run the test suite to see it fail, implement the minimal code to pass, and commit using the Claude-generated message.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I implement test-driven development for Java projects with Gradle?

Test-driven development writes failing tests first, then implements minimal code to pass them. With Gradle, use ./gradlew test to run your test suite, following the Red-Green-Refactor cycle: write a failing test (Red), implement just enough production code to pass (Green), then improve code quality without changing behavior (Refactor).

What is the Red-Green-Refactor cycle and why does it matter?

Red-Green-Refactor is a TDD discipline where you write a failing automated test, implement minimal code to make it pass, then refactor for clarity. This ensures every behavior has test coverage before production code exists, preventing untested changes and building reliable test suites alongside features.

Can I use TDD with my existing Java and Gradle workflow?

Yes. TDD integrates with your main development cycle and the /start-dev workflow. It enforces Red-Green-Refactor discipline during feature implementation and bug fixes, running tests via ./gradlew test and supporting interactive, batch, and autonomous review modes to fit your development pace.

How do I enforce testing discipline across code changes?

Automate Red-Green-Refactor enforcement by requiring failing tests before production code on every change. This prevents untested behavior and accelerates reliable development by catching issues early and maintaining consistent test coverage across features, bug fixes, and refactoring.

What testing modes does TDD support for different workflows?

TDD offers interactive, batch, and autonomous modes. Interactive mode guides you through each Red-Green-Refactor step manually; batch mode processes multiple changes; autonomous mode runs the full cycle without interruption, adapting to your preferred workflow and development pace.