Test-Driven Development

Test-Driven Development is a skill for Claude Code, Codex from robisson/build-like-amazon-agent-skills. It costs 51 tokens per session (2,859 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 CodeCodex

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

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.

agentmods
npx agentmods add skills/robisson/build-like-amazon-agent-skills/test-driven-development
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, Codex.

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

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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,859 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00051 $0.02859
Opus 5 $0.00026 $0.01430
Sonnet 5 $0.00010 $0.00572
Haiku 4.5 $0.00005 $0.00286

Measured 4d ago against content hash 3f70131ecc59, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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 · 265 lines

How it starts

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

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 · 265 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. 4d 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 (14 stars, last pushed 3mo ago), licensed MIT. It adds 51 tokens to every session and 2,859 once invoked, about $0.0003 per session on Opus 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.

Related

Other skills, from other repositories

testing

Write and run tests for Frappe apps including unit tests, integration tests, and UI tests. Use when adding test coverage, debugging test failures, or setting up CI for Frappe projects.

lubusIN/frappe-skills · 42 tokens

continuous-testing

Continuous test-driven development loop — after every code change, builds the project, starts the server, and runs Unit Tests, Integration Tests, and System Tests. Applies on top of microprofile-server skill. Use during development when you want full verification after each change. Triggers on "continuous testing"…

AdamBien/airails · 84 tokens

flutter-testing

Write, fix, review, debug, and validate Flutter tests for apps, packages, and plugins. Use when adding unit tests, widget tests, integration tests, MethodChannel or plugin mocks, Mockito or mocktail test doubles, golden or accessibility checks, CI test commands, test failures, MissingPluginException, pump or…

MADTeacher/mad-agents-skills · 93 tokens

tdd-workflow

Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+ coverage including unit, integration, and E2E tests.

sjarmak/coding-agent-workflows · 43 tokens

verify

Verification loop — lint -> typecheck -> unit -> integration -> e2e.

sd0xdev/sd0x-harness · 17 tokens

tdd-workflow

Runs the full TDD workflow for a TypeScript/JavaScript feature — user journeys to test cases, unit tests (Jest/Vitest + Testing Library), API/integration tests, Playwright E2E, and a coverage gate wired into CI. Use when building a Next.js/React/Node feature end to end, not just a single unit test, or when asked to…

shennawardana23/skillme · 92 tokens