frontend-pwa
Skill1 starsChanged 11 days agoMITView on GitHub
Build installable, offline-first web apps for all devices with native migration via Capacitor. Triggers: PWA, offline, installable, hybrid. Do NOT use for server-rendered websites.
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Built on
engineering-fundamentals: Read that skill first. This document adds PWA-specific implementation. - Distinctive: line 49
If context exists → Resume from detected phase.
- Distinctive: line 70
Offline: Must work without internet?
- Very specific: line 78
Read guides/DISCOVERY-GUIDE.md for complete PWA checklist.
- Very specific: line 120
Touch: No hover-only interactions.
- Distinctive: line 122
Device agnostic: Test 280px→3840px. Container queries for component layouts.
- Distinctive: line 123
Offline-first: Never assume internet. Cache critical assets.
- Very specific: line 141
Read design/DESIGN-LOCK.md and design/approved/
- Distinctive: line 184
No service worker or manifest.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Frontend PWA
Built on engineering-fundamentals. Read that skill first. This document adds
PWA-specific implementation.
When to Use
- Web app with offline functionality
- Installable experience (add to homescreen)
- Cross-device (phone, tablet, foldable, TV, desktop)
- Future native distribution via Capacitor/Ionic
When NOT to Use
- Simple marketing sites with no offline needs (use
frontend-web) - Pure native apps (use
frontend-mobile)
Output Contract
| Artifact | Format | Location | Quality Criteria |
| PWA application | Source code + service worker + manifest | Project source directory | Offline-capable, installable, cross-device responsive |
Context Persistence Check
Before starting work:
- Check
design/DESIGN-LOCK.md:- Exists and < 7 days → Read it. Extract direction, palette, typography, key decisions.
7 days → Read it, ask: "Still valid?"
- Missing → Proceed with Phase 1.
- Check
SPEC.md:- Exists → Read it. Respect locked stack and boundaries.
- Missing → If non-trivial, invoke
spec-driven-development.
- If context exists → Resume from detected phase. Do NOT re-run discovery unless user requests changes.
Stack Detection
Check for STACK_CONFIG.md:
- Exists → Adapt examples to chosen stack.
- Missing → Default to Next.js 16 + Tailwind v4 + Workbox + Capacitor 6.
Core Process
Phase 0 — Language Detection
→ See engineering-fundamentals Phase 0.
Phase 1 — Discovery Gate
→ See engineering-fundamentals Phase 1 for universal discovery.
PWA-specific questions:
- Offline: Must work without internet? Which parts?
- Installable: Installable from browser?
- Native migration: Future App Store / Google Play?
- Devices: Mobile only, or tablet, desktop, TV?
- Touch vs mouse: Users touch or use mouse?
- Push notifications: Needed?
- Background sync: Sync when connection returns?
Read guides/DISCOVERY-GUIDE.md for complete PWA checklist.
Phase 2 — Write Contracts
→ See engineering-fundamentals Phase 2.
PWA-specific additions:
- SPEC.md must include: Offline strategy, Install requirements, Device matrix, Native bridge needs.
Phase 3 — Three Dials System
→ See engineering-fundamentals/guides/DESIGN-CORE.md for the universal Three Dials System (VARIANCE, MOTION, DENSITY), vibe→dial inference, color principles, and dark mode protocol.
Apply dials with PWA constraints: MOTION uses web APIs (Framer Motion + CSS), DENSITY must work across 280px→3840px viewports, VARIANCE collapses at mobile breakpoints.
Phase 4 — Stack Lock-in
| Tool | Minimum | Notes |
| Node.js | 20.9+ | |
| Next.js | 16.1.1+ | App Router |
| React | 19.2+ | |
| TypeScript | 5.7+ | |
| Tailwind CSS | v4 | @theme in CSS |
| Workbox | 7+ | Service worker generation |
| Capacitor | 6+ | Native bridge (optional, if migration planned) |
| Vite PWA | 0.20+ | If using Vite |
Optional: next-pwa, @capacitor/core + plugins.
Phase 5 — Anti-Slop Rules (PWA)
→ See engineering-fundamentals/guides/ANTI-SLOP-CORE.md for universal AI tells, content density, copy protocol, and UI state requirements.
PWA-specific:
- Touch: No hover-only interactions. Targets ≥44px (iOS) / 48dp (Android).
@media (hover: hover)for hover conditionally. - Viewport: No
100vhon mobile. Use100dvh. - Device agnostic: Test 280px→3840px. Container queries for component layouts.
- Offline-first: Never assume internet. Cache critical assets. Show stale data while syncing.
Phase 6 — Universal Responsive
→ See guides/DEVICE-MATRIX-GUIDE.md for device matrix, container queries, touch vs mouse patterns.
Phase 7 — PWA Architecture
→ See guides/PWA-ARCHITECTURE-GUIDE.md for service worker, manifest, offline pages, native migration path.
Phase 8 — Build with Tokens
- Read
design/DESIGN-LOCK.mdanddesign/approved/ - Apply tokens to
globals.css manifest.json/manifest.ts- Service worker registration
- Capacitor config (if migration planned)
- Viewport units:
dvhwhere appropriate
Phase 9 — QA Gates
→ See engineering-fundamentals Phase 5 for universal gates. Read engineering-fundamentals/guides/PRE-FLIGHT-CORE.md for universal checks first.
After QA gates, log metrics:
LOG METRIC: gate
- project: [detect from git remote or directory]
- gate_name: frontend-pwa-qa
- result: pass/fail
- checks_passed: [N]/20PWA-specific checks (13-20):
- Offline test — Disable network. App loads, cached data visible.
- Install test — Lighthouse PWA audit passes.
- Device matrix — Tested 375px, 768px, 1024px, 1920px.
- Touch targets — Interactive elements ≥44px / 48dp.
- No hover-only — Every hover has touch equivalent.
- Viewport safe — No
100vhwithout100dvhfallback. - Foldable — Layout works on 280px, survives foldable transitions.
- Capacitor ready — If migration planned,
npx cap syncsucceeds.
Examples & Troubleshooting
→ Read guides/EXAMPLES.md.
Red Flags
- No service worker or manifest.
100vhwithout100dvhfallback.- Hover-only without touch alternatives.
- No offline page.
- No container queries.
- Untested on tablet/desktop.
DESIGN.md Output
Fills sections 13-17 for PWA. Next.js 16 + React 19. CSS vars in :root, data-theme + prefers-color-scheme. Manifest with standalone display. Workbox 7 SW, Capacitor 6 native bridge. Device matrix 280–3840px. Touch + mouse. Offline-first. next/font + next/image.
Verification
manifest.jsonwithdisplay: standalone.- Service worker registered.
- Offline page exists.
- No
100vhwithout100dvh. - Container queries used.
- Touch targets ≥44px.
- Hover guarded with
@media (hover: hover). - Tested on ≥4 breakpoints.
- Capacitor config if migration planned.
In this repository59 other files it gives its agents.
- AGENTS.mdAGENTS.md
- templates/CLAUDE.mdCLAUDE.md
- adapt-skillSkill
- api-and-interface-designSkill
- architecture-analysisSkill
- audit-skillSkill
- backend-api-masterySkill
- browser-testing-with-devtoolsSkill
- ci-cd-and-automationSkill
- clarify-skillSkill
- cli-toolsSkill
- code-review-and-qualitySkill
- code-simplificationSkill
- context-engineeringSkill
- critique-skillSkill
- customize-opencodeSkill
- debugging-and-error-recoverySkill
- debugging-three-strikesSkill
- delight-skillSkill
- deprecation-and-migrationSkill
- dev-environment-auditSkill
- documentation-and-adrsSkill
- doubt-driven-developmentSkill
- engineering-fundamentalsSkill
- frontend-desktopSkill
- frontend-mobileSkill
- frontend-ui-engineeringSkill
- frontend-webSkill
- fullstack-shippingSkill
- gateSkill
- git-init-and-versioningSkill
- git-workflow-and-versioningSkill
- hard-skillSkill
- idea-refineSkill
- incremental-implementationSkill
- industrial-brutalist-uiSkill
- interview-meSkill
- minimalist-uiSkill
- multi-agent-orchestrationSkill
- observability-and-instrumentationSkill
- optimize-skillSkill
- output-skillSkill
- performance-optimizationSkill
- planning-and-task-breakdownSkill
- polish-skillSkill
- project-health-checkSkill
- project-metricsSkill
- redesign-skillSkill
- security-and-hardeningSkill
- self-improvementSkill
- shipping-and-launchSkill
- skill-creatorSkill
- skill-improverSkill
- soft-premium-uiSkill
- source-driven-developmentSkill
- spec-driven-developmentSkill
- test-driven-developmentSkill
- typeset-skillSkill
- user-onboardingSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

