test-driven-development

test-driven-development is a skill for Claude Code from robisson/build-like-amazon-agent-skills. It costs 50 tokens per session (2,864 once invoked), scanned A, original, MIT.

A software-testing practice where you write a failing test before the code, make it pass, then improve the code without changing its behavior. It also describes how to divide tests between small unit tests, component-connection tests, and full user-flow tests.

In plain words
What is it for?
Use it when building features, fixing bugs, changing existing code, reviewing changes, or setting up deployment checks.
Why use it?
It catches mistakes early and makes code changes safer. The tests also help prevent old behavior from breaking during refactoring or deployment.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the build-like-amazon plugin — 29 skills, 14 commands, 10 agents, 1 hook shipped together

Good fit Use it when building features, fixing bugs, changing existing code, reviewing changes, or setting up deployment checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/robisson/build-like-amazon-agent-skills/test-driven-development
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add robisson/build-like-amazon-agent-skills --skill test-driven-development
Clone the repo
git clone --depth 1 https://github.com/robisson/build-like-amazon-agent-skills

Made for: Claude Code.

Or install build-like-amazon, the plugin that ships this one along with the rest of its 29 skills, 14 commands, 10 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for test-driven-development

README.md
[![agentmods](https://agentmods.dev/badge/skills/robisson/build-like-amazon-agent-skills/test-driven-development/github.svg)](https://agentmods.dev/skills/robisson/build-like-amazon-agent-skills/test-driven-development)
Your own site
<a href="https://agentmods.dev/skills/robisson/build-like-amazon-agent-skills/test-driven-development"><img src="https://agentmods.dev/badge/skills/robisson/build-like-amazon-agent-skills/test-driven-development/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for test-driven-development

Your own site · 80×15
<a href="https://agentmods.dev/skills/robisson/build-like-amazon-agent-skills/test-driven-development"><img src="https://agentmods.dev/badge/skills/robisson/build-like-amazon-agent-skills/test-driven-development.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,864 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00050 $0.02864
Opus 5.5 $0.00020 $0.01146
Sonnet 5.5 $0.00010 $0.00573
Haiku 4.5 $0.00005 $0.00286

Measured 27d ago against content hash 1fa8147c7434, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

test-driven-development scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 27d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/test-driven-development/SKILL.md · 267 lines

How it starts

The opening of the file, as written. The whole thing — 267 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Test-Driven Development

Overview

Test-Driven Development (TDD) at Amazon means writing the test before the implementation—always. The Red-Green-Refactor cycle is not a suggestion; it is the mechanism that ensures code correctness, enables fearless refactoring, and keeps deployment pipelines green.

Amazon's test philosophy follows the test pyramid: a broad base of fast unit tests (80%), a middle layer of integration tests (15%), and a thin cap of end-to-end tests (5%). This ratio exists because unit tests are fast, deterministic, and cheap to maintain. Integration tests verify contracts between components. End-to-end tests validate customer-visible behavior but are slow and brittle.

Beyond pre-deployment testing, Amazon runs canary tests in production—synthetic requests that continuously verify real system behavior. When canaries fail, alarms fire before customers notice.

When to Use

  • Before writing any production code (the "Red" step comes first)
  • When fixing a bug (write the failing test that reproduces it first)
  • When refactoring existing code (ensure tests exist before changing behavior)
  • During code review (verify test coverage for every behavior change)
  • When setting up deployment pipelines (configure coverage gates)
  • When onboarding a new service (establish canary tests immediately)

Amazon Context

At Amazon, untested code does not ship. Pipelines enforce minimum coverage thresholds (typically 80% line coverage, 90% branch coverage for critical paths). Code review explicitly evaluates test quality—a change without tests is rejected regardless of how correct the implementation appears.

The CI/CD toolchain (build system, deployment pipelines, code analysis) integrates testing at every stage: pre-commit hooks run unit tests locally, CI runs the full suite, and post-deployment canaries verify production health. Teams own their test infrastructure the same way they own their production infrastructure.

Amazon's testing culture learned from expensive failures: services that shipped with "we'll add tests later" invariably accumulated tech debt that made changes risky, deployments scary, and on-call rotations miserable. TDD inverts this—tests are the first thing you build, not the last.

Read the full file on GitHub · 267 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 27d ago Changed · +2 lines · -1 tokens per session 1fa8147c7434
  2. 1mo ago First seen · 265 lines · 51 tokens per session scan A 3f70131ecc59

Subscribe to this mod's changes

test-driven-development is a skill published in the GitHub repository robisson/build-like-amazon-agent-skills (16 stars, last pushed 22d ago), licensed MIT. It adds 50 tokens to every session and 2,864 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.