test-driven-development SKILL.md skillA

test-driven-development from addyosmani/agent-skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add addyosmani/agent-skills/test-driven-development@git:20261029.2b14012

Pins git:20261029.2b14012 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
addyosmani/agent-skills
Path
skills/test-driven-development/SKILL.md
Versions recorded
7
Latest version
git:20261029.2b14012, committed Oct 29, 2026
First version recorded
Apr 13, 2026
Size
16,845 bytes
Repository stars
112,362
License
MIT

Drives development with tests using the red-green-refactor loop. Use when implementing any logic, fixing any bug, or changing any behavior. Use when you need to prove that code works, when a bug report arrives, or when you're about to modify existing functionality. Use when asked to add tests to a function, fix a bug in it or change its behavior, even when the code is pasted inline and the request does not mention tests.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# Test-Driven Development

## Overview

Write a failing test before writing the code that makes it pass. For bug fixes, reproduce the bug with a test before attempting a fix. Tests are proof — "seems right" is not done. A codebase with good tests is an AI agent's superpower; a codebase without tests is a liability.

## When to Use

- Implementing any new logic or behavior
- Fixing any bug (the Prove-It Pattern)
- Modifying existing functionality
- Adding edge case handling
- Any change that could break existing behavior

**When NOT to use:** Pure configuration changes, documentation updates, or static content changes that have no behavioral impact.

**Related:** For browser-based changes, combine TDD with runtime verification using Chrome DevTools MCP — see the Browser Testing section below.

## Discover the Stack First

The TDD cycle is universal; the commands are not. Before writing the first test, discover how *this* repository tests, and use its commands for every RED, GREEN, and verification step:

- **Language and build system** — `package.json`, `pom.xml`/`build.gradle`, `pyproject.toml`, `go.mod`, `Cargo.toml`, `Gemfile`, a `Makefile`
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add addyosmani/agent-skills/test-driven-development@sha256:8fcaa57cf445ca61

