flutter-caching-data

flutter-caching-data is a skill for Claude Code, Codex from mdazadhossain95/flutter-agent-skills. It costs 34 tokens per session (1,773 once invoked), scanned A, original, MIT.

A guide for saving app data locally in a Flutter app so it can be reused quickly or available without a network connection. It covers preferences, databases, files, images, session state, and Flutter startup caching.

In plain words
What is it for?
Use it to add offline-first data flows, cache images or media, store structured records, preserve interface state, or pre-warm the Android Flutter engine.
Why use it?
Local copies reduce repeated network requests and can make startup and offline use faster. The guide helps match the storage method to the size and type of data.

Skill for Claude CodeCodex

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

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/mdazadhossain95/flutter-agent-skills/flutter-caching-data
Any agent
npx skills add mdazadhossain95/flutter-agent-skills --skill flutter-caching-data
Clone the repo
git clone --depth 1 https://github.com/mdazadhossain95/flutter-agent-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 flutter-caching-data

README.md
[![agentmods](https://agentmods.dev/badge/skills/mdazadhossain95/flutter-agent-skills/flutter-caching-data.svg)](https://agentmods.dev/skills/mdazadhossain95/flutter-agent-skills/flutter-caching-data)
Your own site
<a href="https://agentmods.dev/skills/mdazadhossain95/flutter-agent-skills/flutter-caching-data"><img src="https://agentmods.dev/badge/skills/mdazadhossain95/flutter-agent-skills/flutter-caching-data.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,773 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.00034 $0.01773
Opus 5 $0.00017 $0.00886
Sonnet 5 $0.00007 $0.00355
Haiku 4.5 $0.00003 $0.00177

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

Security

Grade A, and why

flutter-caching-data 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 5d 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/flutter-caching-data/SKILL.md · 169 lines

How it starts

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

Implementing Flutter Caching and Offline-First Architectures

Contents

Selecting a Caching Strategy

Apply the appropriate caching mechanism based on the data lifecycle and size requirements.

  • If storing small, non-critical UI states or preferences: Use shared_preferences.
  • If storing large, structured datasets: Use on-device databases (SQLite via sqflite, Drift, Hive CE, or Isar).
  • If storing binary data or large media: Use file system caching via path_provider.
  • If retaining user session state (navigation, scroll positions): Implement Flutter's built-in state restoration to sync the Element tree with the engine.
  • If optimizing Android initialization: Pre-warm and cache the FlutterEngine.

Implementing Offline-First Data Synchronization

Design repositories as the single source of truth, combining local databases and remote API clients.

Read Operations (Stream Approach)

Yield local data immediately for fast UI rendering, then fetch remote data, update the local cache, and yield the fresh data.

Stream<UserProfile> getUserProfile() async* {
  // 1. Yield local cache first
  final localProfile = await _databaseService.fetchUserProfile();
  if (localProfile != null) yield localProfile;

  // 2. Fetch remote, update cache, yield fresh data
  try {
    final remoteProfile = await _apiClientService.getUserProfile();
    await _databaseService.updateUserProfile(remoteProfile);
    yield remoteProfile;
  } catch (e) {
    // Handle network failure; UI already has local data
  }
}

Read the full file on GitHub · 169 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. 5d ago First seen · 169 lines · 34 tokens per session scan A eb1e276f477d

Subscribe to this mod's changes

flutter-caching-data is a skill published in the GitHub repository mdazadhossain95/flutter-agent-skills (2 stars, last pushed 2mo ago), licensed MIT. It adds 34 tokens to every session and 1,773 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-08-31.

Related

Other skills, from other repositories

mobile-storage-sqlite-powersync

PowerSync offline-first sync engine on SQLite for React Native - schema definition, watched queries, CRUD operations, backend connectors, sync rules, conflict resolution, attachments.

agents-inc/skills · 40 tokens

mobile-offline-support

Implement offline-first mobile apps with local storage, sync strategies, and conflict resolution. Covers AsyncStorage, Realm, SQLite, and background sync patterns.

aj-geddes/useful-ai-prompts · 34 tokens

offline-first-expert

Expert guidance for offline-first KMP and Android architectures using Store5, Room, SQLDelight, Ktor. Always trigger this skill when designing repositories, databases, caching, offline sync, Fetchers, SourceOfTruth, Updaters, Bookkeepers.

JosephSanjaya/skills · 57 tokens

flutter-storage

Use this skill when working on Flutter data persistence — SecureStorage (tokens, credentials), SharedPreferences (key-value non-sensitive), Drift (SQLite database, DAOs, tables, migrations), local database schema, caching, offline storage, key-value store, encrypted storage, or any local data layer.

yendangn/flutter-app-builder · 62 tokens

riverpod-offline

Persist Riverpod notifier state offline with Storage and persist(); riverpodsqflite, JsonPersist, key, destroyKey, cache duration, testing with in-memory storage. Use when saving state across app restarts or offline. Use this skill when the user asks about offline persistence, persisting state, or Riverpod storage.

serverpod/skills-registry · 70 tokens

couchbase

Couchbase distributed NoSQL database. Use for mobile and edge.

G1Joshi/Agent-Skills · 18 tokens