android-room-database

android-room-database is a skill for Codex from krutikJain/android-agent-skills. It costs 25 tokens per session (980 once invoked), scanned A, original, MIT.

Guidance for using Room, Android's database library, to store structured data on a device. It covers tables, queries, transactions, relationships, and changes to the database over time.

In plain words
What is it for?
Use it to design entities and queries, define data-access objects, group changes into transactions, plan migrations, export schemas, and test persistence.
Why use it?
It helps keep local data consistent and prevents app updates from losing or corrupting existing user data.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to design entities and queries, define data-access objects, group changes into transactions, plan migrations, export schemas, and test persistence.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/krutikjain/android-agent-skills/android-room-database
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 krutikJain/android-agent-skills --skill android-room-database
Clone the repo
git clone --depth 1 https://github.com/krutikJain/android-agent-skills

Made for: 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-room-database

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/krutikjain/android-agent-skills/android-room-database"><img src="https://agentmods.dev/badge/skills/krutikjain/android-agent-skills/android-room-database.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 980 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.00025 $0.00980
Opus 5 $0.00013 $0.00490
Sonnet 5 $0.00005 $0.00196
Haiku 4.5 $0.00003 $0.00098

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

Security

Grade A, and why

android-room-database 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 7d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/run_examples.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.github/skills/android-room-database/SKILL.md · 74 lines

How it starts

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

Android Room Database

When To Use

  • Use this skill when the request is about: room database android, dao query migration android, room schema export.
  • Primary outcome: Model Room entities, DAOs, transactions, migrations, schema exports, and test-safe local persistence.
  • Reach for this skill when the hard part is schema design, DAO queries, transactions, migrations, or Room testing. Hand off to android-rxjava-to-coroutines-migration only if the main work is reactive API migration rather than the database contract itself.
  • Handoff skills when the scope expands:
  • android-local-persistence-datastore
  • android-testing-unit

Workflow

  1. Start with the persistence contract: entities, keys, indexes, relations, and whether the data is source-of-truth, cache, or offline-first state.
  2. Model DAO access patterns explicitly, including transaction boundaries, query shape, paging, and invalidation behavior.
  3. Plan schema evolution before changing entities: exported schemas, migration steps, auto-migration eligibility, and destructive-fallback policy.
  4. Validate migration and query behavior with deterministic tests rather than assuming Room annotations are enough.
  5. Hand off DataStore, sync, or reactive API questions only after the Room boundary is correct.

Guardrails

  • Export schemas and treat them as part of the contract, not optional tooling noise.
  • Keep entities persistence-focused; map to domain/UI models instead of leaking table shape upward.
  • Use explicit transactions for multi-step writes that must remain consistent.
  • Test migrations against real old schemas before trusting them in release builds.

Anti-Patterns

  • Treating Room entities as the app's domain model everywhere.
  • Editing schemas without exporting or validating migration paths.
  • Writing broad SELECT * queries when the screen only needs a narrow projection.
  • Collapsing database, sync, and reactive-stream migration problems into one undifferentiated task.

Review Focus

  • Entity keys, indexes, relations, and schema ownership.
  • DAO query shape, transactions, and invalidation behavior.
  • Migration safety, schema exports, and test coverage.
  • Clear boundaries between Room models and higher-level app models.

Read the full file on GitHub · 74 lines

Files

What ships with it

5 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. 7d ago First seen · 74 lines · 25 tokens per session scan A 6f7a41840f03

Subscribe to this mod's changes

android-room-database is a skill published in the GitHub repository krutikJain/android-agent-skills (14 stars, last pushed 5mo ago), licensed MIT. It adds 25 tokens to every session and 980 once invoked, about $0.0001 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-09-03.

Related

Other skills, from other repositories

navigate

Call the unintent tool with the following exact parameters.

vNeeL-code/GHOST · 6 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

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

swiftdata

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

TalissonVitorino/kmp-ios-skills · 31 tokens

compose-kotlin-agent-skills

Enterprise Android/Kotlin skill for 2026 — Kotlin 2.x K2 compiler, AGP 9, Navigation 3, edge-to-edge Compose, strict MVI with atomic state.update, banned AI antipatterns. Jetpack Compose, Hilt, Room, KMP, CameraX/ML Kit, performance, testing. Use when writing Kotlin for Android, building Compose UI, MVVM/MVI…

haidrrrry/compose-kotlin-agent-skills · 149 tokens