test-driven-development
Red-green-refactor TDD implementation cycle
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Menu
Red-green-refactor TDD implementation cycle
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Basé sur la classification professionnelle SOC
Structured code review
Find and load available skills
PR description generation
Spec-faithful implementation for spec-driven development
Architecture and interface design for spec-driven development
Codebase analysis and context gathering for spec-driven development
| name | test-driven-development |
| description | Red-green-refactor TDD implementation cycle |
| methodology | tdd |
Implement code using the red-green-refactor cycle. This skill is used by the Implementer to write code driven by failing tests.
Write the MINIMUM code to make a failing test pass. No more. Then refactor to improve quality without changing behavior.
Follow table-driven tests for multiple scenarios:
func TestFunctionName(t *testing.T) {
tests := []struct {
name string
input InputType
want OutputType
wantErr bool
}{
{name: "happy path", input: ..., want: ..., wantErr: false},
{name: "empty input", input: ..., want: ..., wantErr: true},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := FunctionName(tt.input)
if (err != nil) != tt.wantErr {
t.Errorf("unexpected error: %v", err)
}
if got != tt.want {
t.Errorf("got %v, want %v", got, tt.want)
}
})
}
}
For each RED-GREEN-REFACTOR cycle, produce: