android-local-storage

android-local-storage is a skill for Claude Code, Codex from noloman/Android-AI-skills. It costs 0 tokens per session (337 once invoked), scanned A, original, MIT.

A set of Android rules and patterns for saving data on a device, including Room for relational data and DataStore for key-value settings. It also covers offline use, caching, encryption, migrations, and background database work.

In plain words
What is it for?
Use it when building Android features that store structured records, preferences, cached network data, or sensitive information locally.
Why use it?
It provides consistent choices for local data and helps avoid unsafe storage, main-thread database operations, broken migrations, and multiple sources of truth.

Skill for Claude CodeCodex

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

Good fit Use it when building Android features that store structured records, preferences, cached network data, or sensitive information locally.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/noloman/android-ai-skills/android-local-storage
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 noloman/Android-AI-skills --skill android-local-storage
Clone the repo
git clone --depth 1 https://github.com/noloman/Android-AI-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 android-local-storage

README.md
[![agentmods](https://agentmods.dev/badge/skills/noloman/android-ai-skills/android-local-storage/github.svg)](https://agentmods.dev/skills/noloman/android-ai-skills/android-local-storage)
Your own site
<a href="https://agentmods.dev/skills/noloman/android-ai-skills/android-local-storage"><img src="https://agentmods.dev/badge/skills/noloman/android-ai-skills/android-local-storage/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 android-local-storage

Your own site · 80×15
<a href="https://agentmods.dev/skills/noloman/android-ai-skills/android-local-storage"><img src="https://agentmods.dev/badge/skills/noloman/android-ai-skills/android-local-storage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 337 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.00000 $0.00337
Opus 5 $0.00000 $0.00169
Sonnet 5 $0.00000 $0.00067
Haiku 4.5 $0.00000 $0.00034

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

Security

Grade A, and why

android-local-storage 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 9d 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.

android-local-storage/SKILL.md · 39 lines

What it actually says


name: android-local-storage description: Local storage — Room, DataStore, offline-first architecture, caching, encryption. user-invocable: true

Android Local Storage

Cross-cutting skill — always activates alongside the project-type-specific skill.

Hard Rules

  • Use Room for structured relational data — not raw SQLite.
  • Use DataStore (Preferences or Proto) for key-value data — not SharedPreferences.
  • Export Room schemas (exportSchema = true) and test all migrations.
  • Never perform database operations on the main thread.
  • Use Flow or LiveData for reactive database queries — not one-shot reads for UI.
  • Define a single source of truth (database) — network responses update the database, UI observes the database.
  • Never store sensitive data (tokens, passwords) in Room or DataStore without encryption.
  • Use transactions for multi-table write operations.
  • Keep entities flat — avoid deeply nested objects in Room.
  • Use TypeConverters sparingly — prefer normalized relational design.

Core Patterns

  • Repository pattern: database as the source of truth, network as the updater.
  • Room DAOs return Flow<List> for reactive UI updates.
  • Use @Upsert for insert-or-update operations (Room 2.5+).
  • DataStore with Proto for type-safe structured preferences.
  • Implement cache expiry with timestamps — stale-while-revalidate pattern.
  • Use database-backed pagination with RemoteMediator + Paging 3.

References

  • references/room_patterns.md
  • references/datastore.md
  • references/offline_first.md
  • references/cache_strategies.md
  • references/encryption.md
  • references/migration_testing.md
Files

What ships with it

6 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. 9d ago First seen · 39 lines · 0 tokens per session scan A 6afdccc991ca

Subscribe to this mod's changes

android-local-storage is a skill published in the GitHub repository noloman/Android-AI-skills (6 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 337 tokens. 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.