Skip to main content

Testing skill

TDD Skill

Apply test-driven development by writing a failing test before production code.

Install command

AI DevKit installs its built-in skills as one curated set. Run this once to install tdd with the rest of the built-in workflow skills.

npx ai-devkit@latest skill add --built-in

What it does

Use tdd when adding behavior or fixing bugs where a regression test should define success. It keeps the agent honest by establishing a failing test first, then implementing the smallest change that makes it pass.

When to use it

  • Add behavior with a clear red-green-refactor loop
  • Fix bugs with regression coverage
  • Prevent agents from writing production code before the expected behavior is pinned down

Supported agents

Claude CodeCodexCursoropencodeGemini CLI

Related skills