agentsclimarketplace

Tdd

Skill mizzy/my-skills/skills/tdd

Use when writing any implementation code - enforces Red-Green-Refactor cycle with no production code without a failing test firstFrom its SKILL.md

Install
npx -y skills add mizzy/my-skills --skill tdd

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.6 KB, as published. Nobody here has run it

TDD (Test-Driven Development)

Overview

Enforces Red-Green-Refactor. No production code without a failing test first.

Iron Law: NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST.

If you wrote code before a test, delete it and start over. No exceptions.

When to Use

  • Called from pick-issue / codex to govern how implementation code is written
  • Any time implementation code is being written

Opus does not hand-write implementation code — it delegates the writing to Codex (see the codex skill). Opus owns intent and review; Codex owns thorough execution. This skill is the Red-Green- Refactor discipline that the delegated code must follow. The Iron Law applies regardless of who types it: a failing test must precede the production code.

The Cycle

RED: Write a Failing Test

  • Write one minimal test for the next behavior
  • Run it and confirm it fails
  • The failure message should clearly describe what's missing

GREEN: Write Minimal Code

  • Write the simplest code that makes the test pass
  • No extra features, no "while I'm here" improvements
  • Run the test and confirm it passes

REFACTOR: Clean Up

  • Remove duplication, improve names, extract helpers
  • Run tests after every change — must stay green
  • Stop when the code is clean enough, not perfect

Repeat

Move to the next behavior. One cycle at a time.

Language-Specific Setup

LanguageTest CommandWatch Mode
Rustcargo testcargo watch -x test
Gogo test ./...-
Rubybundle exec rspec / bundle exec rake testbundle exec guard
TypeScriptnpx vitest run / npx jestnpx vitest

Detect the project's actual test setup and use the appropriate command.

Forbidden Rationalizations

These are not valid reasons to skip the cycle:

ExcuseReality
"I'll write tests after"A test that passes immediately proves nothing
"It's just a small change"Small changes cause big bugs
"I already tested manually"Manual testing is not reproducible
"This is too simple to test"Then the test is trivial to write
"I need to see the code first"The test IS the spec for the code

Red Flags

If any of these happen, stop and restart the cycle:

  • Production code exists without a preceding failing test
  • Test was written after the implementation
  • "Let me just get this working first"
  • Multiple behaviors tested in one cycle

Keep looking

Skills are one crate of 610,220. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.