agentleFS
PanPanFRPanPanFR/oh-my-openkilo/skills/pwa-development/SKILL.md

pwa-development

Skill9 starsChanged 3 months agoMITView on GitHub

Progressive Web Apps - service workers, caching strategies, offline, Workbox

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

PWA Development Skill

Build Progressive Web Apps that work offline, install like native apps, and deliver fast, reliable experiences across devices.

This skill uses progressive disclosure: this file has the decision maps and quick references. Detailed patterns live in references/. You MUST read the matching reference file before writing that category of code - do not work from memory of this overview.

The Three Pillars

1. HTTPS            Required for service workers (localhost OK for dev)
2. SERVICE WORKER   Background JS enabling offline, caching, push
3. MANIFEST         JSON metadata enabling installation

Installability (Chrome): HTTPS + service worker with fetch handler + manifest with name, icons 192px+512px, start_url, display standalone/fullscreen/minimal-ui.

Reference Map - load BEFORE coding

TaskRead FIRST
Create/edit manifest.json, icons, shortcuts, share_targetreferences/manifest.md
Write/register a service worker, SW lifecycle, SW updatesreferences/service-worker.md
Choose or implement a caching strategycheat sheet below; details in references/caching-strategies.md
Use Workbox (precaching, runtimeCaching, plugins)references/workbox.md
Offline fallback page, online/offline detection, background syncreferences/offline.md
Install prompt, standalone detection, push notifications, share target handlerreferences/app-capabilities.md
Critical CSS, preload, responsive images, code splittingreferences/performance.md
Next.js / CRA / Vite integrationreferences/frameworks.md
Lighthouse audit, manual QA, pre/post-launch checklists, project layoutreferences/testing-launch.md

Caching Strategy Cheat Sheet

Static assets (CSS, JS, images)  -> Cache First
API responses                    -> Network First
User-generated content           -> Stale While Revalidate
Analytics, non-cacheable         -> Network Only
Offline-only assets              -> Cache Only

Implementations of each: references/caching-strategies.md.

Service Worker Lifecycle

1. Register -> 2. Install -> 3. Activate -> 4. Fetch
     ↓             ↓             ↓             ↓
  Load app    Cache assets   Clean old    Serve requests
                             caches       from cache/network

Common Mistakes

MistakeFix
Missing maskable iconAdd icon with "purpose": "maskable"
No offline fallbackCreate offline.html and cache it
Cache never expiresUse ExpirationPlugin with Workbox
SW caches too aggressivelyAppropriate strategy per resource type
No update mechanismskipWaiting() + reload prompt
Broken install promptEnsure manifest meets all criteria
No HTTPS in productionConfigure SSL certificate
Large cache sizeSet maxEntries and maxAgeSeconds
Stale API responsesNetworkFirst for dynamic data
Missing start_url trackingAdd query param: /?source=pwa

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.