Skip to content
Back to skills

Tdd

ASecurity

Develop a feature or bug fix through a practical red-green-refactor loop using the repository's native test tooling. Use when the user requests test-first development, red-green-refactor, regression tests, integration tests, or wants behavior established before implementation.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 6, 2026
ai-agentstesting

Security analysis

A100/100

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

Scanned November 6, 2026

npx -y skills add bolens/agent-skills --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/bolens-tdd/badge)](https://www.skillsdirectory.com/skills/bolens-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: Develop a feature or bug fix through a practical red-green-refactor loop using the repository's native test tooling. Use when the user requests test-first development, red-green-refactor, regression tests, integration tests, or wants behavior established before implementation.
---

# Test-Driven Development

Read the nearest `AGENTS.md`, contributor guidance, relevant specification, and existing tests. Match the repository's domain vocabulary and test conventions.

## Choose the test surface

Test observable behavior through the narrowest stable public interface that proves the requirement. For straightforward changes, infer the seam from existing tests and proceed. Ask the user only when choosing a seam would materially lock in an uncertain interface.

Read [tests.md](tests.md) for examples and [mocking.md](mocking.md) when a boundary may need a test double. Consult `codebase-design` only when the interface itself is the design problem.

## Loop

1. Write one focused test that fails for the intended reason.
2. Run it with the repository's canonical focused-test command and preserve the failure evidence.
3. Implement the smallest coherent behavior that makes it pass.
4. Run the focused test, then relevant neighboring checks.
5. Refactor while green when it improves clarity without expanding scope; rerun tests after each refactor.
6. Repeat in vertical slices until the requested behavior is covered.

Prefer literals or specification examples as independent expected values. Avoid testing private methods, mocking internal collaborators, tautological expectations, and broad snapshots with weak behavioral signal.

Do not install test frameworks, rewrite established test architecture, or expand coverage beyond the requested behavior without explaining why. If a useful regression test is impractical, state the constraint and use the strongest available verification.

Files in this skill

  • SKILL.md1.9 KB
  • UPSTREAM.md402 B
  • agents/openai.yaml208 B
  • mocking.md1.4 KB
  • tests.md2.2 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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

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