CtrlK
BlogDocsLog inGet started
Tessl Logo

useblocker-bypass-regression-test

Use when writing a Vitest test for a react-router useBlocker unsaved-changes guard in this repo — specifically an intentional-navigation handler (Edit / Submit / Cancel) that uses flushSync(() => setIsNavigating(true)) before navigate() to bypass the blocker. A test that reads the blocker predicate after act() passes even when flushSync is removed, so it does not guard the fix. Trigger on any test touching isNavigating, useBlocker, flushSync, or a *.hooks.js navigation-blocker handler.

75

Quality

94%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

88%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

The body delivers a fully executable navigate-time test technique with a strong mutation-test verification loop and honest scope limits, all well-organized without padding Claude's basic knowledge. Its main weakness is length — the Real-World Impact and some Scope prose could be trimmed for better token efficiency.

Suggestions

Trim or collapse the 'Real-World Impact' section (issue 6061 narrative) into a single line or move it behind the existing sibling-skill cross-link; it is context rather than action.

Tighten the 'Scope and honest limits' prose — the three bullets can be condensed since the Quick Reference table already conveys what each assertion guards.

Consider splitting the full worked test into a reference file if more variants accumulate, to keep SKILL.md a lean overview pointing at executable examples.

DimensionReasoningScore

Conciseness

Dense and assumes Claude's competence (no basic explanations of useBlocker/flushSync/act), but the body is long — the Real-World Impact section and some Scope prose could be trimmed; sits noticeably above the midpoint but with minor over-explanation that could be cut.

4 / 5

Actionability

Fully executable: a complete copy-paste-ready test with mockUseBlocker.mockImplementation, navigateMock.mockImplementation capturing the predicate at navigate-time, act() calls, and the load-bearing 'expect(blockedAtNavigateTime).toBe(false)' assertion, plus the module-level navigateMock requirement.

5 / 5

Workflow Clarity

Clear sequenced workflow with an explicit validation feedback loop — the 'Verify it actually guards (mutation test)' section (replace flushSync → run test MUST fail → run existing suite → restore) provides the validate→fix→retry checkpoints the rubric rewards.

5 / 5

Progressive Disclosure

No bundle files exist; the single file is well-organized into clear sections with one clearly-signaled one-level-deep cross-link to a sibling skill, though the body is fairly long and a couple of inline sections (Real-World Impact) could be condensed for tighter navigation.

4 / 5

Total

18

/

20

Passed

Description

100%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

The description is highly specific and trigger-rich, clearly stating both the precise task and exactly when to apply it in third-person voice. It is one of the stronger examples — concrete actions, natural trigger terms, and low conflict risk all in a single tight sentence.

DimensionReasoningScore

Specificity

Names the exact target (Vitest test for a react-router useBlocker unsaved-changes guard), the specific handler pattern (Edit/Submit/Cancel), and the concrete load-bearing line 'flushSync(() => setIsNavigating(true)) before navigate()' — multiple specific concrete actions with comprehensive coverage.

5 / 5

Completeness

Explicitly answers both 'what' (writing a regression test that guards the flushSync bypass) and 'when' via 'Use when...' and 'Trigger on...' clauses, with third-person voice used correctly throughout.

5 / 5

Trigger Term Quality

Comprehensive natural-term coverage a developer would actually say — 'useBlocker', 'flushSync', 'isNavigating', 'Vitest test', 'navigation-blocker', and the '*.hooks.js' pattern — plus an explicit 'Trigger on any test touching...' clause.

5 / 5

Distinctiveness Conflict Risk

Occupies a clear, narrow niche (react-router useBlocker + flushSync bypass regression test) with triggers unlikely to fire for unrelated skills; minimal conflict risk.

5 / 5

Total

20

/

20

Passed

Validation

93%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation15 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

relative_links

Relative link issues: 1 suspicious

Warning

Total

15

/

16

Passed

Repository
HHS/OPRE-OPS
Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.