tdd
/tdd
Use test-driven development for behavior-changing feature or fix work, and whenever the user mentions TDD, test-first, red-green-refactor, tracer bullets, integration tests, or public-interface behavior tests. Skip for docs-only, path-only rename, formatting-only, or purely mechanical chores unless explicitly requested.
- Author
- youdotcom-oss ↗
- Repository
- agent-skills ↗
- Licence
- MIT
- Last repository change
- 26.10.2026
Assessment and security
- Files in this package
- 6
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use test-driven development for behavior-changing feature or fix work, and whenever the user mentions TDD, test-first, red-green-refactor, tracer bullets, integration tests, or public-interface behavior tests. Skip for docs-only, path-only rename, formatting-only, or purely mechanical chores unless explicitly requested.
Original author description
Use test-driven development for behavior-changing feature or fix work, and whenever the user mentions TDD, test-first, red-green-refactor, tracer bullets, integration tests, or public-interface behavior tests. Skip for docs-only, path-only rename, formatting-only, or purely mechanical chores unless explicitly requested.
How it works
- Core Rule
- Plaited Defaults
- When Starting Work
- Cycle Discipline
- Reference Files
SKILL.md preview
--- name: tdd description: Use test-driven development for behavior-changing feature or fix work, and whenever the user mentions TDD, test-first, red-green-refactor, tracer bullets, integration tests, or public-interface behavior tests. Skip for docs-only, path-only rename, formatting-only, or purely mechanical chores unless explicitly requested. license: MIT compatibility: Requires bun for Plaited repository validation --- # Test-Driven Development ## Core Rule Work in vertical red-green-refactor slices: 1. **RED**: write one test for one observable behavior. 2. **GREEN**: implement the smallest production change that makes that test pass. 3. **REFACTOR**: clean up only while tests are green. Do not write a batch of imagined tests before implementation. Each new test should respond to what the last cycle taught you about the actual behavior and interface. ## Plaited Defaults - Use `bun test` for targeted tests and `bun --bun tsc --noEmit` for the type gate. - Use `test`, not `it`, and organize with `describe`. - Prefer real dependencies and real runtime boundaries over mocks. - Mock only external boundaries such as remote APIs, time, randomness, or rare filesystem cases. - Avoid conditional assertions: assert the branch first, then assert branch-specific values. - Test both branches for conditionals, fallbacks, and error paths. - Exercise public interfaces and runtime contracts rather than private helpers. - Follow applicable repo skills and `AGENTS.md` rules for the touched area. ## When Starting Work Explore the codebase first. If the public interface, expected behavior, or risk boundary is discoverable from code, tests, or docs, use that evidence instead of asking the user. Ask one concise question only when the decision cannot be discovered and a reasonable assumption would be risky. Include your recommended answer. Before writing production code, identify: - the public interface or runtime boundary under test - the first observable behavior to prove - the targeted test command for the cycle - the broader validation needed before handoff ## Cycle Discipline For each behavior: 1. Add or update exactly one focused test. 2. Run the targeted test and confirm it fails for the intended reason. 3. Implement only enough code to pass. 4. Run the same targeted test and confirm it passes. 5. Refactor if useful, then rerun the affected tests. If the test passes before production code changes, it is not a valid RED signal. Tighten the test, choose a different behavior, or explain why existing coverage already proves the behavior. ## Reference Files - [references/tests.md](references/tests.md): behavior-test examples and implementation-detail red flags - [references/mocking.md](references/mocking.md): boundary-only mocking guidance - [references/interface-design.md](references/interface-design.md): testable public interface design - [references/deep-modules.md](references/deep-modules.md): small interface, deep implementation guidance - [references/refactoring.md](references/refactoring.md): refactor checks to run after green
Files in this package (6)
- SKILL.md 3 KB
- references/deep-modules.md 1 KB
- references/interface-design.md 1 KB
- references/mocking.md 1 KB
- references/refactoring.md 1 KB
- references/tests.md 2 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · youdotcom-oss/agent-skills | 100 | MIT |
| kdlbs/kandev | 100 | AGPL-3.0 |
| sentimony/skills | 100 | MIT |
| sentimony/skills | 100 | MIT |
| TerminalSkills/skills | 100 | Apache-2.0 |
| duronext/jig | 100 | MIT |
| xoai/sage | 100 | MIT |
| rolemodel/skills | 100 | MIT |
| matteocodogno/wellforge | 100 | MIT |
Identical content appears in 1 other GitHub folders. We show one copy with the highest score.
Database snapshot: 13.11.2026 · package version 49e7f957f962 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100test-driven-development
Strict red-green-refactor TDD workflow for implementing features, fixing bugs, or changing behavior in Rails applications. Enforces the discipline of writing a failing test before any production code. Use whenever you want to implement with TDD — whether a new feature, a bugfix,… - 100test-driven-development
Use when adding or changing production behavior, fixing a bug, or refactoring, even if the user never mentions tests. Applies RED → GREEN → REFACTOR, with characterization coverage before behavior-preserving refactors. Not for documentation or comments. - 90test-driven-development
Red-Green-Refactor workflow: write tests before implementation, maintain coverage. Use when implementing logic, fixing bugs, or changing behavior. - 95tdd-workflow
Test-Driven Development workflow enforcement skill. Use when explicitly asked for TDD methodology, test-first development, red-green-refactor cycle, or TDD implementation. Triggers on keywords like "start TDD", "test-driven development", "write tests first", or in Chinese "開始… - 100jidoka-tdd
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests. - 90test-driven-development
Red-Green-Refactor workflow. Write tests before implementation, maintain 80%+ coverage. Use when implementing logic, fixing bugs, or changing behavior.