pwa-service-worker
Installation
SKILL.md
Service Worker PWA (Next.js)
Overview
Use this skill to build or fix a production-ready PWA in Next.js App Router with explicit service worker lifecycle, robust caching strategies, offline support, push notifications, and safe deployment behavior.
Workflow
- Inspect existing Next.js PWA files and routing mode.
- Implement manifest, icon set, and platform-specific meta tags.
- Implement service worker registration, lifecycle management, and
public/sw.js. - Choose and implement caching strategies based on resource types.
- Implement offline fallback and, optionally, Background Sync.
- Implement push subscriptions with Server Actions when needed.
- Add update notification UX so users get new versions.
- Secure service worker delivery and validate in HTTPS.
- Debug and troubleshoot with DevTools.