Skip to content
Back to skills

Progressive Web App

ASecurity

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.

  • 222 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added February 7, 2026
developmentjavascriptjavaapi

Works with

  • api

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add secondsky/claude-skills --skill progressive-web-app --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Progressive Web App?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Progressive Web App
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/secondsky-progressive-web-app/badge)](https://www.skillsdirectory.com/skills/secondsky-progressive-web-app)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…