
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-workflowAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 979 |
|---|---|
| repo stars | ★ 44k |
| Security audit | 3 / 3 scanners passed |
| Last updated | July 27, 2026 |
| Repository | sickn33/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
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
| Focus | Example |
|---|---|
| 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
| Principle | Meaning |
|---|---|
| YAGNI | You Aren't Gonna Need It |
| Simplest thing | Write the minimum to pass |
| No optimization | Just 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
| Area | Action |
|---|---|
| Duplication | Extract common code |
| Naming | Make intent clear |
| Structure | Improve organization |
| Complexity | Simplify logic |
REFACTOR Rules
- All tests must stay green
- Small incremental changes
- Commit after each refactor
---
6. AAA Pattern
Every test follows:
| Step | Purpose |
|---|---|
| Arrange | Set up test data |
| Act | Execute code under test |
| Assert | Verify expected outcome |
---
7. When to Use TDD
| Scenario | TDD Value |
|---|---|
| New feature | High |
| Bug fix | High (write test first) |
| Complex logic | High |
| Exploratory | Low (spike, then TDD) |
| UI layout | Low |
---
8. Test Prioritization
| Priority | Test Type |
|---|---|
| 1 | Happy path |
| 2 | Error cases |
| 3 | Edge cases |
| 4 | Performance |
---
9. Anti-Patterns
| ❌ Don't | ✅ Do |
|---|---|
| Skip the RED phase | Watch test fail first |
| Write tests after | Write tests before |
| Over-engineer initial | Keep it simple |
| Multiple asserts | One behavior per test |
| Test implementation | Test behavior |
---
10. AI-Augmented TDD
Multi-Agent Pattern
| Agent | Role |
|---|---|
| Agent A | Write failing tests (RED) |
| Agent B | Implement to pass (GREEN) |
| Agent C | Optimize (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.