mobile-api-caching

mobile-api-caching is a skill for Claude Code, Codex from ariaramin/flutter-skills. It costs 143 tokens per session (5,718 once invoked), scanned A, original, MIT.

A guide for designing and implementing caches for data fetched by mobile apps. A cache is a stored copy used to reduce repeated network requests; the guide covers iOS, Android, Flutter, React Native, and Kotlin Multiplatform.

In plain words
What is it for?
Use it to choose cache-first, network-first, stale-while-revalidate, or offline-first behavior, define cache keys and limits, handle mutations and logout, and test the shared data path.
Why use it?
Poorly designed caching can show stale data, lose updates, waste storage, or behave incorrectly when the network is unavailable. This guide makes freshness, offline behavior, invalidation, and failures explicit.

Skill for Claude CodeCodex

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

Good fit Use it to choose cache-first, network-first, stale-while-revalidate, or offline-first behavior, define cache keys and limits, handle mutations and logout, and test the shared data path.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ariaramin/flutter-skills/mobile-api-caching
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 ariaramin/flutter-skills --skill mobile-api-caching
Clone the repo
git clone --depth 1 https://github.com/ariaramin/flutter-skills

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 mobile-api-caching

README.md
[![agentmods](https://agentmods.dev/badge/skills/ariaramin/flutter-skills/mobile-api-caching/github.svg)](https://agentmods.dev/skills/ariaramin/flutter-skills/mobile-api-caching)
Your own site
<a href="https://agentmods.dev/skills/ariaramin/flutter-skills/mobile-api-caching"><img src="https://agentmods.dev/badge/skills/ariaramin/flutter-skills/mobile-api-caching/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 mobile-api-caching

Your own site · 80×15
<a href="https://agentmods.dev/skills/ariaramin/flutter-skills/mobile-api-caching"><img src="https://agentmods.dev/badge/skills/ariaramin/flutter-skills/mobile-api-caching.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 143 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,718 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.00143 $0.05718
Opus 5.5 $0.00057 $0.02287
Sonnet 5.5 $0.00029 $0.01144
Haiku 4.5 $0.00014 $0.00572

Measured 1mo ago against content hash b11f2d08afcd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mobile-api-caching 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 1mo 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/mobile-api-caching/SKILL.md · 510 lines

How it starts

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

Mobile API Caching

Design caches as explicit correctness policies, not generic speed features. A cache is usually a derived copy; offline-first storage is a local replica with synchronization responsibilities.

Operating workflow

  1. Trace the real data flow before editing: UI state, repository/store, memory cache, database/files, HTTP client cache, network API, mutations, logout, background work, and every caller of the affected read/write path.
  2. Record the current SDK/package versions and supported platforms. Verify version-sensitive behavior in primary documentation or source.
  3. Define the resource contract: authority, identity, sensitivity, freshness budget, maximum tolerable staleness, offline behavior, mutation semantics, persistence need, size, and recovery path.
  4. Reuse the highest existing layer that can own the policy. Do not create a second cache in a view model when the repository or HTTP stack already owns equivalent data.
  5. Select a strategy with the decision model below; define keys, metadata, invalidation, bounds, concurrency, and failure behavior before storing data.
  6. Implement the smallest complete policy at the shared boundary.
  7. Leave one deterministic test for every non-trivial branch and measure the same representative workflow cold, warm, stale, and offline.

Classify claims as documented, platform/library-dependent, engineering choice, or measured. Read references/authoritative-sources.md before making a platform/API claim or choosing a version-sensitive mechanism.

Mental model and ownership

Use this hierarchy only where each layer has a distinct job:

UI state -> repository policy -> memory -> local database/files -> HTTP cache
         -> transport -> backend/CDN
  • UI state owns presentation and transient interaction state, not cache policy.
  • The repository/data layer owns resource identity, read strategy, refresh, mutation reconciliation, and the source exposed to higher layers.
  • Memory owns short-lived decoded objects and in-flight request sharing. Bound it by count/weight and clear or trim it under lifecycle/memory pressure.
  • A local database owns queryable, restart-safe domain data and offline state. It needs schemas, migrations, indexes, transactions, and corruption recovery.
  • Files own reconstructible blobs when database queries are unnecessary.
  • The HTTP cache owns protocol freshness, validators, representations, and conditional requests. Prefer it for cacheable HTTP resources rather than recreating HTTP semantics in domain code.
  • The backend/CDN defines validators, server freshness, invalidation signals, idempotency, and conflict/version semantics where possible.

Read the full file on GitHub · 510 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. 1mo ago First seen · 510 lines · 143 tokens per session scan A b11f2d08afcd

Subscribe to this mod's changes

mobile-api-caching is a skill published in the GitHub repository ariaramin/flutter-skills (11 stars, last pushed 23d ago), licensed MIT. It adds 143 tokens to every session and 5,718 once invoked, about $0.0006 per session on Opus 5.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-10-11.

Related

mobile-api-caching compared with skills from other repositories

mobile-api-caching next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mobile-api-cachingariaramin/flutter-skillsSkill1123d agoMITA143Claude Code, Codex
omh-apple-designrlaope/oh-my-hermesSkill6.2ktodayMITA21Claude Code
platform-conventionsOwl-Listener/designer-skillsSkill3.5k11d agoMITA55Claude Code, Codex
redteam-mobile-detail-packNetw0rkNoob/VulnClawSkill4.0k1mo agoMITA57Claude Code, Codex
android-pentestNetw0rkNoob/VulnClawSkill4.0k1mo agoMITA32Claude Code, Codex
offline-syncWrongStack/WrongStackSkill444todayMITA85Claude Code, Codex
flutter-mobileWrongStack/WrongStackSkill444todayMITA86Claude Code