agentsclimarketplace

Test design

Skill pipipip169/fable5-handoff/sources/adamentwistle-fable-skills/test-design

What to test and how — regression test fails first, boundary tables, behavior over implementation, boundary-only mocks, the mock-echo trap. Use when writing tests, adding regression coverage for a fix, or judging whether existing tests protect anything.From its SKILL.md

Install
npx -y skills add pipipip169/fable5-handoff --skill test-design

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

3 things to look at

  • 29 days oldThe repository was created 29 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 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.
  • 1 stars1 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.4 KB, 675 tokens by cl100k_base, as published. Nobody here has run it

Test Design

A test's value is the bug it would catch. Write tests by asking "what realistic mistake would make this fail?" — a test no plausible mistake can fail is ballast.

What to test (priority order)

  1. The bug you just fixed — regression test that fails on the pre-fix code. Write it FIRST, watch it fail, then fix. A "regression test" that never failed proves nothing; if you fixed first, temporarily revert the fix to confirm the test goes red.
  2. The contract, at its boundaries — for each input: empty/zero/null, one, many, max, just-past-max, wrong type/shape, duplicate, unicode/whitespace where strings. Use a table: input → expected. Boundaries are where implementations disagree with intentions.
  3. The failure paths — what the code does when its dependency errors, times out, returns malformed data. Untested error handling is usually broken error handling.
  4. The invariant — properties that must hold across all inputs (sorted output stays sorted, money sums preserved, scrubbed text contains no digits). One property test or loop-over-cases beats five example tests.

Test behavior, not implementation

Assert on observable outcomes (return values, emitted events, state visible to callers, rendered output) — not on internals (which private method was called, internal ordering, exact intermediate structure). Implementation-coupled tests break on every refactor while catching no bugs, training everyone to update tests reflexively — which is how real regressions slip through.

Heuristic: could someone rewrite the function body correctly and keep your test green? They should be able to.

Mock discipline

  • Mock at the boundary you don't own (network, clock, randomness, filesystem) — not your own logic. Mocking your own modules tests the mocks.
  • The mock-echo trap: a test that stubs getX to return 42 and then asserts the result contains 42 tests nothing but the stub. Every mocked test needs some real logic under test between stub and assertion.
  • Fix time and randomness explicitly (injected clock/seed) — tests that pass "most of the time" are worse than no tests.
  • Keep mock shapes honest: when the real dependency's response shape changes, grep for its mocks — a green suite against a stale mock is a false green.

Structural rules

  • One behavior per test; the name states the expectation ("rejects expired proposal") not the method ("test handleProposal 2").
  • Arrange–act–assert, visible in the test body. Shared setup helpers are fine; shared assertions hidden in helpers obscure what's protected.
  • Tests must not depend on each other or on execution order; each builds its own state and cleans up (or uses fresh fixtures).
  • Deterministic first: no real network, no real sleeps (use fake timers), no shared global state across files.

Calibrate quantity

A tiny pure function needs 1–3 boundary cases, not twelve. A gnarly state machine or money-handling path deserves the full table + failure paths + an invariant. Match the project's existing test idioms and runner conventions — a beautifully designed test in the wrong framework style is a maintenance burden.

What ships with it

Read from the repository

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

Gives 0 of the 12 instructions most design frontend skills give in 675 tokens

Counted across 1,169 of the 1,878 authors here whose files we hold, read 2026-08-07

  • Use CSS variables for color consistencyin 72 of 1169, across 23 files
  • Commit to one bold aesthetic direction before codingin 72 of 1169, across 27 files
  • Match implementation complexity to the aesthetic visionin 70 of 1169, across 20 files
  • Add atmospheric background effects and texturesin 57 of 1169, across 9 files
  • Use unexpected spatial compositions and layoutsin 56 of 1169, across 8 files
  • Implement real working codein 55 of 1169, across 7 files
  • Vary themes and aesthetics across different designsin 48 of 1169, across 7 files
  • Launch chromium in headless modein 47 of 1169, across 4 files
  • Close the browser when donein 47 of 1169, across 4 files
  • Run provided scripts with help flag firstin 47 of 1169, across 4 files
  • Wait for network idle statein 47 of 1169, across 4 files
  • Use descriptive selectors for elementsin 47 of 1169, across 4 files

Said here and by no other author read

  • test the contract at its boundaries
  • test failure paths and dependencies
  • test invariants across all inputs
  • assert on observable outcomes only
  • fix time and randomness explicitly
  • keep mock shapes honest

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 326,790. 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.