offline-first-development

Development guidance for applications that continue working without an internet connection and synchronize changes when connectivity returns.

In plain words
What is it for?
Use it to plan IndexedDB storage, service workers, background sync, local-first applications, and conflict-resolution rules for mobile or web apps.
Why use it?
It addresses unreliable networks, offline data storage, delayed synchronization, and conflicting edits made on different devices.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/builderced/agent-skills/offline-first-development
Any agent
npx skills add BuilderCed/agent-skills --skill offline-first-development
Clone the repo
git clone --depth 1 https://github.com/BuilderCed/agent-skills

Made for: Claude Code, Codex.

Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 974 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00024 $0.00974
Opus 5 $0.00012 $0.00487
Sonnet 5 $0.00005 $0.00195
Haiku 4.5 $0.00002 $0.00097

Measured 2d ago against content hash a89e3e7bb61a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

offline-first-development 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 2d 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.

skills/offline/offline-first-development/SKILL.md · 137 lines

How it starts

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

Offline-First Development

When to Use

  • Building apps for low-connectivity environments (rural, Africa, transit)
  • Building PWAs that must work without internet
  • Designing sync strategies for mobile apps
  • Implementing local-first architectures
  • Building for environments with unreliable connections

Core Principles

  1. Local-first: Data lives on the device. Server is backup, not source of truth.
  2. Sync on reconnect: Queue changes offline, sync when connection returns.
  3. Conflict resolution: Define merge strategy before building.
  4. Progressive enhancement: App works offline; online adds features.

Storage Options

Storage Size Limit Persistence Best For
IndexedDB ~50% of disk Persistent Structured data, large datasets
Cache API ~50% of disk Persistent HTTP responses, assets
localStorage 5-10 MB Persistent Small key-value config
OPFS ~50% of disk Persistent File-like access (new)

Recommendation: IndexedDB for data, Cache API for assets, OPFS for files.

Service Worker Pattern

Install → Cache essential assets (app shell, fonts, icons)
Activate → Clean old caches
Fetch → Cache-first for assets, network-first for API data
Sync → Background sync for queued mutations

Caching Strategies

Strategy When How
Cache-first Static assets (CSS, JS, images) Serve from cache, update in background
Network-first API data Try network, fall back to cache
Stale-while-revalidate Semi-static (user profile) Serve cache, update from network
Network-only Real-time data (chat, payments) No caching

Sync Patterns

Optimistic Updates

  1. Apply change locally immediately
  2. Queue mutation for sync
  3. On reconnect: send queued mutations
  4. On conflict: apply resolution strategy

Conflict Resolution Strategies

Strategy When How
Last-write-wins Simple data, single user Timestamp comparison
Server-wins Authoritative server Discard local on conflict
Client-wins User autonomy priority Overwrite server
Merge Collaborative editing Field-level merge
Manual Critical data Show conflict to user

Read the full file on GitHub · 137 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. 2d ago First seen · 137 lines · 24 tokens per session scan A a89e3e7bb61a

Subscribe to this mod's changes

offline-first-development is a skill published in the GitHub repository BuilderCed/agent-skills (2 stars, last pushed 4mo ago), licensed MIT. It adds 24 tokens to every session and 974 once invoked, about $0.0001 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

compartmentalize

Sweep this conversation and save everything potentially worth knowing again into Compartment, the encrypted memory vault. Run it before compacting or summarizing so nothing is lost to the summary, or on its own at any point to bank the session.

MaxFreedomPollard/Compartment · 52 tokens

tiktok-video

一句话需求 → 成品竖屏短视频:写分镜、自动搜免费素材、TTS 配音、逐字卡拉OK字幕、BGM、ffmpeg 合成 1080x1920 MP4(零 API key 可用).

Fangyuan025/Chaty · 59 tokens

html-artifact

Create self-contained HTML artifacts (single-file by default, split bundles when oversized) for complex, reviewable, or shareable work outputs. Use for an HTML artifact, browser-viewable report, implementation plan, PR/code-review report, dashboard, or mini deck, or for long Markdown-like outputs needing navigation or…

bahayonghang/my-ai-cli-toolkit · 80 tokens

reimagine-it

Content-Derived Design — reads existing HTML and writes a stronger standalone page from headings, facts, names, dates, numbers, links, emails, and colors already in that file. CLI: npx reimagine-it --auto -i page.html -o out.html; also variations, lock, and audit. Use when the user says /reimagine-it, "reimagine it"…

Kayforkind/reimagine-it · 197 tokens

transcribe-audio

Use when a task requires reading, transcribing, or extracting content from audio or voice — WhatsApp PTT/voice notes (.opus/.ogg), meeting recordings, .mp3/.m4a/.wav/.mp4 files, or audio attachments inside a WhatsApp chat-export zip.

montezuma-p/harken · 63 tokens

matematic-mcp-fastmcp-instructions-pl

Buduj nowy MCP server MateMatic (lub retrofit istniejacego) z 9 elementami (5 zwalidowanych na dograh v1.31.0) - FastMCP(instructions=) z procedural orchestration, drift test, dwukanalowy auth X-API-Key LUB Bearer, OTel atrybut orgid dla per-tenant routing, ToolAnnotations dla read-only, stabilne kody bledow +…

matematicsolutions/awesome-matematic-skills-pl · 335 tokens