agentsclimarketplace

Test driven development

Skill stevenfackley/opencode-amplifier/.opencode/skills/test-driven-development

Use when implementing any feature or bugfix. Write a failing test first (RED), the minimal code to pass it (GREEN), then refactor. With constrained models the test is an executable spec the model cannot drift from — and it structurally prevents verification gaming.From its SKILL.md

Install
npx -y skills add stevenfackley/opencode-amplifier --skill test-driven-development

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

One thing to look at

  • 0 stars0 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

1.8 KB, 356 tokens by cl100k_base, as published. Nobody here has run it

Test-Driven Development

A weak model that writes code first and tests later will write tests that rubber-stamp its own bugs. TDD flips that: the test becomes a contract written before the implementation exists, so it can't be reverse-engineered to pass broken code.

The loop

  1. RED — write one small test that expresses the next required behavior. Run it. Watch it FAIL for the right reason. A test that passes immediately is testing nothing.
  2. GREEN — write the minimal code to make that test pass. No extra features. Run the suite.
  3. REFACTOR — clean up with the test as a safety net. Re-run; stay green.
  4. Repeat for the next behavior.

Hard rules (these are what make it work with weak models)

  • Test files are locked during GREEN. Once a test is written and committed, the implementation step may NOT edit it. If a test needs to change, that's a separate, explicit decision — never a silent edit to make red go green. (Enforced by the tdd-lock plugin.)
  • For non-trivial features, the tester agent (a different model that never sees your implementation) writes the spec tests from the plan — use /spec-tests.
  • Show the actual RED output and the actual GREEN output. "It passes" without the run is a violation of verification-before-completion.

When to relax

  • Throwaway spikes/exploration — but the moment you keep the code, back-fill the tests.
  • True UI pixel-tweaks where a test costs more than it protects — use judgment, state it.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. 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.