CtrlK
BlogDocsLog inGet started
Tessl Logo
PluginPublic

statelyai/model-based-testing

Write model-based tests with @xstate/test 2.0 beta, replace end-to-end tests with model-based tests without losing coverage, and visualize the model in Stately. Use for model-based testing, @xstate/test, generating tests from a state machine, testing every path, replacing Playwright, Cypress, Vitest, or Jest end-to-end tests with a model, coverage parity, or migrating from @xstate/test 0.x or 1.0 beta.

Quality

100%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Medium

Suggest reviewing before use

Overview
Quality
Evals
Security
Files

Quality

Scored by GLM 5.3

Content

100%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.

A tightly written, expert-level skill body: every line is a rule, command, or version-specific gotcha that Claude could not infer, with copy-paste executable code and rigorously validated workflows (parity gates, negative controls, CI requirements). Detail is appropriately pushed into a single well-anchored reference file and scripts, keeping the main file navigable despite its complexity.

DimensionReasoningScore

Conciseness

The body is dense with non-obvious rules and gotchas (function-transition coverage ids, `as const` literal widening, `failureStore.load is not a function`) and explains nothing Claude already knows — no preamble about what state machines or model-based testing are. Time-sensitive content is properly scoped: "Known issues in `2.0.0-beta.3` (check for a fixed release first)" is version-pinned with an explicit freshness check, so every token earns its place rather than drifting toward staleness.

5 / 5

Actionability

Fully executable throughout: `npx playwright test --list --reporter=json > e2e-inventory.playwright.json`, the npm-pack tarball fallback, `node <skill-dir>/scripts/parity-check.mjs --init`, a complete copy-paste `reportCoverage` TypeScript snippet, and exact gates like `assertTestCoverage(coverage, { transitions: 1, stateNodes: 1, unknown: 'fail' })`. Even prose guidance is concrete ("Model an input by its kind in `cases` (`{ username: 'empty' }`)"), so there are no gaps that would drop it to 4.

5 / 5

Workflow Clarity

Both multi-step workflows ("Write a model test", "Replace end-to-end tests") are numbered with explicit validation checkpoints and feedback loops: "Require exit 0 before replacing tests", fault-injection negative controls ("Confirm the replay first diverges at the assertion's step ... Revert each fault"), "On `Path diverged`, fix the model or adapter, not the ledger", and deletion is gated ("Delete a legacy test only after its parity entry passes the check and its negative controls"). This matches the top anchor — clear sequence, explicit validation, error-recovery loops — and fully satisfies the destructive/batch-operation cap.

5 / 5

Progressive Disclosure

Heavy reference material (ledger format, execution evidence, path planning) is split into references/parity-ledger.md and linked with specific, verified working anchors (#fresh-browser-contexts, #plan-fewer-paths, #execution-evidence); scripts are invoked by path (`scripts/parity-check.mjs`, `scripts/coverage-viewer.mjs`, both present). References are one level deep and clearly signaled, and the inline content is workflow and API usage rather than deferred reference material — matching the clear-overview anchor rather than the minor-organization-gaps of 4.

5 / 5

Total

20

/

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.

An exemplary description: three concrete capabilities followed by an explicit trigger clause covering synonyms, tool names, and migration versions. It answers what and when with no fluff, stays in third-person/ imperative voice, and is clearly distinguishable from generic testing skills.

DimensionReasoningScore

Specificity

Names three concrete capabilities — "Write model-based tests with @xstate/test 2.0 beta", "replace end-to-end tests with model-based tests without losing coverage", and "visualize the model in Stately" — with no vague or padded language. This matches the top anchor (multiple specific concrete actions, comprehensive coverage); the remaining body capability, migration, is also surfaced via the trigger clause, so there are no coverage gaps that would justify 4.

5 / 5

Completeness

Explicitly answers both questions: what ("Write model-based tests with @xstate/test 2.0 beta, replace end-to-end tests ... without losing coverage, and visualize the model in Stately") and when ("Use for model-based testing, @xstate/test, generating tests from a state machine, ..."). This is the score-5 anchor verbatim in structure — clear what AND when with concrete trigger phrases — not merely the implicit or partial pairing of the 4 anchor.

5 / 5

Trigger Term Quality

The "Use for" clause lists natural phrasings a user would actually say: "model-based testing", "@xstate/test", "generating tests from a state machine", "testing every path", "replacing Playwright, Cypress, Vitest, or Jest end-to-end tests with a model", "coverage parity", and "migrating from @xstate/test 0.x or 1.0 beta". Coverage includes synonyms, competing tool names, and migration versions — comprehensive rather than just good.

5 / 5

Distinctiveness Conflict Risk

The skill occupies a clear niche (@xstate/test model-based testing) with distinct triggers. Mentions of Playwright, Cypress, Vitest, and Jest are constrained by "replacing ... end-to-end tests with a model", so the description is unlikely to fire for a generic request to merely write Playwright tests — minimal conflict risk.

5 / 5

Total

20

/

20

Passed

Validation

100%

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

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Reviewed

On this page