Skip to content
Back to skills

Tdd

ASecurity

Test-first development. Use when the user or repository explicitly requires TDD.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
code-qualityrefactoringcode-review

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 7, 2026

npx -y skills add BumpyClock/agent-templates --skill tdd --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tdd?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Tdd
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bumpyclock-tdd/badge)](https://www.skillsdirectory.com/skills/bumpyclock-tdd)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: tdd
description: "Test-first development. Use when the user or repository explicitly requires TDD."
---

# Test-first development

Use TDD only when the user or repository requests test-first work and there is an observable behavior with an independent expectation.
Do not manufacture tests for mechanical configuration, wiring, or type changes that would only restate the implementation; use relevant existing checks instead.

TDD is the red-to-green loop: one failing test, then enough implementation to pass it.

## Test quality and seams

Before writing tests, read [Test behavior, not implementation](../../programming/references/principles/principle-test-behavior-not-implementation.md).
It owns test quality, user-confirmed seams, domain vocabulary, anti-patterns, and mocking guidance.
Apply those rules before and during every cycle, not as a cleanup pass after implementation.

## Work in vertical slices

1. Select one requested behavior at a user-confirmed seam and a plausible failure that one focused test should detect.
   Use a thin path through relevant consumers when integration is part of the uncertainty; this does not require a browser or full-system test.
2. **Red:** add or select the test and run it before changing the implementation.
   Confirm that it fails for the intended behavior, not a syntax, setup, or dependency error.
   If it already passes, determine whether the behavior exists or the assertion cannot distinguish it; do not break correct code to manufacture red.
3. **Green:** implement the smallest complete behavior for that slice, run the focused check, and correct supported failures.
   Do not weaken useful assertions to obtain a pass or anticipate future tests with speculative features.

Use one seam, one test, and one minimal implementation per cycle.
Continue through remaining requested behaviors instead of writing a batch of speculative tests before any implementation.
Let each completed slice inform the next test.

## Refactoring boundary

Refactoring is not part of the red-to-green implementation loop.
Defer it to the review stage; use [Code review](../code-review/SKILL.md) for that work.

## Completion

Complete the requested behavior through its consumers and correct material gaps exposed by relevant checks.
Broaden validation only for affected integrations, failures, or unresolved risks; reuse sufficient evidence after the latest relevant change.
If a runner is unavailable, use an equivalent that preserves the required semantics and restrictions or report the missing red/green observation. An unrun check is not a pass.
Report delivered behavior, observed check results, and remaining limits.

Files in this skill

  • SKILL.md2.6 KB
  • agents/openai.yaml375 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.