agentsclimarketplace

Tdd

Skill SenouLynn/snoodles/skills/tdd

Use when implementing any feature or bugfix, before writing implementation code. Red-green-refactor cycle.From its SKILL.md

Install
npx -y skills add SenouLynn/snoodles --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.
  • 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

3.0 KB, as published. Nobody here has run it

Test-Driven Development

NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST

Write code before the test? Delete it. Start over. Don't keep it as "reference."

Core principle: If you didn't watch the test fail, you don't know if it tests the right thing.

Red-Green-Refactor

RED — Write Failing Test

One minimal test showing what should happen. Clear name, tests real behavior, one thing.

Good: test('retries failed operations 3 times', ...) — specific, behavioral
Bad:  test('retry works', ...) — vague, tests mock not code

Requirements: One behavior. Clear name. Real code (no mocks unless unavoidable).

Verify RED — Watch It Fail

MANDATORY. Never skip.

Confirm: test fails (not errors), failure message expected, fails because feature missing (not typos).

  • Test passes immediately? You're testing existing behavior. Fix test.
  • Test errors? Fix error, re-run until it fails correctly.

GREEN — Minimal Code

Simplest code to pass the test. Don't add features, refactor other code, or "improve" beyond the test.

Good: Just enough to pass — hardcoded values are fine if only one test
Bad:  Options object, backoff strategies, callbacks — YAGNI

Verify GREEN — Watch It Pass

MANDATORY. Confirm: test passes, other tests still pass, output pristine.

  • Test fails? Fix code, not test.
  • Other tests fail? Fix now.

REFACTOR — Clean Up

After green only: remove duplication, improve names, extract helpers. Keep tests green. Don't add behavior.

Good Tests

QualityGoodBad
MinimalOne thing. "and" in name? Split it.test('validates email and domain and whitespace')
ClearName describes behaviortest('test1')
RealTests real codeTests mock behavior

Bug Fix Flow

  1. RED: Write test reproducing the bug
  2. Verify RED: Fails for the right reason
  3. GREEN: Minimal fix
  4. Verify GREEN: Passes, no regressions
  5. REFACTOR: Clean up if needed

Red Flags — Delete Code and Start Over

  • Code before test
  • Test passes immediately
  • Can't explain why test failed
  • "I'll add tests later"
  • "Keep as reference" or "adapt existing code"
  • "Too simple to test" (simple code breaks, test takes 30 seconds)
  • "TDD slows me down" (TDD is faster than debugging)

When Stuck

ProblemSolution
Don't know how to testWrite wished-for API. Assertion first.
Test too complicatedDesign too complicated. Simplify interface.
Must mock everythingCode too coupled. Use dependency injection.
Test setup hugeExtract helpers. Still complex? Simplify design.

Verification Checklist

Before marking complete:

  • Every new function/method has a test
  • Watched each test fail before implementing
  • Wrote minimal code to pass each test
  • All tests pass, output pristine
  • Tests use real code (mocks only if unavoidable)

Keep looking

Skills are one crate of 607,533. 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.