Sign in Get 3 free credits

Try a job or a niche: tiktok captions, study notes, excel formulas. Press Esc to close.

Tests that catch real bugs

Writes tests that check real behaviour, not implementation details, so they catch bugs and survive refactors.

Claude's review

8/10 Sharp, opinionated test-writing rules with falsification step and triage order that improve real output.

We asked Claude the question you would ask: would I be glad I installed this? We only sell skills it rates 7 or higher.

In detail

Write tests that pin real behavior instead of implementation details, config values, or lucky samples. Use when adding tests for new behavior, writing a regression test, fixing a brittle or flaky test, reviewing a test diff, or when a test breaks after a refactor or config change that didn't change behavior.

How you use it

  1. Add it to your pack, then download your pack (1 credit).
  2. In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
  3. Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide

Safety check

Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.

An automated scan lowers risk but cannot promise zero risk. How we check skills

Preview

The first lines of SKILL.md
---
name: write-tests
description: Write tests that pin real behavior instead of implementation details, config values, or lucky samples. Use when adding tests for new behavior, writing a regression test, fixing a brittle or flaky test, reviewing a test diff, or when a test breaks after a refactor or config change that didn't change behavior.
---

# Write Tests

A good test fails **only** when real behavior breaks, and passes through every
refactor or config change that preserves it. Most bad tests fail the opposite
way: red on harmless changes, green while the real path is broken. Every rule
below serves that one goal.

Default to end-to-end or system-level tests for regression coverage; use a unit test only for specific, complex business logic when fast feedback will materially speed development.

For deciding whether coverage adds independent proof, where it belongs, or
which existing tests can go, use [audit-tests](../../review/audit-tests/SKILL.md).

## Workflow: tracer bullets, not a batch

1. **Write ONE test at a time.** Assert first, watch it go red on the un-fixed
   code, make the code earn green, learn, then write the next. Never a batch up
   front: a batch written against *imagined* behavior pins what you guessed —
   those tests pass when the mechanism breaks and fail when it's fine. Each
   green cycle tells you what the next test should actually assert.
2. **Iterate on the fastest focused runner** (one file, one test name), and run
   the full suite only as a final gate before handing off. Check the exit code,
   not just the output — a runner that prints nothing and a green run look the
   same. On failures, read EVERY red test before fixing one; they often share a
   root cause.
3. **Before calling it done**, prove the test can fail (below) and walk the
   review checklist.

## What to assert

- **Observable behavior through the outermost practical entry point** — return
  values, exit codes, persisted rows, HTTP responses, rendered output — never
  which internal functions ran or how a value is computed. A test on the public
  surface survives a rewrite of everything underneath; a test that reaches into
  internals breaks on every refactor and pins implementation, not behavior.
  Use an isolated unit test only when the logic is specific and complex enough
...

From dzhng's repository, MIT licence.

Related skills

  • Checked

    React Native tests

    Writes and fixes React Native component tests with Testing Library v13 and v14, using the right API for each.

    by callstackincubator 1.7k
    7/101 credit
  • Checked

    JUnit and Mockito tests

    Writes and fixes Java tests with JUnit, AssertJ and Mockito that are deterministic and keep failures visible.

    by github 42k
    8/101 credit
  • Checked

    Test code review

    Reviews new or changed tests in pytest, Jest, Go and more, so weak tests are caught before merge.

    by amElnagdy 1.3k
    8/101 credit
  • Checked

    Test scope decisions

    Decides which tests a change needs and how to judge their quality, for unit, integration and UI tests.

    by shinpr 725
    8/101 credit
  • Checked

    Playwright accessibility tests

    Writes Playwright and axe tests for WCAG, focus and ARIA, so accessibility bugs fail the build early.

    by fugazi 273
    7/101 credit
  • Checked

    Go table driven tests

    Writes Go tests with table cases, fakes, fuzzing, benchmarks and golden files that stay fast and reliable.

    by ericrisco 691
    8/101 credit

Secure checkout

Credits

AUD

  1. 1Choose
  2. 2Pay on Square
  3. 3Credits added