offline-first-pwa

Develop Progressive Web Apps with service workers and IndexedDB for offline functionality.

6|1|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/RepairYourTech/cfsa-antigravity --skill offline-first-pwa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: offline-first-pwa
Source: https://github.com/RepairYourTech/cfsa-antigravity/tree/main/.agent/skill-library/surface/web/offline-first-pwa
Command: npx skills add https://github.com/RepairYourTech/cfsa-antigravity --skill offline-first-pwa

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires idb, workbox, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill enables the creation of Progressive Web Apps (PWAs) that function reliably even without an active internet connection, offering a seamless user experience akin to native applications.

Core Features & Use Cases

  • Offline Support: Ensures core functionality and content are accessible offline using service workers and caching strategies.
  • Background Sync: Allows actions taken offline to be queued and synchronized when connectivity is restored.
  • Push Notifications: Enables real-time updates and engagement through push notifications.
  • Local Persistence: Utilizes IndexedDB for robust local data storage.
  • Use Case: Develop an e-commerce PWA where users can browse products, add items to their cart, and even complete purchases while offline, with all actions syncing automatically once they reconnect.

Quick Start

Implement offline-first PWA capabilities by registering a service worker and defining cache strategies for your web application.

Frequently Asked Questions about offline-first-pwa

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make a web application work offline using a service worker?

Make a web application work offline by registering a service worker to intercept network requests and serve cached assets. This Skill implements advanced cache strategies like cache-first and stale-while-revalidate to ensure reliable offline functionality.

What is the best way to sync IndexedDB data when network connectivity is restored?

Sync IndexedDB data when connectivity returns by using background sync. This Skill queues offline user actions and automatically synchronizes them with the server once the network is restored, ensuring no data is lost.

Can I use Workbox to implement push notifications in a PWA?

Yes, you can use Workbox alongside service workers to implement push notifications in a PWA. This Skill provides the implementation logic for real-time updates and native-like user engagement through push notifications.

How do I cache dynamic API requests for an offline-first PWA?

Cache dynamic API requests for an offline-first PWA by applying network-first or stale-while-revalidate strategies. This Skill configures service workers to manage these caching strategies, balancing fresh data with offline availability.

Does this approach support queuing offline transactions for e-commerce apps?

Yes, this approach supports queuing offline transactions for e-commerce apps. This Skill enables users to browse, add items to carts, and complete purchases offline, syncing all actions automatically upon reconnection via IndexedDB and background sync.

When should I not use a stale-while-revalidate cache strategy?

You should not use a stale-while-revalidate cache strategy when serving time-sensitive transactional data. This Skill addresses varying network conditions by offering multiple strategies, allowing you to switch to network-first for critical, up-to-date information.