Skip to content
Back to skills

Tdd

ASecurity

Apply test-driven development with small, behavior-focused feedback loops. Use when the user asks to build or fix something test-first, mentions red-green-refactor, or wants integration tests.

  • 583 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 5, 2026
ai-agents

Security analysis

A100/100

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

Scanned September 5, 2026

npx -y skills add stevesolun/ctx --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/stevesolun-tdd-ctx/badge)](https://www.skillsdirectory.com/skills/stevesolun-tdd-ctx)

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: Apply test-driven development with small, behavior-focused feedback loops. Use when the user asks to build or fix something test-first, mentions red-green-refactor, or wants integration tests.
---

# Test-Driven Development

Use small red → green → refactor cycles when a test-first feedback loop is
practical. Treat repository conventions, existing tests, and the requested
behavior as authoritative.

## Loop

1. Identify one observable behavior and the seam through which callers see it.
2. Write the smallest meaningful test and confirm that it fails for the expected
   reason.
3. Add only enough implementation to make the test pass.
4. Refactor when doing so improves clarity or design; keep the suite green.
5. Repeat with the next vertical slice.

Infer seams from public interfaces and nearby tests. Ask the user only when
choosing a seam would materially change the product contract, cost, or scope.

## Judgment

- Prefer behavior-focused tests that survive internal refactors.
- Derive expected results from a specification, worked example, or other
  independent source rather than duplicating the implementation.
- Mock external or nondeterministic boundaries when useful; follow established
  repository patterns where they provide an adequate feedback loop.
- Prefer vertical slices over a speculative batch of tests. Batch closely
  related mechanical cases when that is clearer and faster.
- If a failing-first cycle is impractical—for example in legacy code with no
  usable seam—state the limitation and establish the nearest reliable
  characterization or integration test.

Read [tests.md](tests.md) for examples and [mocking.md](mocking.md) when deciding
whether and where to use test doubles.

Files in this skill

  • SKILL.md1.7 KB
  • agents/openai.yaml87 B
  • mocking.md1.8 KB
  • tests.md2.4 KB

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.