Decide what to test, where, how and at which level when writing or changing code in a real repository: which boundary a test binds to, mocks against real I/O, example and snapshot tests against generated ones (fuzz, property, simulation), the oracle for a randomized test, seeds and minimization, slow and flaky tests, what the merge gate runs, continuous fuzzing, benchmarks as tests. Use when adding tests for a feature or a bug fix, when a refactor breaks many tests, when tests are slow or flaky, when reviewing a test plan or a suite, or when code under test does I/O, reads the clock or uses randomness. Runs a gated procedure from one reconstructed model (Alex Kladov's practice). Not for: whether a test is worth its cost or when to stop; how an outside system behaves (real or fake database, migrations, vendor API drift, lost responses, redelivered messages); where module boundaries go (software-architecture); framework tutorials or coverage targets.
Ships in thinking. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill is one reconstructed reasoning model, not a body of testing knowledge. It was rebuilt from the testing practice of Alex Kladov (matklad): his blog (206 posts, 2017–2026), rust-analyzer's design documents and commits, TigerBeetle's blog, documents and pull requests, his IronBeetle and conference streams, and forum threads. He did not take part in it, review it or endorse it. An adversarial verification pass checked 158 extracted moves against that corpus: 85 held as stated, 28 held only in a narrower scope, 43 rest on a single occurrence and are quarantined as hypotheses, 2 were cut as inverted; none was absent from the corpus or another person's. Six of the moves that held do not instruct here (why).
His concepts carry the shape of a test, and his contemporaneous records show them deciding it. They do not carry whether a test is worth its cost, nor how an outside system behaves: see the line.
Before you state a number, attribute a phrase, close a fork, or answer where this comes from, load references/limits.md.
software-architecture skill. This skill places tests on boundaries; it never re-derives them.Each concept answers a different question about a test. They are distinct, not orthogonal.
check function which encapsulates API under test"; input and expected output are data; the expected output is a text snapshot, where "a mismatch between expected and actual causes the gold value to be updated in-place." check is how binding is carried out: he introduces it as the remedy for API-bound tests.graph LR
B[Binding] -->|carried by| D[Data]
D -->|presupposed by| E[Entropy]
E -.->|no expected output| V[Verdict]
I[Impurity]
C[Commit]
Solid edges are dependencies in his material; the dotted edge is this skill's construction.
The gate order follows the dependencies above. It is this skill's scaffolding, not a protocol he follows. Look at anything first; commit to no test until the gates above it have a written answer.
Gate 1: Binding. Name the feature in one line and the most stable boundary where it is visible: for a library, the public API; for an application, "The boundary is what a human in front of a display sees." Bind to an API only when the API is the product: test a public library through the API its consumers use, and keep the logic tested as data in, data out. Give each layer its own integrated tests through its own input and output, so work on a lower layer does not wait for the stack to rebuild (a compile-time cost; it depends on the language). Run the neural-network test on the plan: if swapping the implementation would force rewriting the tests, they bind to code.
Gate 2: Impurity. List every I/O, clock read, random draw, thread and process the test touches. For each one: pass it in as data (time as a value: "If time is a meaningful part of the input data, it should be modeled explicitly."; the random generator as an argument); stub it, if it is impure I/O you do not own; or keep it real. When I/O cannot be isolated, "just accept that the tests are going to be slow, and might need extra effort to avoid flakiness", and gate it as a slow test. Do not shrink a test's extent to make it fast. A sleep in a test is the symptom of work started with no handle to join: of a fire-and-forget API he says "This API is fundamentally untestable." (structured concurrency, named here and owned elsewhere).
Gate 3: Data. One check per feature; each test body is a single call to it; all variation lives in the input data. Where the expected output is known, render the outcome as readable text and compare it with a snapshot that updates in place; mark volatile parts such as timestamps as ignorable. Make adding a test trivial: "if writing a test is more effort than the fix itself, testing tends to go out of the window." Detail: references/data.md.
Gate 4: Entropy (only once Gate 3 holds). His order: "If I need to test something, I write a property/fuzz/randomized test. If I can't fuzz, I write a snapshot test." When the small inputs can be enumerated, test all of them. Feed the examples to the generator. Detail: references/generative.md.
Gate 5: Verdict. For generated input, name the oracle and what it is as strong as. Does not crash is the floor and is as strong as the assertions in the code under test; an exact model or a second computation is stronger. Detail: references/generative.md.
Gate 6: Commit. Name the run the test joins: the merge gate (fast and reliable; main advances only to commits whose results are known), the slow tier ("introduce the concept of slow tests early on, arrange the skipping of such tests by default and only exercise them on CI"), or continuous runs (long fuzzing stays off the gate and runs over commits). Any checked property of the repository, such as formatting, lint, generated files or a benchmark at small size, is a test the normal test command runs. Detail: references/suite.md.
Then watch it fail. For a test of a specific condition, disable the condition and see the check fail; for a fuzzer, check that it reaches the cases it exists for. Scope: limits.
Mocking, snapshotting, fuzzing, a real process, a slow test, reading internals: each is a gain in one context and a loss in another. Never recall a sign; read it off the gates.
| Operation | Gain when | Loss when |
|---|---|---|
| Mock or stub | it stands in for impure I/O you do not own | it stands in for your own code: "mocking your own code (as opposed to mocking impure IO) reduces fidelity of the tests, and makes the code more brittle"; or it approximates a real component and differs from it in the interesting cases |
| Call the API from the test | the API is the product | anywhere else; route the call through check |
| Per-function tests of internals | — (no case in his material) | they stay as the suite: "Software that is hard to change because thousands of test nail existing internal APIs." |
| Text snapshot | the outcome renders as text; you cannot fuzz; you want a repeatable REPL | the output is volatile and left unredacted |
| Generate input | the test is data and an oracle exists; pure code is the easy case | the test is not yet data: Gate 3 first |
| Real process, real I/O | the I/O cannot be isolated, or the feature is the process boundary | it becomes the bulk where a simulator exists (TigerBeetle) |
| Whole-system simulation | all I/O, time included, goes through interfaces designed with the simulator (TigerBeetle) | — (no criterion for an existing application: hypotheses) |
| Slow test | skipped locally, always run on CI | a skip used for a test that does not pass yet: "assert the wrong behavior and add a fixme explaining why it is wrong." |
| Read internal state | a coverage mark ties a test to the branch it must hit | the suite asserts on internals, failing the neural-network test |
| Fixed seed | statistical assertions: "One in a billion events do happen in CI!" | anywhere else: a fresh seed per run, printed first |
| Add to the merge gate | the check is reliable and fast | a long fuzz run: run it continuously instead |
His own scope, from How to Test (2021, before his TigerBeetle work): "Compilers are pure self-contained functions. I don't know how to best test modern HTTP applications built around inter-process communication."
For service code (a handler on a database, an API client, a queue consumer, a CLI that downloads and writes files), the model decides the shape of every test on our side of the I/O boundary:
It decides nothing that depends on how the outside system behaves: how far to trust a fake database against a real one, and how many tests of each; SQL and migration correctness; races between requests inside the database; vendor API drift; a request applied whose response was lost; broker acknowledgement order, redelivery and poison messages. It points the way and leaves the choice on the end state after a failed run and on what the file system guarantees on a crash. At this line say the model does not reach here, make the choice yourself, label it yours, and name what would show it wrong. Do not import another author's rule and present it as this model's.
Every test plan, new test, or review of a suite carries:
check it goes through and the expected output's form (snapshot, ignorable parts), or why the input is generated;Load a file when its condition fires, never preventively. Every file has a row.
| Load this file | At this moment |
|---|---|
references/data.md | Writing or changing a check, a snapshot, a fixture or test infrastructure; a refactor breaks many tests; a test does not pass yet. |
references/generative.md | Writing a fuzz, property, exhaustive or simulation test; choosing an oracle or assertions; a generated test failed and needs reproducing or shrinking; a bug escaped the fuzzers. |
references/suite.md | Changing CI, the merge gate or the test runner; a suite is slow or flaky; placing a slow test, a fuzzer or a benchmark. |
references/limits.md | Before stating a number, attributing a phrase, touching a fork or a hypothesis, citing the model, or answering where it comes from; at the line. |
references/glossary.md | A term from this skill or from his writing is used or met, especially "unit test", "integration test", "fuzzer". |
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
/thinking:testingfrom thinking
npx claudepluginhub fozy-labs/astp --plugin thinking4 skills in this plugin
/analysisAnalytical checks for claims and evidence: a benchmark, eval or test-suite score, a metric, a speedup or latency claim, "studies show", an agent's or a colleague's report that something works or is fixed; comparing options on evidence; finding the cause of a failure, regression or flaky test; checking your own conclusion before you report it. Use when a number is about to be relied on, a result looks striking or confirms what you hoped, a score rose under optimisation, two explanations or options compete, a fix "seems to work", or you are about to write a verdict. Runs an unordered set of checks for where a claim and what happened come apart, with a budget and a stop rule. Not for generating hypotheses or ideas, statistics or experiment-design tutoring, domain knowledge, ranking values that cannot be priced, or what a design argument owes (that is design-derivation's Layer 0)./design-derivationDerive visual and interface design decisions instead of picking them — for app and web interfaces, screens and flows, dashboards, landing pages, banners and ad creative, identity and logos, presentation and print layouts, and game UI and HUDs. Use when deciding what should stand out, how much hierarchy a screen needs, how to space and group, whether an image or a stylised layer earns its area, whether to duplicate or use a legend, whether an icon can replace text; when a layout "feels off", "looks flat", "everything shouts", or "looks generic"; and when judging, defending, or dismantling a design decision — yours, a client's, or a critic's — including arguments like "it's cleaner", "it's more convenient", or "a big company does it". Runs a gated procedure — what counts as an argument, then frame and value and scenario, then charge and sign together, then surface and accuracy — so every decision is traceable to this brief rather than to a remembered look. Not for writing markup or component code against a settled spec, choosing frameworks or component libraries, copywriting, data-chart and visualisation specification, or accessibility conformance audits./software-architectureDecide the structure of software when writing or changing code in a real repository: where a boundary goes and how much care it deserves, who may know whom (invariants stated as absences, and how to enforce them), where I/O, the clock, allocation, errors and branching live, how large a module, function or crate should be against its interface, and what to depend on or own (libraries, build, CI, automation). Use when adding a module, crate, layer or dependency, splitting or merging code, when one change keeps breaking unrelated parts, when I/O sits deep inside logic, when reviewing a design or an ARCHITECTURE file, or when shaping the build and CI. Runs a gated procedure from one reconstructed model (Alex Kladov's practice). Not for: the content of a decision (data structures, algorithms, domain facts); how to test (testing); splitting a system into services, HTTP or cloud design; pattern catalogues.