CtrlK
BlogDocsLog inGet started
Tessl Logo

testland/service-worker-lifecycle-tests

Build-an-X workflow that emits per-SW state-transition tests covering the six `ServiceWorkerState` values per [w3c-github-io/ServiceWorker][sw-spec] (`parsed → installing → installed → activating → activated → redundant`), the `install` / `activate` / `fetch` event handlers per [MDN Service Worker API][mdn-sw], `event.waitUntil()` lifetime extension, `ServiceWorkerGlobalScope.skipWaiting()` and `Clients.claim()` upgrade-path semantics, the `statechange` event on `ServiceWorker` objects, `ServiceWorkerRegistration.update()`, and `navigator.serviceWorker.controller` checks. Output: a Playwright spec file with one test per transition plus a clean upgrade-path test (v1 active → v2 installed/waiting → v2 activated, with claim()). The general Playwright SW harness, `service-worker-mock` unit tests, and cache-strategy assertions live in references/. Use when authoring the baseline lifecycle spec, when a deploy leaves users stuck on the old service worker, or when a site's caching / offline behavior is uncovered.

65

Quality

82%

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

Overview
Quality
Evals
Security
Files

Quality

Content

67%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 well-structured, highly actionable test-generation skill with executable per-transition code cells and a clear coverage matrix. Its main weakness is conciseness — repeated MDN-prose re-explanations of basic service-worker semantics — plus a broken bundle reference and a couple of described-but-not-provided fixtures.

Suggestions

Trim the 'Per [mdn-sw]/[mdn-skipwaiting]/[mdn-claim]' explanatory sentences that re-state what skipWaiting(), claim(), and controller do; Claude already knows these, so keep only the assertion-rationale tie-in.

Provide the slow-install fixture (tests/fixtures/sw-slow-install.js) inline and specify or stub the version-flipping test-server mechanism so the v1→v2 tests are fully runnable as written.

Fix or remove the references/install-flow-reference.md link under 'Composes with' (the file is absent from references/), and clarify which composes-with entries are sibling skills versus bundled files.

DimensionReasoningScore

Conciseness

Mostly efficient but includes unnecessary re-explanation of concepts Claude already knows — e.g. 'Per [mdn-sw], skipWaiting() activates sooner and Clients.claim() claims existing pages', 'a hard-reload (Ctrl+Shift+R) bypasses the SW', and the Overview restating the six states — which could be tightened without losing the test rationale.

3 / 5

Actionability

Provides eight concrete, copy-paste-ready Playwright TypeScript test blocks plus a grep inventory command and a coverage YAML stub; minor gaps are the assumed version-flipping test server ('the test server flips the SW response based on a query param header') and the slow-install fixture, which is described rather than fully coded.

4 / 5

Workflow Clarity

A clear 9-step sequence (inventory → eight test cells → emit artifact) with a coverage-matrix verification checkpoint ('CI gates on every matrix row having at least one passing test') and an anti-patterns table for error recovery; lacks an explicit run-tests-then-fix-failures feedback loop, which keeps it just below a 5.

4 / 5

Progressive Disclosure

Good structure with a clear overview and well-signaled one-level-deep references to real bundle files (playwright-sw-harness.md, upgrade-path.md, advanced-service-worker-tests.md); the gap is the 'Composes with' pointer to references/install-flow-reference.md, a file that does not exist in the bundle.

4 / 5

Total

15

/

20

Passed

Description

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

A dense, highly specific description that explicitly covers both capabilities and trigger conditions for a well-scoped service-worker lifecycle testing skill. It is slightly jargon-heavy, which keeps trigger-term naturalness just short of comprehensive.

DimensionReasoningScore

Specificity

Lists multiple concrete actions with comprehensive coverage — 'emits per-SW state-transition tests', 'event.waitUntil() lifetime extension', 'ServiceWorkerGlobalScope.skipWaiting() and Clients.claim() upgrade-path semantics', 'ServiceWorkerRegistration.update()', 'navigator.serviceWorker.controller checks', plus a concrete output artifact ('a Playwright spec file with one test per transition plus a clean upgrade-path test').

5 / 5

Completeness

Explicitly answers both 'what' ('Build-an-X workflow that emits per-SW state-transition tests... Output: a Playwright spec file...') and 'when' ('Use when authoring the baseline lifecycle spec, when a deploy leaves users stuck on the old service worker, or when a site's caching / offline behavior is uncovered') with concrete trigger phrases.

5 / 5

Trigger Term Quality

Good natural keyword coverage ('service worker', 'lifecycle', 'deploy leaves users stuck on the old service worker', 'caching / offline behavior') with synonyms, but the description is heavily technical and omits common user-facing variations/file extensions that would push it to a 5.

4 / 5

Distinctiveness Conflict Risk

Clear niche — per-SW state-transition lifecycle testing keyed to the six ServiceWorkerState values — with distinct triggers and minimal conflict risk; even sibling builders (workbox-tests, offline-fallback-tests) cover adjacent but non-overlapping surfaces.

5 / 5

Total

19

/

20

Passed

Validation

87%

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

Validation14 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

metadata_version

'metadata.version' is missing

Warning

referenced_paths_exist

Referenced path issues: 1 missing

Warning

Total

14

/

16

Passed

Reviewed

Table of Contents