Skip to content
Back to skills

Test Driven Development

ASecurity

Use for risky behavior changes, regression proof, legacy characterization, or substantive test design. Trivial test renames do not require a test-first workflow.

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added October 15, 2026
testinggo

Security analysis

A100/100

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

Scanned October 15, 2026

npx -y skills add MVPavan/via --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/mvpavan-test-driven-development/badge)](https://www.skillsdirectory.com/skills/mvpavan-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 for risky behavior changes, regression proof, legacy characterization, or substantive test design. Trivial test renames do not require a test-first workflow.
---

# Test-Driven Development

## Choose the mode first

| Task | Mode |
|---|---|
| New risky behavior or bug fix needing proof | Test-first |
| Preserve poorly understood existing behavior during an edit | Characterization |
| Add, rename or improve tests without changing behavior | Test quality only |

Use existing test tooling and applicable commands in project verification docs.
Read `references/writing-good-tests.md` when designing or changing substantive
tests. A trivial rename needs a focused check, not a test-first ceremony.

Choose the smallest boundary that exercises the real failure or contract. Public
behavior is usually stable; internal algorithm tests are appropriate when they
prove meaningful behavior without mirroring implementation. Use the plan's test
seams as guidance; routine seam selection needs no separate approval. Surface a
missing seam only when it materially changes scope or the evidence obtainable.

## Test-first

1. Select one behavior and derive expected results from the spec, a worked example
   or another independent source.
2. Run its test before the fix and confirm the intended failure, not an import or
   setup error. A passing test does not demonstrate the reported regression.
3. Implement the owning fix, rerun the proving check and relevant affected tests.
4. Refactor while preserving the behavior and repeat checks affected by edits.

If code already changed, prove the regression against an isolated earlier version
when feasible; do not destroy existing edits to recreate RED. Report missing
before/after proof accurately.

## Characterization

Capture current behavior and run a passing baseline before editing. When useful,
make a safe isolated perturbation to establish sensitivity. Record intentional
behavior changes in expectations; accidental differences remain regressions.
A passing characterization baseline is not RED.

## Test quality and completion

Prefer independent expectations, deterministic inputs and isolated state. Fakes
and partial mocks are valid at appropriate boundaries if they do not replace the
behavior under test. Avoid tests whose expectations repeat the implementation.

Run checks required by the task and repository plus coverage justified by affected
behavior. A full suite or mutation trial is not mandatory for every edit; required
project gates still apply. Explain skipped, unavailable or pre-existing failing
checks. Keep enough evidence to distinguish a demonstrated fix from an inference.

Files in this skill

  • SKILL.md2.6 KB
  • agents/openai.yaml42 B
  • references/writing-good-tests.md1.9 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.