Skip to content
Back to skills

Test Driven Development

ASecurity

Build features and bug fixes test first using a strict red, green, refactor loop. Use for TDD requests, regression tests, behavior changes with clear acceptance criteria, and risky logic that benefits from executable specification.

  • 76 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 3, 2026
ai-agentsshell

Security analysis

A100/100

Scanned September 3, 2026

npx -y skills add Miosa-osa/OSA --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/miosa-osa-test-driven-development/badge)](https://www.skillsdirectory.com/skills/miosa-osa-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: Build features and bug fixes test first using a strict red, green, refactor loop. Use for TDD requests, regression tests, behavior changes with clear acceptance criteria, and risky logic that benefits from executable specification.
tools:
  - file_read
  - file_grep
  - file_glob
  - file_write
  - file_edit
  - shell_execute
triggers:
  - test driven
  - tdd
  - red green refactor
  - regression test
---

# Test-Driven Development

Use tests to define the behavior before implementing it.

## Red

1. Identify the narrowest externally meaningful behavior.
2. Find the nearest existing test style and harness.
3. Write one focused test using the public interface or real user surface.
4. Run it and confirm it fails for the intended reason.
5. If it passes immediately, the test does not prove the requested change.

## Green

1. Implement the smallest production change that satisfies the behavior.
2. Run the focused test.
3. Run nearby tests that exercise the same module or seam.
4. Keep unrelated cleanup out of the green step.

## Refactor

1. Remove duplication and clarify names without changing behavior.
2. Keep the tests green after each meaningful change.
3. Run formatting, static checks, and the proportionate broader suite.

## Test quality

- Prefer observable outcomes over implementation details.
- Include meaningful failure messages for complex invariants.
- Avoid sleeps when a deterministic signal is available.
- Do not mock the behavior under test.
- For a bug, preserve the original reproduction as a regression test whenever practical.

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…