progressive-web-app · secondsky — Claude Code skill: PWA and offline
A skill for building installable web apps: manifest, service worker, offline support and an install prompt.
npx skills add secondsky/claude-skills --skill progressive-web-app -a claude-codeWhat progressive-web-app does
The skill hands your agent ready-made PWA snippets. Inside are a manifest.json example with start_url, display: standalone and 192x192 plus 512x512 icons, a service worker with an app-v1 cache and a cache-first strategy, a beforeinstallprompt handler for the install button, and a push subscription through pushManager with a VAPID key.
The agent takes those pieces and wires them into your project: registers the worker, fills the static asset list, adds an offline fallback. A seven-item checklist comes along — HTTPS, manifest, worker registration, offline page, responsive layout, load under 3s on 3G, installability.
HTTPS is not optional here. Without it the service worker never registers and beforeinstallprompt stays silent. Push needs a public VAPID key, or the subscribe call fails. If you already run your own worker, the template overwrites the fetch handler — worth checking that your existing cache strategies survive.
What it helps with
- build a manifest with icons and a start_url
- register a service worker without breaking the cache
- show a custom install button instead of the browser banner
- subscribe users to push notifications
- add an offline fallback page
Example prompts for the agent
- add PWA support: manifest, service worker and an offline page
- wire up an install button with beforeinstallprompt
- set up push subscriptions with a VAPID key
How to install progressive-web-app
1Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill progressive-web-app -a claude-code2Manually: put the files in place
~/.claude/skills/progressive-web-app/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/progressive-web-app/
1Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill progressive-web-app -a codex2Manually: put the files in place
.agents/skills/progressive-web-app/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill progressive-web-app -a cursor2Manually: put the files in place
.cursor/skills/progressive-web-app/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install secondsky/claude-skills progressive-web-app2Manually: put the files in place
.github/skills/progressive-web-app/SKILL.md1Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill progressive-web-app -a gemini-cli2Platform CLI
gemini skills install https://github.com/secondsky/claude-skills --path plugins/progressive-web-app/skills/progressive-web-appManually: put the files in place
.devin/skills/progressive-web-app/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add secondsky/claude-skills --skill progressive-web-app -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about progressive-web-app
How do I install progressive-web-app in Claude?
Run npx skills add secondsky/claude-skills --skill progressive-web-app -a claude-code. The skill file then lives at ~/.claude/skills/progressive-web-app/SKILL.md.
What does the progressive-web-app skill do?
It gives the agent templates for the manifest, service worker, install prompt and push subscription so it can build an installable web app with offline support.
What does offline mode and installability require?
HTTPS — without it the service worker will not register. Push notifications also need a public VAPID key.
Source text
SKILL.md · MIT
---
name: progressive-web-app
description: Progressive Web Apps with service workers, web manifest, offline support, installation prompts. Use for installable web apps, offline functionality, push notifications, or encountering service worker registration, cache strategy, manifest configuration errors.
license: MIT
---
# Progressive Web App (PWA)
Build web applications that work like native apps with offline support and installability.
## Web App Manifest
```json
{
"name": "My Application",
"short_name": "MyApp",
"start_url": "/",
"display": "standalone",
"background_color": "#ffffff",
"theme_color": "#000000",
"icons": [
{ "src": "/icon-192.png", "sizes": "192x192", "type": "image/png" },
{ "src": "/icon-512.png", "sizes": "512x512", "type": "image/png" }
]
}
```
## Service Worker
```javascript
const CACHE_NAME = 'app-v1';
const STATIC_ASSETS = ['/', '/index.html', '/styles.css', '/app.js'];
// Install
self.addEventListener('install', event => {
event.waitUntil(
caches.open(CACHE_NAME).then(cache => cache.addAll(STATIC_ASSETS))
);
});
// Fetch with cache-first strategy
self.addEventListener('fetch', event => {
event.respondWith(
caches.match(event.request).then(cached => {
if (cached) return cached;
return fetch(event.request).then(response => {
if (response.status === 200) {
const clone = response.clone();
caches.open(CACHE_NAME).then(cache => cache.put(event.request, clone));
}
return response;
});
})
);
});
```
## Install Prompt
```javascript
let deferredPrompt;
window.addEventListener('beforeinstallprompt', e => {
e.preventDefault();
deferredPrompt = e;
showInstallButton();
});
async function installApp() {
if (!deferredPrompt) return;
deferredPrompt.prompt();
const { outcome } = await deferredPrompt.userChoice;
console.log('Install outcome:', outcome);
deferredPrompt = null;
}
```
## Push Notifications
```javascript
async function subscribeToPush() {
const registration = await navigator.serviceWorker.ready;
const subscription = await registration.pushManager.subscribe({
userVisibleOnly: true,
applicationServerKey: VAPID_PUBLIC_KEY
});
await sendSubscriptionToServer(subscription);
}
```
## PWA Checklist
- [ ] HTTPS enabled
- [ ] Web manifest configured
- [ ] Service worker registered
- [ ] Offline fallback page
- [ ] Responsive design
- [ ] Fast loading (<3s on 3G)
- [ ] Installable
© secondsky · MIT · secondsky/claude-skills
Similar skills
Everything for Frontend and UI →progressive-web-app by other authors comes first.