room-datastore

room-datastore is a skill for Claude Code, Codex from GDvega/super-android-kotlin-firebase-skill. It costs 33 tokens per session (589 once invoked), scanned A, original, MIT.

A guide for storing Android app data locally with Room or DataStore. Room is for structured database records, while DataStore is for preferences and configuration.

In plain words
What is it for?
Use it when adding a local database or settings store, building offline support, writing migrations, or placing local and remote data behind a repository.
Why use it?
It helps keep database access off the main thread, plan safe migrations when data structures change, and separate storage details from the rest of the app. It also covers how local data and remote data should be synchronized.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: $skill-name invocation.

Good fit Use it when adding a local database or settings store, building offline support, writing migrations, or placing local and remote data behind a repository.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gdvega/super-android-kotlin-firebase-skill/room-datastore
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 GDvega/super-android-kotlin-firebase-skill --skill room-datastore
Clone the repo
git clone --depth 1 https://github.com/GDvega/super-android-kotlin-firebase-skill

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 room-datastore

README.md
[![agentmods](https://agentmods.dev/badge/skills/gdvega/super-android-kotlin-firebase-skill/room-datastore/github.svg)](https://agentmods.dev/skills/gdvega/super-android-kotlin-firebase-skill/room-datastore)
Your own site
<a href="https://agentmods.dev/skills/gdvega/super-android-kotlin-firebase-skill/room-datastore"><img src="https://agentmods.dev/badge/skills/gdvega/super-android-kotlin-firebase-skill/room-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.

agentmods 80×15 button for room-datastore

Your own site · 80×15
<a href="https://agentmods.dev/skills/gdvega/super-android-kotlin-firebase-skill/room-datastore"><img src="https://agentmods.dev/badge/skills/gdvega/super-android-kotlin-firebase-skill/room-datastore.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 589 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.00033 $0.00589
Opus 5 $0.00016 $0.00295
Sonnet 5 $0.00007 $0.00118
Haiku 4.5 $0.00003 $0.00059

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

Security

Grade A, and why

room-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 10d 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/room-datastore/SKILL.md · 102 lines

How it starts

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

Purpose

Persist local data with explicit migrations, Flow APIs and offline-first boundaries.

When to use

  • Adding Room or DataStore.
  • Designing local cache and sync.
  • Writing migrations.
  • Moving local data behind a repository.

Inputs to inspect

  • Domain model and local queries.
  • Database version and existing migrations.
  • Preference vs structured data needs.
  • Sync/conflict behavior.

Required workflow

  1. Choose Room for structured relational data or DataStore for preferences/config.
  2. Define entity/DAO or DataStore schema.
  3. Add migration strategy.
  4. Expose repository/domain models, not raw entities.
  5. Test DAO, migrations and ViewModel behavior.

Rules

  • Do not run DB work on main thread.
  • Do not use destructive migration in production without explicit approval.
  • Do not store relational data in Preferences DataStore.
  • Use Flow for observed data.
  • Document conflict handling.

Local skills to invoke

  • android-architecture
  • kotlin-core
  • workmanager-background-sync
  • testing
  • ui-state-design

External companion skills to use when installed

Do not assume these companion skills are installed. Prefer the local skills above first, then consult Companion Skills for install and verification commands.

  • android/skills — use for official Android workflow alignment when a first-party companion skill exists for the task.

Files commonly touched

  • Room entities
  • DAO files
  • Database class
  • DataStore serializers
  • Repository implementation
  • migration tests

Commands to validate

./gradlew test
./gradlew connectedDebugAndroidTest
./gradlew assembleDebug

Common mistakes to avoid

  • Dropping user data in migration.
  • Leaking entities to UI without reason.
  • Ignoring timezone/conflict concerns.
  • Using DataStore for large lists.

Checklist

  • Entity/DAO clear.
  • Migration safe.
  • Repository boundary exists.
  • Offline behavior defined.
  • Tests added.

Read the full file on GitHub · 102 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. 10d ago First seen · 102 lines · 33 tokens per session scan A 9e4c0b8e4c30

Subscribe to this mod's changes

room-datastore is a skill published in the GitHub repository GDvega/super-android-kotlin-firebase-skill (2 stars, last pushed 2mo ago), licensed MIT. It adds 33 tokens to every session and 589 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

room-patterns

Room persistence for the Android target (androidx.room) - @Entity, @Dao, RoomDatabase, migrations, TypeConverters, and Flow-returning queries. Android-side database. For shared/multiplatform persistence in commonMain use sqldelight-patterns. For the broader Android data layer (Repository pattern, Room plus remote…

TalissonVitorino/kmp-ios-skills · 85 tokens

core-data

Core Data for iOS persistence. Data models, fetch requests, background contexts, and SwiftData migration.

TalissonVitorino/kmp-ios-skills · 24 tokens

sqldelight-patterns

SQLDelight for Kotlin Multiplatform shared persistence - .sq files in commonMain, platform drivers (AndroidSqliteDriver on Android, NativeSqliteDriver on iOS), type adapters, migrations, and a shared database accessed from common code. Use for multiplatform or shared persistence. For Android-only Room use…

TalissonVitorino/kmp-ios-skills · 73 tokens

swiftdata

Apple SwiftData for iOS 17+ persistence - the @Model macro, ModelContainer and ModelContext, the @Query property wrapper with.

TalissonVitorino/kmp-ios-skills · 31 tokens

room-patterns

Room database patterns for Android - entity definitions, DAO interfaces, Database class, migrations, TypeConverters, and Flow integration.

ahmed3elshaer/everything-claude-code-mobile · 28 tokens

sqldelight-patterns

SQLDelight patterns for Kotlin Multiplatform - .sq file definitions, platform drivers, type adapters, migrations, and shared database access.

ahmed3elshaer/everything-claude-code-mobile · 34 tokens