Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
sickn33 avatar

Tdd Workflow

  • 979 installs
  • 44k repo stars
  • Updated July 27, 2026
  • sickn33/antigravity-awesome-skills

TDD Workflow is a community agent skill that enforces strict test-driven development using the RED-GREEN-REFACTOR cycle and the Three Laws of TDD so features are proven by tests before implementation.

About

TDD Workflow is a community skill from sickn33/antigravity-awesome-skills added 2026-02-27 that teaches agents test-driven development discipline. The skill documents the RED-GREEN-REFACTOR loop: write a failing test, write minimal code to pass, then refactor for quality before repeating. It encodes the Three Laws of TDD—write production code only to pass failing tests, write only enough test to demonstrate failure, and write only enough code to make the test pass. Developers reach for TDD Workflow when they want coding agents to follow behavior-driven test-first habits instead of generating implementation before assertions. The skill covers RED phase guidance on behavior-focused examples and applies across unit and integration test suites during feature development.

  • Enforces the classic RED → GREEN → REFACTOR cycle
  • Follows the Three Laws of TDD with strict guardrails
  • RED phase focuses on behavior, edge cases and error states
  • GREEN phase applies YAGNI and writes only the simplest code that passes
  • REFACTOR phase targets duplication, naming, structure and complexity

Tdd Workflow by the numbers

  • 979 all-time installs (skills.sh)
  • +25 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #531 of 2,184 Testing & QA skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill tdd-workflow

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs979
repo stars44k
Security audit3 / 3 scanners passed
Last updatedJuly 27, 2026
Repositorysickn33/antigravity-awesome-skills

How do you enforce RED-GREEN-REFACTOR with coding agents?

Follow the strict RED-GREEN-REFACTOR cycle so every feature is proven by tests before implementation.

Who is it for?

Developers who want coding agents to practice strict test-first discipline with RED-GREEN-REFACTOR on every new behavior.

Skip if: Spike prototypes or throwaway scripts where skipping tests upfront is an explicit team decision.

When should I use this skill?

The user requests test-driven development, RED-GREEN-REFACTOR cycles, or asks the agent to write tests before implementation.

What you get

Failing tests written first, minimal passing implementation, refactored production code, and repeatable TDD cycle artifacts per feature.

  • Failing test suite
  • Minimal passing implementation
  • Refactored production code

By the numbers

  • Documents 3 Laws of TDD in SKILL.md
  • Community skill date_added 2026-02-27 in frontmatter

Files

SKILL.mdMarkdownGitHub ↗

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

AreaAction
DuplicationExtract common code
NamingMake intent clear
StructureImprove organization
ComplexitySimplify logic

REFACTOR Rules

  • All tests must stay green
  • Small incremental changes
  • Commit after each refactor

---

6. AAA Pattern

Every test follows:

StepPurpose
ArrangeSet up test data
ActExecute code under test
AssertVerify expected outcome

---

7. When to Use TDD

ScenarioTDD Value
New featureHigh
Bug fixHigh (write test first)
Complex logicHigh
ExploratoryLow (spike, then TDD)
UI layoutLow

---

8. Test Prioritization

PriorityTest Type
1Happy path
2Error cases
3Edge cases
4Performance

---

9. Anti-Patterns

❌ Don't✅ Do
Skip the RED phaseWatch test fail first
Write tests afterWrite tests before
Over-engineer initialKeep it simple
Multiple assertsOne behavior per test
Test implementationTest behavior

---

10. AI-Augmented TDD

Multi-Agent Pattern

AgentRole
Agent AWrite failing tests (RED)
Agent BImplement to pass (GREEN)
Agent COptimize (REFACTOR)

---

Remember: The test is the specification. If you can't write a test, you don't understand the requirement.

When to Use

This skill is applicable to execute the workflow or actions described in the overview.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.

Related skills

How it compares

Use TDD Workflow for agent test-first discipline; pair with framework-specific test generator skills when boilerplate test code is the bottleneck.

FAQ

What cycle does TDD Workflow enforce?

TDD Workflow enforces RED-GREEN-REFACTOR: write a failing test, write minimal code to pass, then refactor. The skill repeats this loop for each new behavior instead of generating production code before tests exist.

What are the Three Laws of TDD in this skill?

TDD Workflow lists three laws: write production code only to make a failing test pass, write only enough test to demonstrate failure, and write only enough code to pass the current test. Agents follow these laws during test-first development.

Is Tdd Workflow safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Testing & QAtestingintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.