Skip to content
Back to skills

Test Driven Development

ASecurity

Use when implementing any feature or bugfix, before writing implementation code. Enforces red-green-refactor cycle with strict rules.

  • 228 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 5, 2026
ai-agentstestingrefactoringdocumentation

Security analysis

A100/100

Scanned September 5, 2026

npx -y skills add peintune/runjam --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/peintune-test-driven-development/badge)](https://www.skillsdirectory.com/skills/peintune-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 any feature or bugfix, before writing implementation code. Enforces red-green-refactor cycle with strict rules."
---

# Test-Driven Development (TDD)

## Rule

Write the test first. Watch it fail. Write minimal code to pass.

**Core principle:** If you didn't watch the test fail, you don't know if it tests the right thing.

## When to Use

Always for:
- New features
- Bug fixes
- Refactoring with behavior changes

Skip only for:
- Config file changes
- Documentation updates
- Non-functional changes (formatting, comments)

## Process

1. **Red**: Write a failing test
2. **Green**: Write minimal code to pass
3. **Refactor**: Clean up while keeping tests green

## Anti-Patterns

- Writing implementation before the test
- Skipping the "watch it fail" step
- Writing tests that are too coupled to implementation
- Testing framework behavior instead of your code

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…