Install any skill in seconds. Free to start, no credit card required.
Get Started Free →vercel/gate-tests
How to use the `@gate` / `@force-gate` test directives instead of `it.skip` or fake-green skip patterns.
Passed 22 of 23 test cases with the skill, and 7 of 23 without it.
and 20 more in the full report
15 fixed7 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
This benchmark measured an earlier version of the skill.
One of 15 test cases the skill fixed. Same model, same prompt, with and without the skill.
I am writing a static force gate on a describe block for a Next.js e2e test fixture that requires production build outputs and cannot work in dev mode. Should I write `// @force-gate prod` or `// @force-gate prefetching` or `// @force-gate !dev`?
| Checked | Without skill | With skill |
|---|---|---|
| Recommends choosing the condition name stating the explicit reason why the suite cannot run. | Missed | Passed |
The instructions your model reads when the skill loads.
@gate / @force-gateFull reference: test/lib/gate/README.md.
This skill is the decision guide: which directive to reach for, the standard
conversion patterns, and how to verify.
| Anti-pattern | Replacement |
|---|---|
it.skip('...') for a known failure | // @gate <cond> (or @gate FIXME if no condition explains it) |
if (isNextDev) { test('skipped in dev mode', () => {}); return } | // @force-gate prefetching (or !dev) on the describe |
(flagEnabled ? describe.skip : describe)(...) keyed on process.env | // @force-gate <cond> (lazy) on the describe |
| Duplicating a fixture directory per flag state | one fixture keyed on __NEXT_TEST_AXIS + a @gate/@force-gate |
Branching expectations on process.env.__NEXT_CACHE_COMPONENTS | if (await gate((c) => c.cacheComponents)) (gate from next-test-utils) |
The skip patterns are fake-greens: nothing tells you when the bug they hide is
fixed. @gate still runs the body and fails the suite the day the "known
failure" starts passing, so stale workarounds get deleted instead of rotting.
Ask what kind of difference you're encoding:
gate() —
same condition registry, no inversion — which pinpoints exactly what
differs, and also covers it.each, where a pragma cannot attach:
if (await gate((c) => c.cacheComponents)) { ... } else { ... }. It
mirrors React's gate(flags => ...); a pragma expression string works
too (await gate('cacheComponents && !dev')). A suite-level pragma is
too coarse here — it hides what is different between the states.cacheComponents, optimisticRouting) and the suite is written for one
state. // @gate <cond> on the test or describe. The body runs; a
false condition inverts the expectation (failure absorbed, a pass fails as
"stale gate"). The off state fails for a meaningful reason — the behavior
differs — so a pass is real information: the gate is stale, delete it.// @force-gate <cond> (lazy) on the describe. An API that throws whentest cases passed, vs 7 / 23 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.