Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add piyushverma0/android-agent-skills --skill datastoregit clone --depth 1 https://github.com/piyushverma0/android-agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/piyushverma0/android-agent-skills/datastore)<a href="https://agentmods.dev/skills/piyushverma0/android-agent-skills/datastore"><img src="https://agentmods.dev/badge/skills/piyushverma0/android-agent-skills/datastore/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/piyushverma0/android-agent-skills/datastore"><img src="https://agentmods.dev/badge/skills/piyushverma0/android-agent-skills/datastore.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00109 | $0.01566 |
| Opus 5.5 | $0.00044 | $0.00626 |
| Sonnet 5.5 | $0.00022 | $0.00313 |
| Haiku 4.5 | $0.00011 | $0.00157 |
Grade A, and why
datastore scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 222 lines — stays where its author put it; the contents beside it link to each section on GitHub.
DataStore
DataStore is the modern replacement for SharedPreferences. Coroutine-based, type-safe, safe for Main thread.
Preferences DataStore — for simple key-value pairs
// Setup
implementation(libs.androidx.datastore.preferences)
// ✅ Define all preference keys in one place
object PreferenceKeys {
val IS_DARK_THEME = booleanPreferencesKey("is_dark_theme")
val ONBOARDING_COMPLETE = booleanPreferencesKey("onboarding_complete")
val USER_ID = stringPreferencesKey("user_id")
val NOTIFICATION_ENABLED = booleanPreferencesKey("notifications_enabled")
val LANGUAGE = stringPreferencesKey("language")
val FONT_SIZE = intPreferencesKey("font_size")
}
// ✅ Hilt module — create DataStore singleton
@Module
@InstallIn(SingletonComponent::class)
object DataStoreModule {
@Provides
@Singleton
fun provideDataStore(@ApplicationContext context: Context): DataStore<Preferences> =
PreferenceDataStoreFactory.create(
corruptionHandler = ReplaceFileCorruptionHandler { emptyPreferences() },
migrations = listOf(SharedPreferencesMigration(context, "legacy_prefs")),
scope = CoroutineScope(Dispatchers.IO + SupervisorJob()),
produceFile = { context.preferencesDataStoreFile("app_preferences") }
)
}
// ✅ Repository pattern for DataStore
class UserPreferencesRepository @Inject constructor(
private val dataStore: DataStore<Preferences>
) {
// Read — returns Flow, auto-updates on change
val isDarkTheme: Flow<Boolean> = dataStore.data
.catch { exception ->
if (exception is IOException) emit(emptyPreferences())
else throw exception
}
.map { preferences -> preferences[PreferenceKeys.IS_DARK_THEME] ?: false }
val onboardingComplete: Flow<Boolean> = dataStore.data
.catch { if (it is IOException) emit(emptyPreferences()) else throw it }
.map { it[PreferenceKeys.ONBOARDING_COMPLETE] ?: false }
// Read all preferences at once
val userPreferences: Flow<UserPreferences> = dataStore.data
.catch { if (it is IOException) emit(emptyPreferences()) else throw it }
.map { preferences ->
UserPreferences(
isDarkTheme = preferences[PreferenceKeys.IS_DARK_THEME] ?: false,
notificationsEnabled = preferences[PreferenceKeys.NOTIFICATION_ENABLED] ?: true,
language = preferences[PreferenceKeys.LANGUAGE] ?: "en",
fontSize = preferences[PreferenceKeys.FONT_SIZE] ?: 16
)
}
// Write — always suspend, safe on any coroutine
suspend fun setDarkTheme(enabled: Boolean) {
dataStore.edit { preferences ->
preferences[PreferenceKeys.IS_DARK_THEME] = enabled
}
}
suspend fun setOnboardingComplete() {
dataStore.edit { preferences ->
preferences[PreferenceKeys.ONBOARDING_COMPLETE] = true
}
}
suspend fun updateLanguage(language: String) {
dataStore.edit { preferences ->
preferences[PreferenceKeys.LANGUAGE] = language
}
}
suspend fun clearAll() {
dataStore.edit { it.clear() }
}
}
data class UserPreferences(
val isDarkTheme: Boolean = false,
val notificationsEnabled: Boolean = true,
val language: String = "en",
val fontSize: Int = 16
)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 222 lines · 109 tokens per session scan A 792e03d117e3
datastore is a skill published in the GitHub repository piyushverma0/android-agent-skills (15 stars, last pushed 7mo ago), licensed MIT. It adds 109 tokens to every session and 1,566 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
datastore compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| datastorepiyushverma0/android-agent-skills | Skill | 15 | 7mo ago | MIT | A | 109 | Claude Code, Codex |
| android-ui-journey-testingsickn33/agentic-awesome-skills | Skill | 51k | today | MIT | A | 27 | Claude Code |
| Debroid CLI DebuggerPatilShreyas/debroid | Skill | 280 | 21d ago | Apache-2.0 | A | 61 | Claude Code, Codex |
| kotlin-coroutines-expertrabee-elkholy/android-harness-kit | Skill | 3 | 3mo ago | MIT | A | 30 | Claude Code, Codex |
| compose-inspectorrabee-elkholy/android-harness-kit | Skill | 3 | 3mo ago | MIT | A | 39 | Claude Code, Codex |
| gradle-build-optimizerrabee-elkholy/android-harness-kit | Skill | 3 | 3mo ago | MIT | A | 32 | Claude Code, Codex |
| android-harnessrabee-elkholy/android-harness-kit | Skill | 3 | 3mo ago | MIT | A | 27 | Claude Code, Codex |