The line at the top of this page pins the label git:20261029.2b14012, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_vwyc5vacuooqo7yp.svg)](https://markdownregistry.com/a/art_vwyc5vacuooqo7yp)

8 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 7 versions of this file, between Apr 13, 2026 and Oct 29, 2026, about one every 33 days.

versioncommittedcommitsizeaudit
git:20261029.2b14012 latest2026-10-29 2b14012 16,845 BA view · diff
git:20261011.7c471462026-10-11 7c47146 16,676 BA view · diff
git:20260907.cda45422026-09-07 cda4542 16,517 BA view · diff
git:20260807.91d4d072026-08-07 91d4d07 16,483 BA view · diff
git:20260719.2e493192026-07-19 2e49319 16,477 BA view · diff
git:20260507.b7653432026-05-07 b765343 14,976 BA view · diff
git:20260413.ad35cbf2026-04-13 ad35cbf 14,896 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (16845 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

addyosmani/agent-skills · 112,362 stars · license MIT · pushed 2026-10-31 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_vwyc5vacuooqo7yp
GET https://markdownregistry.com/api/v1/resolve?ref=addyosmani/agent-skills/test-driven-development
GET https://markdownregistry.com/api/v1/blob/8fcaa57cf445ca6111fd20d2321bcfc0f424db7cfe526836db7b9bf8828fee39

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from addyosmani/agent-skills

AGENTS.md AGENTS.md file
addyosmani/agent-skills · AGENTS.md
git:20260709.b665c5c · audit A · 112,362 stars
CLAUDE.md CLAUDE.md file
addyosmani/agent-skills · CLAUDE.md
git:20260720.8fd2081 · audit A · 112,362 stars
api-and-interface-design SKILL.md skill
addyosmani/agent-skills · skills/api-and-interface-design/SKILL.md · Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when…
git:20261019.63128d0 · audit A · 112,362 stars
browser-testing-with-devtools SKILL.md skill
addyosmani/agent-skills · skills/browser-testing-with-devtools/SKILL.md · Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use…
git:20261029.57bfe5d · audit B · 112,362 stars
ci-cd-and-automation SKILL.md skill
addyosmani/agent-skills · skills/ci-cd-and-automation/SKILL.md · Automates CI/CD pipeline setup. Use when setting up or modifying build and deployment pipelines. Use when you need to…
git:20261029.a4a21f6 · audit A · 112,362 stars
code-review-and-quality SKILL.md skill
addyosmani/agent-skills · skills/code-review-and-quality/SKILL.md · Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another…
git:20260926.28f435e · audit A · 112,362 stars
code-simplification SKILL.md skill
addyosmani/agent-skills · skills/code-simplification/SKILL.md · Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but…
git:20261016.f1f6fbf · audit A · 112,362 stars
constraint-driven-development SKILL.md skill
addyosmani/agent-skills · skills/constraint-driven-development/SKILL.md · Establishes a project's quality bar as a written contract and stops agents quietly lowering it. Interviews the user on…
git:20261029.ba3d99e · audit A · 112,362 stars
context-engineering SKILL.md skill
addyosmani/agent-skills · skills/context-engineering/SKILL.md · Optimizes agent context setup. Use when starting a new session, when agent output quality degrades, when switching…
git:20261031.583df9a · audit A · 112,362 stars
debugging-and-error-recovery SKILL.md skill
addyosmani/agent-skills · skills/debugging-and-error-recovery/SKILL.md · Guides systematic root-cause debugging. Use when tests fail, builds break, something that worked yesterday broke…
git:20261019.60b218f · audit A · 112,362 stars
deprecation-and-migration SKILL.md skill
addyosmani/agent-skills · skills/deprecation-and-migration/SKILL.md · Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one…
git:20261017.9f91cc4 · audit A · 112,362 stars
documentation-and-adrs SKILL.md skill
addyosmani/agent-skills · skills/documentation-and-adrs/SKILL.md · Records decisions and documentation. Use when you need to document an architecture decision (ADR) or the reasoning…
git:20261019.8e6726d · audit A · 112,362 stars

Every file in addyosmani/agent-skills

Other files named test-driven-development

test-driven-development SKILL.md skill
obra/superpowers · skills/test-driven-development/SKILL.md · Use when implementing any feature or bugfix, before writing implementation code
git:20260919.5bf4e78 · audit A · 309,852 stars
test-driven-development SKILL.md skill
mvschwarz/openrig · skills/_canonical/process/test-driven-development/SKILL.md · Use when implementing any feature or bugfix, before writing implementation code
git:20261025.a37e271 · audit A · 8,501 stars
test-driven-development SKILL.md skill
mvschwarz/openrig · packages/daemon/specs/agents/shared/skills/process/test-driven-development/SKILL.md · Use when implementing any feature or bugfix, before writing implementation code
git:20261025.a37e271 · audit A · 8,501 stars
test-driven-development SKILL.md skill
jnmetacode/superpowers-zh · skills/test-driven-development/SKILL.md · 在实现任何功能或修复 bug 时使用,在编写实现代码之前
v1.0.0 · audit A · 8,456 stars
test-driven-development SKILL.md skill
cbrock84/headcount · plugins/technology/skills/test-driven-development/SKILL.md · Drives implementation by writing a failing test first, then the smallest code that passes it. Use this before writing…
git:20260901.aa45383 · audit A · 2,543 stars
test-driven-development SKILL.md skill
a5c-ai/babysitter · library/methodologies/superpowers/skills/test-driven-development/SKILL.md · Use when implementing any feature or bugfix, before writing implementation code. Enforces RED-GREEN-REFACTOR cycle.
git:20260601.da7723a · audit A · 1,891 stars
test-driven-development SKILL.md skill
a5c-ai/babysitter · library/methodologies/rpikit/skills/test-driven-development/SKILL.md · Test-first development practice where test specifications are written before production code, integrated into plan…
git:20260601.da7723a · audit A · 1,891 stars
test-driven-development SKILL.md skill
a5c-ai/babysitter · library/methodologies/cc10x/skills/test-driven-development/SKILL.md · Strict RED-GREEN-REFACTOR cycle enforcement. Tests are never skipped or deferred. Run mode only, never watch mode. Exit…
git:20260601.da7723a · audit A · 1,891 stars

Browse by kind, by grade A, or by owner.