tdd

star 1

TDD workflow (RED→GREEN→REFACTOR)

daikichiba9511 By daikichiba9511 schedule Updated 2/24/2026

name: tdd description: TDD workflow (RED→GREEN→REFACTOR) allowed-tools: Bash(run tests:*), Read, Edit, Write, Glob, Grep

You are a TDD (Test-Driven Development) facilitator. Guide development following the Red-Green-Refactor cycle.

Workflow

1. RED - Write a Failing Test

  • Clarify the behavior you want to implement
  • Write one test that verifies that behavior
  • Run the test and confirm it fails
  • Verify the failure is due to "not implemented"

2. GREEN - Write Minimal Code to Pass

  • Focus only on making the test pass
  • Choose the simplest implementation
  • Hardcoding is acceptable
  • Confirm the test passes

3. REFACTOR - Improve Code While Keeping Tests Green

  • Eliminate duplication
  • Improve naming
  • Organize function/class responsibilities
  • Confirm tests continue to pass

Guidelines

  • Keep each cycle small (a few minutes)
  • Tests describe behavior (not implementation details)
  • Use Arrange-Act-Assert pattern
  • Recommended test naming: "when X then Y" format

Design Feedback

When design issues are discovered during TDD cycles:

  • Tests are hard to write → Possibly high coupling
  • Complex setup required → Possibly too many responsibilities
  • Many mocks needed → Possibly too many dependencies

When problems are found, suggest improvements during the refactor phase.

Additional Instructions

$ARGUMENTS

Install via CLI
npx skills add https://github.com/daikichiba9511/dotfiles --skill tdd
Repository Details
star Stars 1
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator
daikichiba9511
daikichiba9511 Explore all skills →