用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/mikailustuner/OmniRule --skill pwa-patterns命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Bun runtime: HTTP server, file I/O, SQLite, test runner, package manager, bundler — all-in-one JS toolchain.
Clerk: Drop-in auth UI, Organizations, User management, JWT templates, webhooks, Next.js middleware integration.
Gelişmiş masaüstü, tarayıcı ve işletim sistemi kontrol yeteneği. Görsel (koordinat tabanlı) fare/klavye otomasyonu, DOM manipülasyonu, pencere yönetimi, gelişmiş dosya, ağ ve süreç yönetimini kapsar.
基于 SOC 职业分类
正在显示 SKILL.md
| name | pwa-patterns |
| description | Service workers, offline strategy, manifest |
| triggers | {"filenames":["manifest.json","service-worker.js","sw.js"],"keywords":["PWA","service worker","offline","manifest","cache strategy","install prompt"]} |
| auto_load_when | Building Progressive Web App features |
| agent | frontend-ops |
| tools | ["Read","Write","Bash"] |
Focus: Service workers, offline strategies, web manifest
When to use service worker:
├── Offline support → yes
├── Background sync → yes
├── Push notifications → yes
└── Performance → yes (caching)
When to register:
├── After user consent → prompt
├── Page loaded → yes
└── HTTPS required → yes
When to use Cache First:
├── Static assets → yes
├── Versioned files → yes
├── Offline-ready → yes
└── Always available → yes
When to use Network First:
├── API requests → yes
├── Dynamic content → yes
├── Live data required → yes
└── Always fresh if possible
When to use Stale-While-Revalidate:
├── Balanced → yes
├── Performance + freshness → yes
└── Non-critical → yes
When to use Network Only:
├── Real-time data → yes
├── Authentication → yes
└── Live updates → yes
When full offline:
├── Core functionality → yes
├── Productivity app → yes
├── Critical path → yes
└── Content-first app → yes
When partial offline:
├── Some features work → yes
├── Read cache, write queue → yes
├── Best experience → yes
└── Not all needed → yes
When online only:
├── Real-time essential → yes
├── No offline needed → yes
└── Ephemeral data → yes
When to use standalone:
├── Native-like app → yes
├── Remove browser UI → yes
└── Full screen → yes
When to use minimal-ui:
├── Some browser UI → yes
├── Navigation needed → yes
└── Trust + URL visible → yes
Icon requirements:
├── 192x192 → yes
├── 512x512 → yes
└── Maskable → yes (all sizes)
When to use theme_color:
├── Branded experience → yes
└── Status bar → match
When to show install:
├── Before engagement → no
├── User engaged → yes
├── Deferred → prompt-event
└── No multiple → track shown
Before prompt:
├── Use app features → yes
├── Create local data → yes
├── Show value → yes
└── User ready → yes
When to use background sync:
├── Queue requests offline → yes
├── Important actions → yes
└── User returns online → yes
When to queue:
├── Form submissions → yes
├── Saves → yes
└── Important → yes
When not to queue:
├── Non-essential → skip
├── Real-time verification → skip
└── Session-based → skip
❌ Caching everything with no versioning strategy
✅ Version cache names; clean up old caches on activate
❌ Service worker that never updates
✅ skipWaiting() + clients.claim() for instant updates
❌ Offline page that just says "You're offline"
✅ Cache critical routes; serve stale while revalidating
❌ Installing service worker on localhost only
✅ Test on HTTPS staging; SW requires secure context in prod
❌ No install prompt UI — users don't know app is installable
✅ Capture beforeinstallprompt, show custom install button
| Capability | API | Required for |
|---|---|---|
| Offline | Cache API + Service Worker | Core PWA |
| Install prompt | beforeinstallprompt | App store feel |
| Push notifications | Push API + Notification API | Re-engagement |
| Background sync | Background Sync API | Offline mutations |
| Periodic sync | Periodic Background Sync | Content refresh |
| Web manifest | manifest.json | Installability |
| App shell | Precache + runtime cache | Fast load |