kmp-datastore
Installation
SKILL.md
When to Use This Skill
Use when you need to:
- Store small, typed key-value data that survives app restart (user prefs, tokens, flags)
- Replace
SharedPreferences(Android) orNSUserDefaults(iOS) with a single KMP API - Store structured data with a Protobuf schema (Proto DataStore)
- Read persisted state as a
Flowthat recomposes automatically on change - Wire DataStore into Koin so every feature accesses it without constructing it manually
Trigger keywords: DataStore, Preferences DataStore, Proto DataStore, SharedPreferences KMP, NSUserDefaults KMP, persist settings, key-value KMP, store user preferences, DataStore migration, DataStore Flow, DataStore Koin, local storage KMP, app settings KMP, save user settings, persist app state, user preferences KMP, settings persistence, save preferences, key value storage KMP.
Freshness rule: androidx.datastore KMP artifact names and the createDataStore {}
expect/actual API change between alpha versions — recheck the AndroidX releases page before
pinning a version. As of mid-2026 the KMP-stable artifact is androidx.datastore:datastore-preferences-core.