offline-queue

offline-queue is a skill for Claude Code from rshankras/claude-code-apple-skills. It costs 42 tokens per session (2,322 once invoked), scanned A, original, MIT.

An offline operation queue that saves API changes while a device has no connection and sends them later. It can retry failed operations and handle conflicts when saved and server data differ.

In plain words
What is it for?
Use it for offline-first apps, queued API requests or mutations, reconnect retries, and synchronizing pending operations.
Why use it?
It prevents user changes from being lost during network outages. It also manages retrying and syncing pending work after the connection returns.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Part of the apple-skills plugin — 147 skills shipped together , and of apple-skills

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/rshankras/claude-code-apple-skills/offline-queue
Any agent
npx skills add rshankras/claude-code-apple-skills --skill offline-queue
Clone the repo
git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills

Made for: Claude Code.

Or install apple-skills, the plugin that ships this one along with the rest of its 147 skills.

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 offline-queue

README.md
[![agentmods](https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/offline-queue.svg)](https://agentmods.dev/skills/rshankras/claude-code-apple-skills/offline-queue)
Your own site
<a href="https://agentmods.dev/skills/rshankras/claude-code-apple-skills/offline-queue"><img src="https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/offline-queue.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,322 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.1 $0.00042 $0.02322
Opus 5 $0.00021 $0.01161
Sonnet 5 $0.00008 $0.00464
Haiku 4.5 $0.00004 $0.00232

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

Security

Grade A, and why

offline-queue 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 3d 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/generators/offline-queue/SKILL.md · 301 lines

How it starts

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

Offline Queue Generator

Generate a production offline operation queue that persists API requests/mutations when offline, stores them to disk, and retries with exponential backoff when connectivity returns. Essential for apps that need offline-first behavior.

When This Skill Activates

Use this skill when the user:

  • Asks to "add offline queue" or "offline support"
  • Wants to "queue requests" when there is no network
  • Mentions "offline first" architecture or design
  • Asks about "retry when online" or "retry on reconnect"
  • Wants "pending operations" that sync later
  • Mentions "offline mutations" or "queue API calls"

Pre-Generation Checks

1. Project Context Detection

  • Check Swift version (requires Swift 5.9+)
  • Check deployment target (iOS 16+ / macOS 13+)
  • Check for @Observable support (iOS 17+ / macOS 14+)
  • Identify source file locations

2. Conflict Detection

Search for existing networking/offline code:

Glob: **/*OfflineQueue*.swift, **/*OfflineOperation*.swift, **/*NetworkMonitor*.swift, **/*RetryPolicy*.swift
Grep: "NWPathMonitor" or "OfflineQueue" or "pendingOperations" or "offlineQueue"

If existing offline handling found:

  • Ask if user wants to replace or extend it
  • If extending, adapt generated code to existing patterns

3. Framework Availability

Check for Network framework availability (required for NWPathMonitor). Available on iOS 12+ / macOS 10.14+, so effectively always available for our iOS 16+ / macOS 13+ targets.

Configuration Questions

Ask user via AskUserQuestion:

  1. Operation types?

    • API calls only (JSON requests/responses)
    • File uploads only (multipart data)
    • Both API calls and file uploads
  2. Persistence strategy?

    • SwiftData (iOS 17+ / macOS 14+) — structured queries, migration support
    • File-based (JSON files in app support) — simpler, wider compatibility — recommended
  3. Retry strategy?

    • Exponential backoff with jitter — recommended (prevents thundering herd)
    • Linear backoff (fixed interval between retries)
    • Immediate (retry as soon as connectivity returns, no delay)

Read the full file on GitHub · 301 lines

Files

What ships with it

2 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. 3d ago First seen · 301 lines · 42 tokens per session scan A b36033addf40

Subscribe to this mod's changes

offline-queue is a skill published in the GitHub repository rshankras/claude-code-apple-skills (701 stars, last pushed 1mo ago), licensed MIT. It adds 42 tokens to every session and 2,322 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories