android-room-database
Skill14 starsChanged 8 months agoMITView on GitHub
Model Room entities, DAOs, transactions, migrations, schema exports, and test-safe local persistence.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Shekhar23/claude-zero-to-hero-android-KMPtheir own version, first seen Mar 29, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Shekhar23/claude-zero-to-hero-android-KMP★ 9same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository68 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/android-architecture-clean.mdcCursor rule
- .cursor/rules/android-ci-cd-release-playstore.mdcCursor rule
- .cursor/rules/android-coil-compose.mdcCursor rule
- .cursor/rules/android-compose-accessibility.mdcCursor rule
- .cursor/rules/android-compose-foundations.mdcCursor rule
- .cursor/rules/android-compose-performance.mdcCursor rule
- .cursor/rules/android-compose-state-effects.mdcCursor rule
- .cursor/rules/android-compose-xml-interoperability.mdcCursor rule
- .cursor/rules/android-coroutines-flow.mdcCursor rule
- .cursor/rules/android-di-hilt.mdcCursor rule
- .cursor/rules/android-emulator-automation.mdcCursor rule
- .cursor/rules/android-gradle-build-logic.mdcCursor rule
- .cursor/rules/android-gradle-build-performance.mdcCursor rule
- .cursor/rules/android-kotlin-core.mdcCursor rule
- .cursor/rules/android-local-persistence-datastore.mdcCursor rule
- .cursor/rules/android-material3-design-system.mdcCursor rule
- .cursor/rules/android-media-files-sharing.mdcCursor rule
- .cursor/rules/android-mobile-frontend-design.mdcCursor rule
- .cursor/rules/android-modernization-upgrade.mdcCursor rule
- .cursor/rules/android-modularization.mdcCursor rule
- .cursor/rules/android-navigation-deeplinks.mdcCursor rule
- .cursor/rules/android-networking-retrofit-okhttp.mdcCursor rule
- .cursor/rules/android-performance-observability.mdcCursor rule
- .cursor/rules/android-permissions-activity-results.mdcCursor rule
- .cursor/rules/android-room-database.mdcCursor rule
- .cursor/rules/android-rxjava-to-coroutines-migration.mdcCursor rule
- .cursor/rules/android-security-best-practices.mdcCursor rule
- .cursor/rules/android-serialization-offline-sync.mdcCursor rule
- .cursor/rules/android-state-management.mdcCursor rule
- .cursor/rules/android-testing-ui.mdcCursor rule
- .cursor/rules/android-testing-unit.mdcCursor rule
- .cursor/rules/android-ui-states-validation.mdcCursor rule
- .cursor/rules/android-viewsystem-foundations.mdcCursor rule
- .cursor/rules/android-workmanager-notifications.mdcCursor rule
- android-architecture-cleanSkill
- android-ci-cd-release-playstoreSkill
- android-coil-composeSkill
- android-compose-accessibilitySkill
- android-compose-foundationsSkill
- android-compose-performanceSkill
- android-compose-state-effectsSkill
- android-compose-xml-interoperabilitySkill
- android-coroutines-flowSkill
- android-di-hiltSkill
- android-emulator-automationSkill
- android-gradle-build-logicSkill
- android-gradle-build-performanceSkill
- android-kotlin-coreSkill
- android-local-persistence-datastoreSkill
- android-material3-design-systemSkill
- android-media-files-sharingSkill
- android-mobile-frontend-designSkill
- android-modernization-upgradeSkill
- android-modularizationSkill
- android-navigation-deeplinksSkill
- android-networking-retrofit-okhttpSkill
- android-performance-observabilitySkill
- android-permissions-activity-resultsSkill
- android-rxjava-to-coroutines-migrationSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Use this skill when the request is about: room database android, dao query migration android, room schema export.
- Distinctive: line 25
Start with the persistence contract: entities, keys, indexes, relations, and whether the data is source-of-truth, cache, or offline-first …
- Distinctive: line 33
Keep entities persistence-focused.
- Distinctive: line 34
Use explicit transactions for multi-step writes that must remain consistent.
- Distinctive: line 35
Test migrations against real old schemas before trusting them in release builds.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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-migrationonly if the main work is reactive API migration rather than the database contract itself. - Handoff skills when the scope expands:
android-local-persistence-datastoreandroid-testing-unit
Workflow
- Start with the persistence contract: entities, keys, indexes, relations, and whether the data is source-of-truth, cache, or offline-first state.
- Model DAO access patterns explicitly, including transaction boundaries, query shape, paging, and invalidation behavior.
- Plan schema evolution before changing entities: exported schemas, migration steps, auto-migration eligibility, and destructive-fallback policy.
- Validate migration and query behavior with deterministic tests rather than assuming Room annotations are enough.
- 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.
Examples
Happy path
- Scenario: Persist task items and reminder flags with schema-aware entities.
- Command:
cd examples/orbittasks-compose && ./gradlew :app:testDebugUnitTest
Edge case
- Scenario: Recover from a failed schema change with an explicit migration path.
- Command:
python3 scripts/eval_triggers.py --skill android-room-database
Failure recovery
- Scenario: Keep Room requests separate from DataStore, networking, and modernization prompts.
- Command:
cd examples/orbittasks-xml && ./gradlew :app:testDebugUnitTest
Done Checklist
- Entities, DAOs, and transactions match the real persistence contract.
- Schema export and migration strategy are explicit.
- Query and migration tests cover the risky paths.
- Non-Room concerns are handed off instead of mixed into the database task.
Official References
- https://developer.android.com/training/data-storage/room
- https://developer.android.com/training/data-storage/room/migrating-db-versions
- https://developer.android.com/training/data-storage/room/accessing-data
- https://developer.android.com/training/data-storage/room/prepopulate
- https://developer.android.com/topic/performance/sqlite-performance-best-practices
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

