pwa-offline-first-expert

pwa-offline-first-expert is a skill for Claude Code, Codex from roedyrustam/vibes-plug. It costs 66 tokens per session (2,008 once invoked), scanned A, original, MIT.

A guide to building web apps that read and write local data first and synchronize later. It covers progressive web apps, which are websites that can behave more like installed apps, plus offline storage and conflict handling between devices.

In plain words
What is it for?
Use it for offline field tools, mobile dashboards, transit apps, multi-device synchronization, and installable web applications.
Why use it?
It helps apps remain usable without a network and reconcile changes made on multiple devices. It also addresses packaging a web app for app-store distribution.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for offline field tools, mobile dashboards, transit apps, multi-device synchronization, and installable web applications.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/roedyrustam/vibes-plug/pwa-offline-first-expert
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add roedyrustam/vibes-plug --skill pwa-offline-first-expert
Clone the repo
git clone --depth 1 https://github.com/roedyrustam/vibes-plug

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pwa-offline-first-expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/pwa-offline-first-expert/github.svg)](https://agentmods.dev/skills/roedyrustam/vibes-plug/pwa-offline-first-expert)
Your own site
<a href="https://agentmods.dev/skills/roedyrustam/vibes-plug/pwa-offline-first-expert"><img src="https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/pwa-offline-first-expert/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pwa-offline-first-expert

Your own site · 80×15
<a href="https://agentmods.dev/skills/roedyrustam/vibes-plug/pwa-offline-first-expert"><img src="https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/pwa-offline-first-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,008 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00066 $0.02008
Opus 5 $0.00033 $0.01004
Sonnet 5 $0.00013 $0.00402
Haiku 4.5 $0.00007 $0.00201

Measured today against content hash da4e154d2976, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

pwa-offline-first-expert scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const fetchPromise = fetch(request)
skills/pwa-offline-first-expert/SKILL.md · 227 lines

How it starts

The opening of the file, as written. The whole thing — 227 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PWA & Offline-First Expert (2026 Edition)

English | Bahasa Indonesia


English

Description

Expert guide for building enterprise-grade Local-First and Progressive Web Applications (PWA). Eliminates loading spinners by reading and writing to local databases (OPFS SQLite, RxDB, IndexedDB) first, replicating seamlessly in the background with zero conflict (CRDTs, ElectricSQL, PowerSync), and packaging to native stores via PWABuilder.

Trigger Conditions

  • Applications requiring full offline functionality (field operations, mobile dashboards, transit apps).
  • User experience demands 0ms local read/write latency without loading spinners.
  • Multi-device sync architecture with automatic conflict resolution.
  • Packaging web apps for distribution on Google Play Store, iOS Safari PWA, or Microsoft Store.

1. The Local-First Principles (2026 Standard)

  1. No Spinners for Local Data: UI reads and writes to local storage (OPFS / IndexedDB) synchronously. Latency is always 0ms.
  2. Multi-Device Conflict-Free Replication: Changes replicate in the background using CRDTs or central event logs (ElectricSQL / PowerSync).
  3. Network is an Enhancement: App is 100% functional on an airplane or subway without internet.
  4. User Owns Their Data: Data persists on client hardware first; cloud server is a backup/sync relay.

2. Production Recipe: Service Worker Caching (Workbox v7 / Native SW)

// sw.ts - Production Service Worker with Stale-While-Revalidate
/// <reference lib="webworker" />
declare const self: ServiceWorkerGlobalScope;

const CACHE_NAME = 'app-v2.11.0-cache';
const STATIC_ASSETS = [
  '/',
  '/index.html',
  '/manifest.json',
  '/styles/global.css',
  '/icons/icon-512x512.png',
];

// 1. Install & Pre-cache critical application shell
self.addEventListener('install', (event) => {
  event.waitUntil(
    caches.open(CACHE_NAME).then((cache) => cache.addAll(STATIC_ASSETS))
  );
  self.skipWaiting();
});

// 2. Activate & Clean stale caches
self.addEventListener('activate', (event) => {
  event.waitUntil(
    caches.keys().then((keys) =>
      Promise.all(
        keys.filter((k) => k !== CACHE_NAME).map((k) => caches.delete(k))
      )
    )
  );
  self.clients.claim();
});

// 3. Stale-While-Revalidate Strategy for Navigation & API GETs
self.addEventListener('fetch', (event) => {
  const { request } = event;

  // Ignore POST/PUT/DELETE mutations (handled by offline sync queues)
  if (request.method !== 'GET') return;

  event.respondWith(
    caches.open(CACHE_NAME).then(async (cache) => {
      const cachedResponse = await cache.match(request);
      
      const fetchPromise = fetch(request)
        .then((networkResponse) => {
          if (networkResponse.status === 200) {
            cache.put(request, networkResponse.clone());
          }
          return networkResponse;
        })
        .catch(() => cachedResponse || Response.error());

      return cachedResponse || fetchPromise;
    })
  );
});

// 4. Background Sync for offline mutations
self.addEventListener('sync', (event: any) => {
  if (event.tag === 'sync-mutations') {
    event.waitUntil(flushOfflineMutationQueue());
  }
});

async function flushOfflineMutationQueue() {
  // Read pending mutations from IndexedDB and POST to backend
}

Read the full file on GitHub · 227 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 227 lines · 66 tokens per session scan A da4e154d2976

Subscribe to this mod's changes

pwa-offline-first-expert is a skill published in the GitHub repository roedyrustam/vibes-plug (53 stars, last pushed yesterday), licensed MIT. It adds 66 tokens to every session and 2,008 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-12.

Related

Other skills, from other repositories

expo

Expert in Expo for React Native development. Covers Expo Router, EAS Build and Submit, development builds, native module integration, and production deployment. Knows how to build cross-platform mobile apps efficiently while maintaining access to native capabilities. Use when "expo, react native, mobile app, eas…

omer-metin/skills-for-antigravity · 86 tokens

dart-flutter-patterns

A collection of architecture and coding patterns for building Dart and Flutter applications, including state management, navigation, networking, storage, and tests.

sutchan/Agent-Skills-Hub · 50 tokens

flutter-add-widget-preview

Adds interactive widget previews to the project using the previews.dart system. Use when creating new UI components or updating existing screens to ensure consistent design and interactive testing.

sutchan/Agent-Skills-Hub · 36 tokens

flutter-setup-declarative-routing

Configure MaterialApp.router using a package like gorouter for advanced URL-based navigation. Use when developing web applications or mobile apps that require specific deep linking and browser history support.

sutchan/Agent-Skills-Hub · 46 tokens

compose-multiplatform-patterns

Compose Multiplatform and Jetpack Compose patterns for KMP projects — state management, navigation, theming, performance, and platform-specific UI.

Jamkris/everything-gemini-code · 37 tokens

flutter-apply-architecture-best-practices

Architects a Flutter application using the recommended layered approach (UI, Logic, Data). Use when structuring a new project or refactoring for scalability.

sutchan/Agent-Skills-Hub · 40 tokens