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.
npx skills add rcosteira79/android-skills --skill datastoregit clone --depth 1 https://github.com/rcosteira79/android-skillsWrote 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.
[](https://agentmods.dev/skills/rcosteira79/android-skills/datastore)<a href="https://agentmods.dev/skills/rcosteira79/android-skills/datastore"><img src="https://agentmods.dev/badge/skills/rcosteira79/android-skills/datastore/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.
<a href="https://agentmods.dev/skills/rcosteira79/android-skills/datastore"><img src="https://agentmods.dev/badge/skills/rcosteira79/android-skills/datastore.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00098 | $0.00950 |
| Opus 5.5 | $0.00039 | $0.00380 |
| Sonnet 5.5 | $0.00020 | $0.00190 |
| Haiku 4.5 | $0.00010 | $0.00095 |
Grade A, and why
datastore 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 23d 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.
How it starts
The opening of the file, as written. The whole thing — 63 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Jetpack DataStore for Android and KMP
Reactive coroutine-based key-value / typed storage; the same androidx.datastore:datastore-preferences-core runs on Android, iOS, and JVM — only the file-path producer is platform-specific. (Web support is 1.3.0-alpha only, and it's sessionStorage/OPFS-backed there, not file-path-based.) This reference covers the storage-choice call plus the two error/path traps, not the basics of Preferences keys, edit { }, or Serializer<T>. Adapted from Meet-Miyani/compose-skill; MIT. Related: android-skills:android-data-layer, android-skills:kmp-boundaries, android-skills:kotlin-flows.
Preferences vs Typed vs Room
| Need | Storage |
|---|---|
| Key-value flags (theme, locale, onboarding done) | Preferences DataStore |
| One typed object, many related fields, schema evolution | Typed DataStore + Serializer<T> |
Relational data, indexes, WHERE / JOIN, >100 entries, paging |
Room |
| Payloads above ~50KB per write | Room / filesystem — DataStore rewrites the whole file on every edit |
Rule of thumb: if a WHERE clause would be useful, use Room.
The two traps
.catch must match IOException specifically — never a broad catch. A bare catch { emit(emptyPreferences()) } hides serializer/corruption errors behind a silent empty state.
val settings: Flow<UserSettings> = dataStore.data
.catch { e -> if (e is IOException) emit(emptyPreferences()) else throw e }
.map { p -> UserSettings(p[Keys.DARK_MODE] ?: false, p[Keys.LOCALE] ?: "en") }
Typed-DataStore corruption recovery triggers on CorruptionException, NOT IOException. The serializer's readFrom must wrap parse failures in CorruptionException, and the store needs a ReplaceFileCorruptionHandler — without it, one corrupt file makes every read fail permanently.
object AppSettingsSerializer : Serializer<AppSettings> {
override val defaultValue = AppSettings()
override suspend fun readFrom(input: InputStream): AppSettings =
try { Json.decodeFromString(input.readBytes().decodeToString()) }
catch (e: SerializationException) { throw CorruptionException("Cannot read AppSettings", e) }
override suspend fun writeTo(t: AppSettings, output: OutputStream) =
output.write(Json.encodeToString(t).encodeToByteArray())
}
val store = DataStoreFactory.create(
serializer = AppSettingsSerializer,
corruptionHandler = ReplaceFileCorruptionHandler { AppSettings() },
produceFile = { File(context.filesDir, "app_settings.json") },
)
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.
- 23d ago Changed · +2 lines 2494298d5037
- 3mo ago First seen · 61 lines · 98 tokens per session scan A 0b826747050d
datastore is a skill published in the GitHub repository rcosteira79/android-skills (185 stars, last pushed 23d ago), licensed MIT. It adds 98 tokens to every session and 950 once invoked, about $0.0004 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-08-30.
datastore compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| datastorercosteira79/android-skills | Skill | 185 | 23d ago | MIT | A | 98 | Claude Code |
| swift-actor-persistenceaffaan-m/ECC | Skill | 316k | 2d ago | MIT | A | 29 | Claude Code, Kiro |
| setup-datamodelmicrosoft/power-platform-skills | Skill | 1.2k | today | MIT | A | 64 | Claude Code |
| axiom-audit-core-dataCharlesWiltgen/Axiom | Skill | 1.3k | yesterday | MIT | A | 27 | Codex |
| axiom-audit-swiftdataCharlesWiltgen/Axiom | Skill | 1.3k | yesterday | MIT | A | 32 | Codex |
| boutique-storemergesort/Boutique | Skill | 1.1k | 20d ago | MIT | A | 52 | Claude Code |
| boutique-stored-valuesmergesort/Boutique | Skill | 1.1k | 20d ago | MIT | A | 68 | Claude Code |