From programmer
Guide the TDD RED-GREEN-REFACTOR cycle for Python development. Use when starting new features with TDD, when user says "TDD", "test first", "write tests first", "RED phase", "GREEN phase", or "REFACTOR phase". This skill orchestrates the full TDD workflow.
npx claudepluginhub nicolaei/claude-plugins --plugin programmerThis skill uses the workspace's default tool permissions.
```
Mandates invoking relevant skills via tools before any response in coding sessions. Covers access, priorities, and adaptations for Claude Code, Copilot CLI, Gemini CLI.
Share bugs, ideas, or general feedback.
RED → GREEN → REFACTOR → RED → ...
Always state the current phase before working:
"We're in the RED phase. I'll write a failing test for [feature]."
Ask before transitioning:
"Tests are passing. Ready to move to REFACTOR, or should we add more tests?"
def test_user_can_rsvp_to_event():
"""Acceptance test - defines expected behavior."""
app = create_test_app()
organizer = TestOrganizer(app)
attendee = TestAttendee(app)
event = organizer.create_event("Team Meeting")
attendee.rsvp(event, "yes")
assert event.attendee_count == 1
Run tests to confirm they fail:
pytest -x # Stop at first failure
pytest -x # Run until first failure
pytest # All tests pass = ready for REFACTOR
code-reviewer agent to check architecture complianceMake small change → Run tests → Green? → Next change
→ Red? → Undo and try again
When refactoring is complete, spawn the code-reviewer agent to verify the code follows architecture patterns.
When building a new feature:
Check current state:
pytest -v # Verbose output
pytest --tb=short # Short tracebacks
pytest -x # Stop at first failure
Run specific test:
pytest tests/test_events.py::test_user_can_rsvp
Starting RED:
"Let's write a failing test for [feature]. What behavior should we test first?"
Moving to GREEN:
"Test is failing as expected. Now I'll write minimal code to make it pass."
Moving to REFACTOR:
"All tests passing. Let's clean up the code. I see we could [improvement]."
Back to RED:
"Refactoring complete. What's the next behavior we should test?"