Android local persistence datastore
Skill krutikJain/android-agent-skills/.github/skills/android-local-persistence-datastore
Persist lightweight user and app preferences with DataStore, schema-safe models, and migration-aware defaults.From its SKILL.md
npx -y skills add krutikJain/android-agent-skills --skill android-local-persistence-datastoreAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 14 stars14 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 3 commands, including `cd examples/orbittasks-compose && ./gradlew :app:testDebugUnitTest` and 2 more.
SKILL.md
3.7 KB, 602 tokens by cl100k_base, as published. Nobody here has run it
Android Local Persistence DataStore
When To Use
- Use this skill when the request is about: android datastore setup, replace sharedpreferences android, typed local preferences android.
- Primary outcome: Persist lightweight user and app preferences with DataStore, schema-safe models, and migration-aware defaults.
- Handoff skills when the scope expands:
android-room-databaseandroid-modernization-upgrade
Workflow
- Confirm the data source, persistence boundary, sync model, and device capability involved.
- Model contracts explicitly before wiring network, storage, media, or background APIs.
- Apply the recommended AndroidX or platform pattern with migration-safe defaults.
- Validate offline, retry, and process death behavior against the sample apps and scenarios.
- Escalate security, performance, or release risk to the linked supporting skills when needed.
Guardrails
- Prefer typed models and explicit serializers over ad-hoc maps or bundles.
- Keep background work idempotent and cancellation-aware.
- Do not leak storage, media, or networking details into presentation code.
- Treat user data durability, privacy, and migration paths as part of the implementation.
Anti-Patterns
- Blocking the main thread with disk or network calls.
- Treating retryable sync failures as terminal user-facing errors.
- Mixing cache models and wire models without a mapping layer.
- Requesting broad storage or notification capabilities when a narrower API exists.
Examples
Happy path
- Scenario: Store reminder and filter preferences for OrbitTasks safely.
- Command:
cd examples/orbittasks-compose && ./gradlew :app:testDebugUnitTest
Edge case
- Scenario: Migrate old preference keys without breaking the XML fixture.
- Command:
cd examples/orbittasks-xml && ./gradlew :app:testDebugUnitTest
Failure recovery
- Scenario: Avoid mixing lightweight preference storage requests with Room persistence work.
- Command:
python3 scripts/eval_triggers.py --skill android-local-persistence-datastore
Done Checklist
- The implementation path is explicit, minimal, and tied to the right Android surface.
- Relevant example commands and benchmark prompts have been exercised or updated.
- Handoffs to adjacent skills are documented when the request crosses boundaries.
- Official references cover the chosen pattern and the main migration or troubleshooting path.
Official References
What ships with it: 5 files
3.0 KB alongside SKILL.md, 1 of them executable
agents/
- openai.yaml396 B
references/
- official-links.md662 B
- patterns.md960 B
- scenarios.md581 B
scripts/
- run_examples.shruns451 B