Skip to content
Back to skills

Test Driven Development

ASecurity

Use when implementing a change with test-driven development (TDD): work test-first through focused red-green cycles.

  • 203 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 22, 2026
ai-agents

Security analysis

A100/100

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

Scanned November 22, 2026

npx -y skills add intent-driven-dev/intent-driven-template --skill test-driven-development --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Test Driven Development?

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

Security grade badge for Test Driven Development
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/intent-driven-dev-test-driven-development/badge)](https://www.skillsdirectory.com/skills/intent-driven-dev-test-driven-development)

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: test-driven-development
description: "Use when implementing a change with test-driven development (TDD): work test-first through focused red-green cycles."
---

# Test-Driven Development

Use the repository's existing test tooling and conventions.

One test, one behaviour, one reason to fail. A test name describes that one
behaviour; never use joiners such as "and", "or", or "etc." to combine
independent outcomes. Multiple assertions are acceptable only when together
they establish that same behaviour.

## Red

- Select one observable behaviour from the requirement.
- Write one test before changing implementation code.
- Run the test and confirm it fails because the behaviour is missing, not because the test is broken.

## Green

- Write only enough implementation code to pass the failing test.
- Run the test, then run the relevant suite.
- Do not add behaviour without first seeing its test fail.

## Refactor

- Refactor only while the relevant suite is green, after completing a red-green slice.
- Refactor either the tests or the implementation in one pass, not both.
- Reuse shared setup, teardown, helpers, and parameterized structure when they clarify intent without combining behaviours.
- Rerun the relevant suite after each refactor pass.

## Patterns and anti-patterns

Read [patterns and anti-patterns](references/best-practices.md) when choosing a test shape, writing examples, or deciding whether cases belong together.

## Collaborators

Read [collaborators](references/collaborators.md) before substituting a dependency. Mock system boundaries, not code owned by the application.

Files in this skill

  • SKILL.md1.6 KB
  • references/best-practices.md1.9 KB
  • references/collaborators.md1.3 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.