dimitriremoiville/cc-mobile/multiplatform-settings
Claude Code and agent skill by dimitriremoiville/cc-mobile
- community
Checking that the SKILL.md file is still in the repository.
`multiplatform-settings` patterns for this KMP project — observable / suspending settings, typed wrappers, platform constructors, migrations, security considerations (secrets do not belong here). Load whenever adding a shared key-value preference.
Install
npx vskill@latest install dimitriremoiville/cc-mobile/multiplatform-settingsSKILL.md
The same SKILL.md was published earlier as dimitriremoiville/cc-mobile/multiplatform-settings.
multiplatform-settings
What it is
Thin KMP key-value wrapper over platform-native storage:
- Android:
SharedPreferences(orDataStorevia no-arg coroutines module). - iOS:
NSUserDefaults. - JVM:
java.util.prefs.Preferences. - JS:
Storage.
It's the right tool for UI preferences. Not for tokens, credentials, or anything sensitive.
Dependencies
In libs.versions.toml (resolve <latest-stable> to the newest non-alpha release at scaffold time):
Factory per platform
expect class in commonMain:
actual in androidMain:
actual in iosMain:
Register in Koin:
Typed wrapper
Don't let callers pass raw keys around. One typed interface per concern:
Prefer ObservableSettings over Settings when you want Flow-backed observation (requires the observable artifact or the coroutines extensions).
Serializable values
For enums, pack to string. For structured values, use kotlinx.serialization:
Keep the JSON stable — a schema change without a migration silently drops data.
Observation
ObservableSettings.getStringFlow(key, default) emits the current value and every subsequent write. Works via SharedPreferences.OnSharedPreferenceChangeListener on Android and KVO on iOS.
For Settings factories without observation support, wrap with ObservableSettings.Factory.create(settings) or poll with flow { while (true) { emit(...); delay(...) } } — last resort.
Migrations
Preferences don't self-migrate. Version them manually:
Run at app startup before anyone reads. Ship the migration for one release, remove it the next.
Secrets go elsewhere
- On Android: Keystore +
EncryptedSharedPreferencesor Tink. - On iOS: Keychain.
multiplatform-settings writes plaintext; never use it for auth tokens or PII. A dedicated expect interface SecureStore lives alongside your settings wrapper for that.
Testing
MapSettings() is an in-memory implementation that matches the Settings contract:
Hard nos
- No storing tokens, passwords, or PII.
- No
Settingsinstance reach-ins from the UI layer. - No unversioned schema changes on structured values.
- No sharing a single
namefor unrelated concerns (useapp-prefs,feature-cart,onboardingas separate factories). - No direct
NSUserDefaults.standardUserDefaultsorcontext.getSharedPreferences(...)outside theSettingsFactory.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/cc-mobile-kmm/skills/multiplatform-settings/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dimitriremoiville/cc-mobile/multiplatform-settings)