pwa-offline-sync

pwa-offline-sync is a skill for Claude Code, Codex from d-o-hub/github-template-ai-agents. It costs 63 tokens per session (626 once invoked), scanned A, original, MIT.

A guide for making web apps continue working without an internet connection. It covers service workers, browser caches, IndexedDB—a browser database—and a queue for changes made offline.

In plain words
What is it for?
Use it to build or debug offline-first features, caching, local data storage, background synchronization, and offline/online tests.
Why use it?
It helps avoid lost updates and inconsistent data when users disconnect or reconnect. It also provides checks for cache versions, access changes, and offline behavior.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to build or debug offline-first features, caching, local data storage, background synchronization, and offline/online tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/d-o-hub/github-template-ai-agents/pwa-offline-sync
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 d-o-hub/github-template-ai-agents --skill pwa-offline-sync
Clone the repo
git clone --depth 1 https://github.com/d-o-hub/github-template-ai-agents

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-sync

README.md
[![agentmods](https://agentmods.dev/badge/skills/d-o-hub/github-template-ai-agents/pwa-offline-sync/github.svg)](https://agentmods.dev/skills/d-o-hub/github-template-ai-agents/pwa-offline-sync)
Your own site
<a href="https://agentmods.dev/skills/d-o-hub/github-template-ai-agents/pwa-offline-sync"><img src="https://agentmods.dev/badge/skills/d-o-hub/github-template-ai-agents/pwa-offline-sync/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-sync

Your own site · 80×15
<a href="https://agentmods.dev/skills/d-o-hub/github-template-ai-agents/pwa-offline-sync"><img src="https://agentmods.dev/badge/skills/d-o-hub/github-template-ai-agents/pwa-offline-sync.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 626 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00063 $0.00626
Opus 5 $0.00032 $0.00313
Sonnet 5 $0.00013 $0.00125
Haiku 4.5 $0.00006 $0.00063

Measured 8d ago against content hash 14ea25ba13b7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

pwa-offline-sync scanned grade A with 0 findings 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 8d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/pwa-offline-sync/SKILL.md · 65 lines

How it starts

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

PWA Offline Sync

Purpose: design, implement, and validate offline/PWA behavior (service worker, caches, IndexedDB, sync queue).

When to Use

  • Editing service worker, cache strategies, or sync orchestration.
  • Touching IndexedDB schema, permission caching, or zombie detection.
  • Investigating offline bugs or data conflicts.

Workflow

  1. Assess entity rules -- confirm table of offline-first entities + conflict strategy.
  2. Plan caches -- map static/assets/data to Cache Storage policies (cache-first vs stale-while-revalidate vs network-first).
  3. IndexedDB schema -- define stores for progress, annotations, sync queue, permission cache; version migrations carefully.
  4. Service worker -- implement install/activate/fetch with trace logging, offline fallback page, and error handling.
  5. Sync manager -- queue writes locally, dedupe via mutation IDs, replay when online, implement exponential backoff + zombie detection.
  6. Testing -- simulate offline/online in E2E tests; unit-test queue reducers; verify revoked access is blocked after reconnect.

Checklist

  • Cache + DB version numbers bumped intentionally (no silent clears).
  • Headers sent even when offline data queued.
  • Zombie detection notifies user + stops further reads upon revocation.
  • Service worker cleans up old caches.
  • Memory-safe listeners (remove event handlers when replaced).

See Also

  • lifecycle-management — Resource cleanup and error handling
  • css-render-performance — CSS render performance optimization

Rationalizations

Rationalization Reality
"Cache-first is always the best strategy" Different data requires different strategies; stale-while-revalidate or network-first may be more appropriate.
"Sync queue is overkill for our simple app" Even simple apps need conflict resolution when offline writes collide with server state.
"Zombie detection is too complex to implement" Without it, revoked users can continue reading cached data indefinitely.

Read the full file on GitHub · 65 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 65 lines · 63 tokens per session scan A 14ea25ba13b7

Subscribe to this mod's changes

pwa-offline-sync is a skill published in the GitHub repository d-o-hub/github-template-ai-agents (2 stars, last pushed yesterday), licensed MIT. It adds 63 tokens to every session and 626 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

html-craft

Create and verify single-file interactive HTML pages in the sandbox: build or edit the file, then prove the result with headless-Chromium screenshots, in-page DOM/geometry assertions, and JS-error capture (Playwright). No GPU, no service, no network. Use when the user wants an HTML page, animation, demo, dashboard, or…

Elumenotion/GuideAnts · 84 tokens

web-pwa-service-workers

Service Worker lifecycle, caching strategies, offline patterns, update handling, precaching, runtime caching.

agents-inc/skills · 24 tokens

react-component-testing

Applies the three-tier test taxonomy for React applications: unit tests for hooks and pure logic, component tests for behavior and interactions, and end-to-end tests for user flows. Uses Vitest, React Testing Library, and Playwright while focusing on observable behavior over implementation details.

soulcodex/agentic · 59 tokens

chrome-ext-ui-react

This skill should be used when building React UI for Chrome extensions or when the user asks about UI patterns in extensions. Trigger when: "React in extension", "extension popup React", "side panel React", "Shadow DOM React", "content script UI", "createShadowRootUi", "extension accessibility", "rem to px extension"…

RadOrigin-LLC/RAD-Claude-Skills · 114 tokens

browser-remote-control

Use when an AI agent needs to automate a real browser through Agent Browser Bridge CLI, including remote Chrome control, page extraction, clicking, typing, navigation, or screenshots.

justlovemaki/PrismFlowAgent · 39 tokens

browser

Use when automating browser interactions, web scraping, or E2E UI testing using AI-optimized abbreviated selectors and isolated multi-session contexts.

mattmre/EVOKORE-MCP-PUBLIC · 30 tokens