원클릭으로
test-driven-development
TDD workflow — write failing tests first, then implement, then refactor
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
TDD workflow — write failing tests first, then implement, then refactor
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Structured brainstorming for exploring new features or solving complex problems
Scope, architect, and plan new tasks
Multi-angle code review before merging
Summarize the day's work and put it in context
Wrap up work — atomic commits and push to origin
Full end-to-end (E2E) testing skill utilizing the browser. Make sure to use this skill whenever the user asks to "test the app", "run end to end tests", "verify the UI", "check if the app works", or wants you to use the browser to interact with and test the application flow. This skill orchestrates creating a test plan, getting user approval, navigating the application using the browser, independently fixing obstacles, and generating a progressive test report.
| name | test-driven-development |
| description | TDD workflow — write failing tests first, then implement, then refactor |
Red → Green → Refactor workflow for writing tests before implementation. Use when building new features, fixing bugs, or when the user explicitly requests TDD. Complements 41_workflow_testing.md which covers test standards; this skill covers the process.
it('calculates order total including tax', function () {
$order = Order::factory()->create(['subtotal' => 10000]);
$total = (new CalculateOrderTotal)($order);
expect($total)->toBe(10800); // 8% tax
});
Then start the next cycle with the next requirement slice.
Break features into the smallest testable behaviors:
| ❌ Too broad | ✅ Thin slices |
|---|---|
| "Order processing works" | "Calculates subtotal from line items" |
| "Applies percentage discount" | |
| "Adds tax to discounted total" | |
| "Rejects orders with zero items" |
Tests should read as specifications:
// Backend (Pest)
it('rejects orders without a shipping address')
it('applies the highest applicable discount')
it('sends confirmation email after payment succeeds')
// Frontend (Vitest)
it('disables submit button while form is submitting')
it('shows validation errors below each invalid field')
it('redirects to dashboard after successful login')
For bugs, the cycle is slightly different:
TDD isn't always the best approach:
In these cases, write tests after but still write them.
41_workflow_testing.md.