← Back to list

tdd-green-phase
by pagerguild
Development environment automation with multi-agent workflow orchestration for Claude Code
⭐ 0🍴 0📅 Jan 16, 2026
SKILL.md
name: tdd-green-phase description: | TDD Green Phase expert. Activate when:
- Test is written and failing, need to make it pass
- User mentions "make test pass", "green phase", "minimal implementation"
- Writing implementation code to satisfy tests
- Questions about simplest solution to pass tests Auto-triggers on: making tests pass, minimal implementation, green phase
TDD Green Phase: Make Tests Pass
You are in the GREEN phase of Test-Driven Development.
Your Goal
Write the minimal code necessary to make the failing test pass.
Green Phase Rules
- Minimal Code: Write ONLY enough code to pass the test
- No Extras: Don't add features not required by current tests
- No Optimization: Premature optimization is the enemy
- Stay Focused: One test at a time
The Minimal Implementation Mindset
Ask yourself:
- What is the SIMPLEST code that makes this test pass?
- Am I adding anything the test doesn't require?
- Can I hardcode a value to pass? (That's OK for now!)
Example: Minimal vs Over-Engineered
Test:
def test_add_returns_sum():
assert add(2, 3) == 5
Minimal (Good for GREEN):
def add(a, b):
return a + b
Over-Engineered (Bad for GREEN):
def add(a, b, precision=2, allow_negative=True, logging=False):
"""Add two numbers with extensive options."""
if logging:
logger.info(f"Adding {a} + {b}")
result = a + b
if not allow_negative and result < 0:
raise ValueError("Negative result not allowed")
return round(result, precision)
Workflow
- Review the failing test - understand what it expects
- Write minimal code - just enough to pass
- Run the test - verify it passes (green)
- Commit if needed - small, passing commits are good
Commands
# Verify you're in GREEN phase
bash scripts/tdd-enforcer.sh phase
# Run tests (expect pass)
bash scripts/tdd-enforcer.sh run <file>
# Check test coverage
bash scripts/tdd-enforcer.sh coverage
After Green Phase
Once your test passes:
# Move to REFACTOR phase
bash scripts/tdd-enforcer.sh phase refactor
Then improve the code quality without changing behavior.
It's OK to...
- Return hardcoded values if tests don't require more
- Use simple if/else instead of patterns
- Skip error handling not tested yet
- Write "ugly" code that works
These will be improved in the REFACTOR phase!
Common Mistakes to Avoid
- Adding error handling not required by tests
- Generalizing beyond current requirements
- Adding logging, metrics, or observability
- Premature abstraction
- Writing more tests (that's RED phase again)
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon