You write the test, watch it fail, then hand it off to another agent or yourself with a clear contract to satisfy. This handles the red phase of TDD properly by detecting your test framework (pytest, jest, vitest, go test, cargo test), matching existing patterns, and producing a structured handoff that specifies which tests must pass and which commands prove it. The tests stay frozen during implementation, so no one weakens them to make the build pass. It also works for bugfixes by writing regression tests before you touch any code. If you're bouncing between planning agents and implementation agents, this creates the objective pass criteria that keeps everyone honest about what "done" means.
npx skills add https://github.com/am-will/codex-skills --skill tdd-test-writer