/ratchet-code:test-authoringfrom ratchet-code
Use whenever a task writes, reviews, fixes, or deletes an automated test, fixture, mock, or test helper, including a review of a diff that adds tests or changes test retries, timeouts, or skips - Vitest, Jest, backend integration, Next.js, Storybook, Swift, or .NET (xUnit, NUnit). Decides which tests to keep and how each fails for one real reason. Browser tests: also playwright-authoring.
Ships in ratchet-code. 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.
Read every applicable AGENTS.md first. Repository-local policy overrides these defaults.
A test earns its place when it fails if, and only if, a contract breaks. Most of these rules remove tests and helpers that cannot do that.
writeFile
and mkdir in the test body. A fixture on disk can be read, diffed, linted, and reused; a tree
built in code can only be run.When a test checks that every file, route, or export is covered by something, write it as a deny-list: enumerate everything, subtract a short list of named exceptions, and assert on the rest. An allow-list of known items passes silently when someone adds a new one, which is the case the guard exists for.
The same holds for seed data: an HTTP test that loads every public entity the seed creates at its public URL, listed from the seed's own output, catches the row that exists but returns 404.
now(), a token,
session, or key expiry checked against wall time, or a TTL. The literal stays put while the
real clock moves, so the test passes until the calendar reaches that date and then fails on
every run. Derive each date from the clock the test controls, or set expiries relative to it.
When a fake clock is pinned, everything the code under test compares against reads that same
clock: pass the time into the query instead of calling now(), or pin the database's time
too. In a review, a literal date next to an expiry, a TTL, or a now() comparison is the cue,
and the fix is never to move the date forward.implementing-changes skill owns mapping each criterion to its evidence before handoff.A change that makes a flaky test pass and leaves its cause in place is a trade-off, not a
reliability fix. Do not describe it as one, and when reviewing, do not accept it as one. The
debugging skill owns finding the cause, and its "Fix the cause" list covers a retry, a longer
timeout, and a skipped or loosened test. A retry includes the runner's retry or retries
setting and a rerun loop in CI; a loosened test includes a wider threshold, baseline, tolerance,
or gate. Two more disguises:
A change called test-only touches no production code. When the fix needed a production change, the defect was in the code: say so, and describe the change as a fix.
After the rules above, read the one file for the runner in use:
playwright-authoring skill as well.Ask of each test: which contract is this, what change makes it fail, and is there a lower layer where the same failure would show sooner. Delete the test when there is no answer.
references/backend-integration.md (opens in a new tab)references/dependency-boundaries.md (opens in a new tab)references/dotnet.md (opens in a new tab)references/replacing-a-library.md (opens in a new tab)references/storybook.md (opens in a new tab)references/swift.md (opens in a new tab)references/tautological-tests.md (opens in a new tab)references/vitest.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub jongleberry/ratchet-stack --plugin ratchet-code12 skills in this plugin
/interface-feedbackUse when writing or reviewing interface code that shows an action button, a toast or error message, or a form's submit, including a review of such a diff. Show only the actions the server allows this viewer and why one is blocked, render errors by code with their details, and check a submit's preconditions so it never succeeds partly in silence./lint-rule-authoringUse when writing or reviewing the code of a lint rule, analyzer, or codemod that walks a syntax tree, such as an ESLint or oxlint rule, a Clippy lint, or a custom AST check, including a request to "write a rule that bans X". Covers finding the rule's subject by what a name is bound to, reporting a name it cannot trace, and the fixtures that prove both./Other plugins' skills for the same job