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()). Use when authoring the baseline lifecycle spec, or when a deploy leaves users stuck on the old service worker - scoped to the state machine and the `skipWaiting` / `clients.claim` upgrade path, not to general service-worker assertion or cache-strategy patterns.

69

Quality

87%

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

85%

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

A strong, action-first builder skill: executable test cells, a clear step sequence with a CI-gated validation matrix, and clean one-level progressive disclosure. The only real drag is mild verbosity in the spec-semantic callouts.

Suggestions

Trim the 'Per [mdn-*]' prose restatements of API semantics to one-line rationales tied to the specific assertion, since Claude can read the cited MDN pages directly.

Move the long-form state enum recap out of the Overview and rely on the reference link, keeping the overview focused on the failure modes the spec catches.

DimensionReasoningScore

Conciseness

The body is dominated by dense, executable Playwright code, but repeated spec-prose callouts ('Per [mdn-sw], skipWaiting() activates sooner and Clients.claim() claims existing pages') restate API semantics Claude can already look up and could be trimmed without losing the test rationale.

2 / 3

Actionability

Every step ships copy-paste-ready, executable Playwright/TypeScript test code plus a concrete inventory command ('grep -E "skipWaiting|clients\.claim" src/sw.ts > sw-lifecycle-inventory.txt'); no pseudocode is left un-justified.

3 / 3

Workflow Clarity

Steps 1–9 are clearly sequenced, with a coverage matrix whose 'CI gates on every matrix row having at least one passing test' serving as an explicit validation checkpoint, and the Anti-patterns/Limitations sections provide error-recovery feedback.

3 / 3

Progressive Disclosure

SKILL.md is a concise overview of the runnable per-transition cells, with one well-signaled, one-level-deep reference ([references/upgrade-path.md])—verified to exist—holding the coverage matrix and worked upgrade-path spec, keeping navigation shallow and clear.

3 / 3

Total

11

/

12

Passed

Description

85%

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 highly specific, well-scoped description that clearly states both capability and trigger conditions in third person. Its main weakness is jargon-heavy phrasing that underserves the natural-language trigger dimension.

Suggestions

Soften the jargon density in the trigger clause by leading with a user-facing phrase like 'PWA broke after deploy' or 'stale UI after deploy' before the technical detail.

Add a few natural keyword variations ('service worker stuck waiting', 'skip waiting upgrade') to improve trigger-term coverage.

DimensionReasoningScore

Specificity

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

3 / 3

Completeness

Explicitly answers both what ('Output: a Playwright spec file with one test per transition plus a clean upgrade-path test') and when ('Use when authoring the baseline lifecycle spec, or when a deploy leaves users stuck on the old service worker').

3 / 3

Trigger Term Quality

Includes a natural trigger ('when a deploy leaves users stuck on the old service worker') but the bulk is dense technical jargon (ServiceWorkerState enum, ServiceWorkerGlobalScope.skipWaiting) rather than terms a user would naturally say, and it omits common variations like 'PWA broke after deploy'.

2 / 3

Distinctiveness Conflict Risk

Niche is sharply bounded—'scoped to the state machine and the skipWaiting / clients.claim upgrade path, not to general service-worker assertion or cache-strategy patterns'—and explicitly distinguished from the sibling service-worker-tests skill, making wrong-skill triggering unlikely.

3 / 3

Total

11

/

12

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

metadata_version

'metadata.version' is missing

Warning

Total

15

/

16

Passed

Reviewed

Table of Contents