Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add secondsky/claude-skills --skill progressive-web-app -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/progressive-web-app/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/progressive-web-app/

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.

From the same set94

api-authentication A skill that helps your coding agent write API authentication: JWT, OAuth 2.0, API keys, sessions and security headers. CX Codex +1 533installs web-performance-audit A skill that audits page speed: pulls Core Web Vitals, finds bottlenecks and points at what to fix. Useful when LCP or CLS drifts out of range. CX Codex +1 526installs kpi-dashboard-design A skill that guides the agent through KPI dashboard design: metric choice, layout, chart types and status colors. Useful when you build analytics views for leadership. CX Codex +1 507installs bun-sveltekit Tells the agent how to build and run SvelteKit apps on Bun: SSR, adapters, bun:sqlite and file handling. CX Codex +1 499installs bun-sqlite A skill that tells your agent how to write bun:sqlite code: queries, prepared statements, transactions and parameters. CX Codex +1 495installs architecture-patterns A skill that gives your agent backend architecture templates: Clean Architecture layers, ports and adapters, and Domain-Driven Design building blocks. CX Codex +1 493installs api-rate-limiting A skill that walks you through rate limiting an API with token bucket, sliding window and Redis-backed counters. Useful when you open an endpoint to the public or split access by plan. CX Codex +1 491installs design-system-creation A skill that walks the agent through building a design system: tokens, typography, components and their docs. Useful when UI standards need to be settled before code. CX Codex +1 481installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor