agentsclimarketplace

Android persistence

Skill ComeOnOliver/skillshub/skills/HoangNguyen0403/agent-skills-standard/android-persistence

Standards for Room Database and DataStore. Use when implementing Room database schemas or DataStore preferences in Android. (triggers: **/*Dao.kt, **/*Database.kt, **/*Entity.kt, @Dao, @Entity, RoomDatabase)From its SKILL.md

Install
npx -y skills add ComeOnOliver/skillshub --skill android-persistence

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

1.0 KB, 176 tokens by cl100k_base, as published. Nobody here has run it

Android Persistence Standards

Priority: P0

Implementation Guidelines

Room

  • Async: Return Flow<List<T>> for queries, use suspend for Write/Insert.
  • Entities: Keep simple @Entity data classes. Map to Domain models in Repository.
  • Transactions: Use @Transaction for multi-table queries (Relations).

DataStore

  • Usage: Replace SharedPreferences with ProtoDataStore (Type-safe) or PreferencesDataStore.
  • Scope: Inject singleton instance via Hilt.

Anti-Patterns

  • No IO on Main Thread: Room handles dispatchers, but verify Flow is collected off-main.
  • No @Entity in UI Layer: Map to Domain or UI models in Repository.

References

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.