This is a structured reference for Claude to follow test-driven development's RED-GREEN-REFACTOR cycle. It walks through the three phases with concrete rules: write a failing test, implement just enough code to pass it, then refactor while keeping tests green. The AAA pattern (Arrange-Act-Assert) and three laws of TDD are laid out clearly, which is helpful if you want Claude to write tests before code or help enforce discipline around minimal implementations. The anti-patterns section is a nice touch. It's basically a cheat sheet to keep TDD workflows consistent, though you'll still need to guide Claude on what specific behavior to test first.

skills.sh installs
913
GitHub stars
43.1K
last updated
Jul 14, 2026

Install

$ npx -y skills add sickn33/antigravity-awesome-skills --skill tdd-workflow --agent claude-code

Installs into .claude/skills of the current project.

Files

TDD Workflow

Write tests first, code second.


1. The TDD Cycle

πŸ”΄ RED β†’ Write failing test
    ↓
🟒 GREEN β†’ Write minimal code to pass
    ↓
πŸ”΅ REFACTOR β†’ Improve code quality
    ↓
   Repeat...

2. The Three Laws of TDD

  1. Write production code only to make a failing test pass
  2. Write only enough test to demonstrate failure
  3. Write only enough code to make the test pass

3. RED Phase Principles

What to Write

FocusExample
Behavior"should add two numbers"
Edge cases"should handle empty input"
Error states"should throw for invalid data"

RED Phase Rules

  • Test must fail first
  • Test name describes expected behavior
  • One assertion per test (ideally)

4. GREEN Phase Principles

Minimum Code

PrincipleMeaning
YAGNIYou Aren't Gonna Need It
Simplest thingWrite the minimum to pass
No optimizationJust make it work

GREEN Phase Rules

  • Don't write unneeded code
  • Don't optimize yet
  • Pass the test, nothing more

5. REFACTOR Phase Principles

What to Improve

Sponsors

Details

Repository
github.com/sickn33/antigravity-awesome-skills
Categories
Testing & QA, Automation & Workflows
First seen
May 16, 2026

More from sickn33/antigravity-awesome-skills

All 708
1affaan-m avatarreact-testingaffaan-m/everything-claude-codereact testing910skills.sh installs
2sickn33 avatartesting-patternssickn33/antigravity-awesome-skillstesting patterns908skills.sh installs
3new-silvermoon avatarandroid-testingnew-silvermoon/awesome-android-agent-skillsComprehensive testing strategy involving Unit, Integration, Hilt, and Screenshot tests.869skills.sh installs
4ruvnet avatarbrowser-testruvnet/rufloUI test recipe -- composes browser-record (capture) + browser-replay (verify) so every test produces a replayable RVF artifact, not an ephemeral run756skills.sh installs
5charon-fan avatartest-automatorcharon-fan/agent-playbooktest automator736skills.sh installs
6aj-geddes avatarvisual-regression-testingaj-geddes/useful-ai-promptsDetect unintended visual changes in UI by comparing screenshots across versions. Use for visual regression, screenshot diff, Percy, Chromatic, UI testing, and v731skills.sh installs