Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    PWA Service Worker Strategist

    1

    Design and implement PWA service workers with offline caching, Workbox strategies, and background sync.

    $15

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    PWA Service Worker Strategist

    PWA Service Worker Strategist

    Example session with this skill installed

    I need a service worker for my React app. I want to cache images for a long time but keep API responses fresh. Also, generate the manifest.json.

    • Read your context and instructions
    • Compiled the pwa service worker
    • Generated the app files

    I have generated a Workbox-based service worker configuration and a compliant web app manifest. The setup uses a Stale-While-Revalidate strategy for your API calls to ensure speed without sacrificing freshness, and a Cache-First strategy for images.

    PWA Configuration Files

    service-worker.js

    import { precacheAndRoute } from 'workbox-precaching';
    import { registerRoute } from 'workbox-routing';
    import { CacheFirst, StaleWhileRevalidate } from 'workbox-strategies';
    
    // Precache core app shell
    precacheAndRoute(self.__WB_MANIFEST);
    
    // Cache images with CacheFirst strategy
    registerRoute(
      ({ request }) => request.destination === 'image',
      new CacheFirst({
        cacheName: 'images',
      })
    );
    
    // API calls with StaleWhileRevalidate
    registerRoute(
      ({ url }) => url.pathname.startsWith('/api/'),
      new StaleWhileRevalidate({
        cacheName: 'api-cache',
      })
    );
    
    // Handle updates
    self.addEventListener('message', (event) => {
      if (event.data && event.data.type === 'SKIP_WAITING') {
        self.skipWaiting();
      }
    });
    

    manifest.json

    {
      "short_name": "App",
      "name": "Progressive Web Application",
      "icons": [
        {
          "src": "favicon.ico",
          "sizes": "64x64 32x32 24x24 16x16",
          "type": "image/x-icon"
        },
        {
          "src": "logo192.png",
          "type": "image/png",
          "sizes": "192x192"
        }
      ],
      "start_url": ".",
      "display": "standalone",
      "theme_color": "#000000",
      "background_color": "#ffffff"
    }
    

    Next steps

    1. Register the service worker in your index.js or main.js file.
    2. Ensure the logo192.png and favicon.ico files exist in your public directory.
    3. Test the offline capability using Chrome DevTools Application tab.

    logo192.png

    ZIP · project files

    Generated

    Example file from a real run - the skill writes it into your workspace.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Building reliable offline-first experiences is difficult due to complex caching lifecycles and cache invalidation bugs. This skill provides a structured approach to PWA implementation, handling the boilerplate and architectural decisions for service worker scripts. It ensures your application remains functional without a network connection while maintaining data integrity.

    What it does

    • Formulate Precaching: Generates strategies for core assets like HTML, CSS, JS, and the app shell.
    • Runtime Caching: Configures CacheFirst for assets, StaleWhileRevalidate for APIs, and NetworkFirst for transactions.
    • Update Management: Implements skipWaiting logic and update flows to notify users when new versions are available.
    • Manifest Generation: Creates valid manifest.json files with required icons and display configurations.
    • Debug Lifecycle: Analyzes service worker registration and activation states to resolve installation failures.

    How it works

    1. Analyze Assets: Review the project structure to identify static assets and API endpoints requiring caching.
    2. Strategy Selection: Choose between Workbox-powered or vanilla JavaScript implementations based on project needs.
    3. Script Generation: Generate the service worker logic including event listeners for install, activate, and fetch.
    4. Manifest Creation: Produce the web app manifest and integration code for the main entry point.

    Frameworks & tools

    Specific support for Workbox libraries, vanilla JavaScript Service Worker API, and standard Web App Manifest specifications. It integrates with React, Next.js, and other frontend build systems.

    Why this beats prompting it yourself

    Service worker bugs often lead to "zombie" versions of apps that never update. This skill uses deterministic workflows for skipWaiting and specific runtime strategies, preventing common caching pitfalls that generic prompts miss.

    Use cases

    • Convert an existing React or Next.js app into a compliant PWA.
    • Implement background sync for forms that must submit when connection returns.
    • Optimize load times for image-heavy sites using CacheFirst logic.
    • Set up a robust update notification UI for production deployments.

    Known limitations

    Does not perform global system package installations or root-level configurations. Scope is limited to project-level JS and JSON files.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Frontend & Web Apps.

    Strictly restricted to workspace root. No global package installs. Requires existing web icons for manifest completeness.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 3 days ago

    Software
    Zero global installation
    orelevated privileges required.

    File System Read/Write (strictly scoped to current project workspace `./`).

    Permissions

    Read Files
    Write Files

    Target Use Cases: - Create a service worker with Workbox for offline PWA. - Configure runtime caching strategies for web application. - Generate a complete PWA manifest.json and service worker setup.

    Listed3 days ago

    What's inside

    Frequently Asked Questions

    This skill automates the creation of complex service worker scripts, handling difficult tasks like stale cache invalidation, 'skipWaiting' logic for updates, and background synchronization that are prone to bugs when written manually.

    The strategist is designed for frontend developers using vanilla JavaScript or frameworks like React and Next.js, with specific support for the Workbox library to ensure production-grade reliability.

    You will receive a complete architectural plan including custom-generated service worker logic, a configured web app manifest, and the integration code required for your main entry point.

    While it generates the necessary logic and configuration files for your project, it does not handle root-level server configurations or global package manager installations.

    Yes, it helps you define various strategies such as CacheFirst for static assets and StaleWhileRevalidate for API calls, ensuring your app loads instantly even on slow or non-existent connections.

    New in Frontend & Web Apps