ワンクリックで
tdd-workflow
// Test-Driven Development guidance. Use when writing code, implementing features, or fixing bugs in projects that follow TDD methodology. Provides the Red-Green-Refactor cycle structure.
// Test-Driven Development guidance. Use when writing code, implementing features, or fixing bugs in projects that follow TDD methodology. Provides the Red-Green-Refactor cycle structure.
Language-specific code style guidelines. Use when writing TypeScript, Python, Go, JavaScript, or HTML/CSS code to ensure consistent, idiomatic, and maintainable code following best practices.
Auto-load Conductor project context when conductor/ directory exists. Use for any development task in a Conductor-managed project to ensure alignment with product goals, tech stack, and workflow methodology.
Auto-load Conductor project context when conductor/ directory exists. Use for any development task in a Conductor-managed project to ensure alignment with product goals, tech stack, and workflow methodology.
Test-Driven Development guidance. Use when writing code, implementing features, or fixing bugs in projects that follow TDD methodology. Provides the Red-Green-Refactor cycle structure.
| name | tdd-workflow |
| description | Test-Driven Development guidance. Use when writing code, implementing features, or fixing bugs in projects that follow TDD methodology. Provides the Red-Green-Refactor cycle structure. |
Guidance for Test-Driven Development methodology.
RED → GREEN → REFACTOR (repeat)
| Phase | Purpose | Actions | Verify |
|---|---|---|---|
| RED | Define expected behavior | Write test for ONE behavior, run test | Test FAILS |
| GREEN | Make it work | Write MINIMUM code to pass | Test PASSES |
| REFACTOR | Make it clean | Improve ONE thing at a time, run tests after each change | Tests stay GREEN |
Purpose: Define behavior before implementation.
Actions:
Common mistakes: Tests pass immediately, testing implementation not behavior, writing too many tests at once
Purpose: Write MINIMUM code to pass test.
Actions:
Common mistakes: Over-engineering, adding untested features, "while I'm here" additions
Purpose: Clean up while keeping tests green.
Actions:
Checklist: Extract methods, rename variables, remove duplication (DRY), simplify conditionals, add type safety
Arrange-Act-Assert (AAA):
Given-When-Then (BDD): Structure nested describes for readability
| Language | Command |
|---|---|
| JS/TS (Jest) | npx jest --coverage |
| JS/TS (Vitest) | npx vitest run --coverage |
| Python | pytest --cov=src --cov-report=html |
| Go | go test -cover ./... |
toContainEqual not array index checks)For detailed code examples, see examples.md in this skill directory.
Works with: