CtrlK
BlogDocsLog inGet started
Tessl Logo

android-persistence

Implement Room database schemas and DataStore preferences with proper async patterns in Android. Use when defining Room entities, DAOs, migrations, or replacing SharedPreferences with DataStore. (triggers: **/*Dao.kt, **/*Database.kt, **/*Entity.kt, @Dao, @Entity, RoomDatabase)

80

Quality

75%

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

SecuritybySnyk

Passed

No known issues

Optimize this skill with Tessl

npx tessl skill review --optimize ./skills/android/android-persistence/SKILL.md
SKILL.md
Quality
Evals
Security

Android Persistence Standards

Priority: P0

1. Configure Room Database

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

See DAO templates for Room DAO patterns.

2. Migrate to DataStore

  • Replace SharedPreferences with ProtoDataStore (type-safe) or PreferencesDataStore.
  • Inject singleton DataStore instance via Hilt.

See DAO templates for DataStore migration patterns.

Anti-Patterns

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

References

Repository
HoangNguyen0403/agent-skills-standard
Last updated
Created

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.