android-ai-skills 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +464 -9
- package/android-accessibility-best-practices/SKILL.md +36 -0
- package/android-accessibility-best-practices/references/color_contrast.md +30 -0
- package/android-accessibility-best-practices/references/compose_semantics.md +48 -0
- package/android-accessibility-best-practices/references/content_descriptions.md +32 -0
- package/android-accessibility-best-practices/references/talkback_navigation.md +38 -0
- package/android-accessibility-best-practices/references/touch_targets.md +28 -0
- package/android-auth-identity/SKILL.md +36 -0
- package/android-auth-identity/references/biometric_auth.md +36 -0
- package/android-auth-identity/references/credential_manager.md +32 -0
- package/android-auth-identity/references/google_sign_in.md +39 -0
- package/android-auth-identity/references/session_security.md +33 -0
- package/android-auth-identity/references/token_management.md +33 -0
- package/android-background-work/SKILL.md +33 -0
- package/android-background-work/references/foreground_services.md +30 -0
- package/android-background-work/references/notifications.md +34 -0
- package/android-background-work/references/scheduling.md +31 -0
- package/android-background-work/references/workmanager.md +41 -0
- package/android-build-infra/SKILL.md +34 -0
- package/android-build-infra/references/build_variants.md +30 -0
- package/android-build-infra/references/convention_plugins.md +29 -0
- package/android-build-infra/references/dependency_management.md +30 -0
- package/android-build-infra/references/modularization.md +33 -0
- package/android-build-infra/references/version_catalogs.md +24 -0
- package/android-ci-cd/SKILL.md +36 -0
- package/android-ci-cd/references/build_optimization.md +39 -0
- package/android-ci-cd/references/fastlane.md +34 -0
- package/android-ci-cd/references/github_actions.md +35 -0
- package/android-ci-cd/references/play_store_deployment.md +36 -0
- package/android-ci-cd/references/signing_ci.md +39 -0
- package/android-dependency-injection/SKILL.md +36 -0
- package/android-dependency-injection/references/common_mistakes.md +37 -0
- package/android-dependency-injection/references/hilt_setup.md +32 -0
- package/android-dependency-injection/references/multi_module_di.md +31 -0
- package/android-dependency-injection/references/scoping.md +34 -0
- package/android-dependency-injection/references/testing_di.md +36 -0
- package/android-local-storage/SKILL.md +36 -0
- package/android-local-storage/references/cache_strategies.md +33 -0
- package/android-local-storage/references/datastore.md +35 -0
- package/android-local-storage/references/encryption.md +35 -0
- package/android-local-storage/references/offline_first.md +39 -0
- package/android-local-storage/references/room_patterns.md +34 -0
- package/android-maps-location/SKILL.md +35 -0
- package/android-maps-location/references/fused_location.md +40 -0
- package/android-maps-location/references/geofencing.md +36 -0
- package/android-maps-location/references/google_maps.md +39 -0
- package/android-maps-location/references/location_permissions.md +34 -0
- package/android-media/SKILL.md +36 -0
- package/android-media/references/audio_focus.md +34 -0
- package/android-media/references/camerax.md +40 -0
- package/android-media/references/image_loading.md +37 -0
- package/android-media/references/media3_playback.md +40 -0
- package/android-media/references/picture_in_picture.md +34 -0
- package/android-ml-ondevice/SKILL.md +35 -0
- package/android-ml-ondevice/references/gemini_nano.md +36 -0
- package/android-ml-ondevice/references/ml_kit.md +34 -0
- package/android-ml-ondevice/references/model_management.md +41 -0
- package/android-ml-ondevice/references/tensorflow_lite.md +42 -0
- package/android-navigation-best-practices/SKILL.md +32 -0
- package/android-navigation-best-practices/references/app_links.md +45 -0
- package/android-navigation-best-practices/references/deep_links.md +34 -0
- package/android-navigation-best-practices/references/navigation_patterns.md +41 -0
- package/android-navigation-best-practices/references/navigation_testing.md +35 -0
- package/android-networking/SKILL.md +36 -0
- package/android-networking/references/caching.md +31 -0
- package/android-networking/references/error_handling.md +32 -0
- package/android-networking/references/ktor_multiplatform.md +33 -0
- package/android-networking/references/okhttp_interceptors.md +34 -0
- package/android-networking/references/retrofit_setup.md +33 -0
- package/android-performance-best-practices/SKILL.md +37 -0
- package/android-performance-best-practices/references/app_size.md +31 -0
- package/android-performance-best-practices/references/app_startup.md +26 -0
- package/android-performance-best-practices/references/baseline_profiles.md +26 -0
- package/android-performance-best-practices/references/battery_optimization.md +31 -0
- package/android-performance-best-practices/references/memory_management.md +27 -0
- package/android-performance-best-practices/references/strict_mode.md +43 -0
- package/android-security-best-practices/SKILL.md +37 -0
- package/android-security-best-practices/references/intent_component_security.md +33 -0
- package/android-security-best-practices/references/network_security.md +26 -0
- package/android-security-best-practices/references/r8_proguard.md +24 -0
- package/android-security-best-practices/references/secrets_management.md +25 -0
- package/android-security-best-practices/references/secure_storage.md +25 -0
- package/android-security-best-practices/references/webview_security.md +24 -0
- package/android-testing-best-practices/SKILL.md +37 -0
- package/android-testing-best-practices/references/ci_testing.md +32 -0
- package/android-testing-best-practices/references/compose_ui_testing.md +34 -0
- package/android-testing-best-practices/references/instrumented_testing.md +30 -0
- package/android-testing-best-practices/references/room_migration_testing.md +31 -0
- package/android-testing-best-practices/references/screenshot_testing.md +32 -0
- package/android-testing-best-practices/references/test_architecture.md +30 -0
- package/bin/android-ai-skills.js +62 -1
- package/firebase-best-practices/SKILL.md +37 -0
- package/firebase-best-practices/references/analytics.md +36 -0
- package/firebase-best-practices/references/cloud_messaging.md +34 -0
- package/firebase-best-practices/references/crashlytics.md +35 -0
- package/firebase-best-practices/references/firebase_auth.md +34 -0
- package/firebase-best-practices/references/firestore.md +36 -0
- package/firebase-best-practices/references/remote_config.md +34 -0
- package/package.json +19 -1
- package/play-billing-best-practices/SKILL.md +36 -0
- package/play-billing-best-practices/references/billing_client_lifecycle.md +28 -0
- package/play-billing-best-practices/references/one_time_purchases.md +29 -0
- package/play-billing-best-practices/references/server_verification.md +34 -0
- package/play-billing-best-practices/references/subscriptions.md +29 -0
- package/play-billing-best-practices/references/testing_billing.md +34 -0
- package/play-store-readiness/SKILL.md +36 -0
- package/play-store-readiness/references/app_signing.md +24 -0
- package/play-store-readiness/references/data_safety.md +25 -0
- package/play-store-readiness/references/release_checklist.md +40 -0
- package/play-store-readiness/references/runtime_permissions.md +26 -0
- package/play-store-readiness/references/target_sdk_compliance.md +29 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [1.4.0](https://github.com/noloman/Android-AI-skills/compare/v1.3.0...v1.4.0) (2026-02-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add 10 more cross-cutting skills (billing, Firebase, DI, networking, storage, auth, media, CI/CD, maps, ML) ([bb2990e](https://github.com/noloman/Android-AI-skills/commit/bb2990ebd9929d0c725c99c9cfcc94c88593b702))
|
|
7
|
+
|
|
8
|
+
# [1.3.0](https://github.com/noloman/Android-AI-skills/compare/v1.2.0...v1.3.0) (2026-02-12)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* add 8 cross-cutting Android platform skills ([821a0d3](https://github.com/noloman/Android-AI-skills/commit/821a0d34bb2f193ea395a990411f2ef0d9c2c23a))
|
|
14
|
+
|
|
1
15
|
# [1.2.0](https://github.com/noloman/Android-AI-skills/compare/v1.1.0...v1.2.0) (2026-02-12)
|
|
2
16
|
|
|
3
17
|
|
package/README.md
CHANGED
|
@@ -47,6 +47,24 @@ These AI skills:
|
|
|
47
47
|
- Prevent architecture drift
|
|
48
48
|
- Protect performance budgets
|
|
49
49
|
- Keep KMP boundaries clean
|
|
50
|
+
- Harden **security** (secrets, storage, network, components)
|
|
51
|
+
- Ensure **Play Store compliance** (Data Safety, permissions, target SDK)
|
|
52
|
+
- Enforce **accessibility** (WCAG AA contrast, touch targets, TalkBack)
|
|
53
|
+
- Optimize **performance** (startup, memory, battery, app size)
|
|
54
|
+
- Maintain **test quality** (test pyramid, Compose testing, screenshot tests)
|
|
55
|
+
- Standardize **build infrastructure** (version catalogs, convention plugins, modularization)
|
|
56
|
+
- Govern **background work** (WorkManager, foreground services, notifications)
|
|
57
|
+
- Guide **navigation** (type-safe routes, deep links, App Links)
|
|
58
|
+
- Enforce **Play Billing** (subscriptions, server verification, purchase lifecycle)
|
|
59
|
+
- Integrate **Firebase** (Auth, Firestore, Crashlytics, FCM, Remote Config)
|
|
60
|
+
- Standardize **dependency injection** (Hilt scoping, multi-module DI, testing)
|
|
61
|
+
- Govern **networking** (Retrofit, OkHttp, Ktor, caching, error handling)
|
|
62
|
+
- Manage **local storage** (Room, DataStore, offline-first, encryption)
|
|
63
|
+
- Secure **authentication** (Credential Manager, biometrics, token management)
|
|
64
|
+
- Handle **media** (Media3, CameraX, image loading, audio focus)
|
|
65
|
+
- Automate **CI/CD** (GitHub Actions, Fastlane, signing, Play Store deployment)
|
|
66
|
+
- Guide **maps & location** (FusedLocationProvider, geofencing, permissions)
|
|
67
|
+
- Enable **on-device ML** (ML Kit, TFLite, Gemini Nano, model management)
|
|
50
68
|
- Scale from indie to enterprise
|
|
51
69
|
- Adapt automatically (Enterprise Mode auto-detection)
|
|
52
70
|
|
|
@@ -76,6 +94,96 @@ flowchart LR
|
|
|
76
94
|
D --- L
|
|
77
95
|
E --- L
|
|
78
96
|
L --> M[Structured Concurrency & Flow]
|
|
97
|
+
|
|
98
|
+
N[android-security-best-practices]
|
|
99
|
+
C --- N
|
|
100
|
+
D --- N
|
|
101
|
+
E --- N
|
|
102
|
+
|
|
103
|
+
O[android-performance-best-practices]
|
|
104
|
+
C --- O
|
|
105
|
+
D --- O
|
|
106
|
+
E --- O
|
|
107
|
+
|
|
108
|
+
P[play-store-readiness]
|
|
109
|
+
C --- P
|
|
110
|
+
D --- P
|
|
111
|
+
E --- P
|
|
112
|
+
|
|
113
|
+
Q[android-testing-best-practices]
|
|
114
|
+
C --- Q
|
|
115
|
+
D --- Q
|
|
116
|
+
E --- Q
|
|
117
|
+
|
|
118
|
+
R[android-accessibility-best-practices]
|
|
119
|
+
C --- R
|
|
120
|
+
D --- R
|
|
121
|
+
E --- R
|
|
122
|
+
|
|
123
|
+
S[android-build-infra]
|
|
124
|
+
C --- S
|
|
125
|
+
D --- S
|
|
126
|
+
E --- S
|
|
127
|
+
|
|
128
|
+
T[android-background-work]
|
|
129
|
+
C --- T
|
|
130
|
+
D --- T
|
|
131
|
+
E --- T
|
|
132
|
+
|
|
133
|
+
U[android-navigation-best-practices]
|
|
134
|
+
C --- U
|
|
135
|
+
D --- U
|
|
136
|
+
E --- U
|
|
137
|
+
|
|
138
|
+
V[play-billing-best-practices]
|
|
139
|
+
C --- V
|
|
140
|
+
D --- V
|
|
141
|
+
E --- V
|
|
142
|
+
|
|
143
|
+
W[firebase-best-practices]
|
|
144
|
+
C --- W
|
|
145
|
+
D --- W
|
|
146
|
+
E --- W
|
|
147
|
+
|
|
148
|
+
X[android-dependency-injection]
|
|
149
|
+
C --- X
|
|
150
|
+
D --- X
|
|
151
|
+
E --- X
|
|
152
|
+
|
|
153
|
+
Y[android-networking]
|
|
154
|
+
C --- Y
|
|
155
|
+
D --- Y
|
|
156
|
+
E --- Y
|
|
157
|
+
|
|
158
|
+
Z[android-local-storage]
|
|
159
|
+
C --- Z
|
|
160
|
+
D --- Z
|
|
161
|
+
E --- Z
|
|
162
|
+
|
|
163
|
+
AA[android-auth-identity]
|
|
164
|
+
C --- AA
|
|
165
|
+
D --- AA
|
|
166
|
+
E --- AA
|
|
167
|
+
|
|
168
|
+
AB[android-media]
|
|
169
|
+
C --- AB
|
|
170
|
+
D --- AB
|
|
171
|
+
E --- AB
|
|
172
|
+
|
|
173
|
+
AC[android-ci-cd]
|
|
174
|
+
C --- AC
|
|
175
|
+
D --- AC
|
|
176
|
+
E --- AC
|
|
177
|
+
|
|
178
|
+
AD[android-maps-location]
|
|
179
|
+
C --- AD
|
|
180
|
+
D --- AD
|
|
181
|
+
E --- AD
|
|
182
|
+
|
|
183
|
+
AE[android-ml-ondevice]
|
|
184
|
+
C --- AE
|
|
185
|
+
D --- AE
|
|
186
|
+
E --- AE
|
|
79
187
|
```
|
|
80
188
|
|
|
81
189
|
---
|
|
@@ -139,6 +247,263 @@ Cross-cutting skill that always activates alongside the project-type-specific sk
|
|
|
139
247
|
|
|
140
248
|
---
|
|
141
249
|
|
|
250
|
+
### 5. android-security-best-practices
|
|
251
|
+
|
|
252
|
+
Cross-cutting skill — secrets management, secure storage, network security, component hardening.
|
|
253
|
+
|
|
254
|
+
**Enforces:**
|
|
255
|
+
- No hardcoded secrets in source code
|
|
256
|
+
- EncryptedSharedPreferences / Android Keystore for sensitive data
|
|
257
|
+
- HTTPS enforcement with Network Security Config
|
|
258
|
+
- exported="false" by default on all components
|
|
259
|
+
- PendingIntent.FLAG_IMMUTABLE, WebView file access disabled
|
|
260
|
+
- R8 enabled for release builds
|
|
261
|
+
- No sensitive data in logs
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
### 6. android-performance-best-practices
|
|
266
|
+
|
|
267
|
+
Cross-cutting skill — startup optimization, memory management, battery, app size.
|
|
268
|
+
|
|
269
|
+
**Enforces:**
|
|
270
|
+
- TTID < 2s, TTFD < 4s
|
|
271
|
+
- No heavy init on main thread during onCreate()
|
|
272
|
+
- App Startup library, Baseline Profiles
|
|
273
|
+
- No static Activity/Context references
|
|
274
|
+
- StrictMode in debug builds
|
|
275
|
+
- R8 + resource shrinking for release
|
|
276
|
+
- WebP assets, Doze-aware networking
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
### 7. play-store-readiness
|
|
281
|
+
|
|
282
|
+
Cross-cutting skill — Data Safety, permissions, target SDK, signing, release process.
|
|
283
|
+
|
|
284
|
+
**Enforces:**
|
|
285
|
+
- Data Safety section matches actual SDK behavior
|
|
286
|
+
- Runtime permissions at point of use with rationale
|
|
287
|
+
- Annual target SDK compliance
|
|
288
|
+
- Play App Signing with separate upload key
|
|
289
|
+
- AAB format, staged rollout (5-10%)
|
|
290
|
+
- Crash-free rate target >= 99%
|
|
291
|
+
- No debuggable release builds
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
### 8. android-testing-best-practices
|
|
296
|
+
|
|
297
|
+
Cross-cutting skill — Compose UI testing, screenshot tests, Room migrations, CI strategy.
|
|
298
|
+
|
|
299
|
+
**Enforces:**
|
|
300
|
+
- Test pyramid (unit > integration > E2E)
|
|
301
|
+
- Compose testing APIs for Compose UI (not Espresso)
|
|
302
|
+
- Fakes over mocks
|
|
303
|
+
- Room schema export + migration tests
|
|
304
|
+
- Descriptive test names, no Thread.sleep()
|
|
305
|
+
- Deterministic tests, flaky test quarantine
|
|
306
|
+
- TestDispatcher + runTest for coroutines
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
### 9. android-accessibility-best-practices
|
|
311
|
+
|
|
312
|
+
Cross-cutting skill — content descriptions, TalkBack, touch targets, contrast, semantics.
|
|
313
|
+
|
|
314
|
+
**Enforces:**
|
|
315
|
+
- contentDescription on all interactive non-text elements
|
|
316
|
+
- 48dp minimum touch targets
|
|
317
|
+
- WCAG AA contrast (4.5:1 normal, 3:1 large text)
|
|
318
|
+
- No color-only information
|
|
319
|
+
- Logical TalkBack reading order
|
|
320
|
+
- Correct semantics on custom composables
|
|
321
|
+
- sp (not dp) for text sizes
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
### 10. android-build-infra
|
|
326
|
+
|
|
327
|
+
Cross-cutting skill — version catalogs, convention plugins, modularization, build variants.
|
|
328
|
+
|
|
329
|
+
**Enforces:**
|
|
330
|
+
- Gradle version catalogs (libs.versions.toml) for all dependencies
|
|
331
|
+
- Convention plugins for shared build config
|
|
332
|
+
- Feature modularization (feature-api/feature-impl)
|
|
333
|
+
- Dependencies flow inward, no feature-to-feature deps
|
|
334
|
+
- implementation scope by default
|
|
335
|
+
- Build variants for debug/release/staging
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
### 11. android-background-work
|
|
340
|
+
|
|
341
|
+
Cross-cutting skill — WorkManager, foreground services, notifications, scheduling.
|
|
342
|
+
|
|
343
|
+
**Enforces:**
|
|
344
|
+
- WorkManager for deferrable persistent work
|
|
345
|
+
- Foreground service types declared (API 34+)
|
|
346
|
+
- Notification channels (API 26+)
|
|
347
|
+
- Never hold WakeLocks indefinitely
|
|
348
|
+
- Exact alarms only for user-visible scheduling
|
|
349
|
+
- POST_NOTIFICATIONS permission (API 33+)
|
|
350
|
+
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
### 12. android-navigation-best-practices
|
|
354
|
+
|
|
355
|
+
Cross-cutting skill — type-safe routes, deep links, App Links, navigation patterns.
|
|
356
|
+
|
|
357
|
+
**Enforces:**
|
|
358
|
+
- Type-safe navigation (data class/object routes)
|
|
359
|
+
- App Links verified with Digital Asset Links
|
|
360
|
+
- Deep link fallbacks for non-installed users
|
|
361
|
+
- No heavy logic in navigation callbacks
|
|
362
|
+
- Standard launch mode with Navigation
|
|
363
|
+
- Deep link parameter validation
|
|
364
|
+
|
|
365
|
+
---
|
|
366
|
+
|
|
367
|
+
### 13. play-billing-best-practices
|
|
368
|
+
|
|
369
|
+
Cross-cutting skill — in-app purchases, subscriptions, server verification, testing.
|
|
370
|
+
|
|
371
|
+
**Enforces:**
|
|
372
|
+
- Server-side purchase verification — never trust client
|
|
373
|
+
- Acknowledge all purchases within 3 days
|
|
374
|
+
- Consume consumable purchases after delivery
|
|
375
|
+
- Handle all BillingResponseCode values
|
|
376
|
+
- Test with license testers on real devices
|
|
377
|
+
- Handle pending purchases for slow payment methods
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
381
|
+
### 14. firebase-best-practices
|
|
382
|
+
|
|
383
|
+
Cross-cutting skill — Auth, Firestore, Crashlytics, Remote Config, FCM, Analytics.
|
|
384
|
+
|
|
385
|
+
**Enforces:**
|
|
386
|
+
- Firebase BoM for consistent versions
|
|
387
|
+
- Firestore security rules before production
|
|
388
|
+
- No PII in Crashlytics logs
|
|
389
|
+
- Respect user consent before Analytics collection
|
|
390
|
+
- Handle FCM token rotation
|
|
391
|
+
- Rate-limit Remote Config fetches
|
|
392
|
+
|
|
393
|
+
---
|
|
394
|
+
|
|
395
|
+
### 15. android-dependency-injection
|
|
396
|
+
|
|
397
|
+
Cross-cutting skill — Hilt/Dagger setup, scoping, multi-module DI, testing.
|
|
398
|
+
|
|
399
|
+
**Enforces:**
|
|
400
|
+
- Hilt as default DI framework
|
|
401
|
+
- Correct scoping (@Singleton, @ViewModelScoped)
|
|
402
|
+
- Never inject Activity context into singletons
|
|
403
|
+
- Constructor injection over field injection
|
|
404
|
+
- @Binds for interface-to-implementation mapping
|
|
405
|
+
- Focused modules per feature boundary
|
|
406
|
+
|
|
407
|
+
---
|
|
408
|
+
|
|
409
|
+
### 16. android-networking
|
|
410
|
+
|
|
411
|
+
Cross-cutting skill — Retrofit, OkHttp, Ktor, caching, error handling, resilience.
|
|
412
|
+
|
|
413
|
+
**Enforces:**
|
|
414
|
+
- Suspend functions for all API calls
|
|
415
|
+
- Explicit error handling for all HTTP codes
|
|
416
|
+
- OkHttp interceptors for cross-cutting concerns
|
|
417
|
+
- No request/response body logging in production
|
|
418
|
+
- Token refresh in Authenticator
|
|
419
|
+
- kotlinx.serialization or Moshi (not Gson)
|
|
420
|
+
|
|
421
|
+
---
|
|
422
|
+
|
|
423
|
+
### 17. android-local-storage
|
|
424
|
+
|
|
425
|
+
Cross-cutting skill — Room, DataStore, offline-first architecture, caching, encryption.
|
|
426
|
+
|
|
427
|
+
**Enforces:**
|
|
428
|
+
- Room for relational data, DataStore for key-value
|
|
429
|
+
- Export Room schemas and test all migrations
|
|
430
|
+
- No database operations on main thread
|
|
431
|
+
- Database as single source of truth
|
|
432
|
+
- No sensitive data in unencrypted storage
|
|
433
|
+
- Transactions for multi-table writes
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
437
|
+
### 18. android-auth-identity
|
|
438
|
+
|
|
439
|
+
Cross-cutting skill — Credential Manager, biometrics, token management, session security.
|
|
440
|
+
|
|
441
|
+
**Enforces:**
|
|
442
|
+
- Credential Manager API for sign-in flows
|
|
443
|
+
- Tokens in EncryptedSharedPreferences or Keystore
|
|
444
|
+
- Transparent token refresh
|
|
445
|
+
- BiometricPrompt (not FingerprintManager)
|
|
446
|
+
- BIOMETRIC_STRONG for sensitive operations
|
|
447
|
+
- Clear all credentials on logout
|
|
448
|
+
|
|
449
|
+
---
|
|
450
|
+
|
|
451
|
+
### 19. android-media
|
|
452
|
+
|
|
453
|
+
Cross-cutting skill — Media3/ExoPlayer, CameraX, image loading, audio focus, PiP.
|
|
454
|
+
|
|
455
|
+
**Enforces:**
|
|
456
|
+
- Media3 for playback (not legacy ExoPlayer)
|
|
457
|
+
- CameraX for camera (not Camera2 directly)
|
|
458
|
+
- Coil or Glide for image loading
|
|
459
|
+
- Audio focus management before playback
|
|
460
|
+
- MediaSession for background playback
|
|
461
|
+
- Lifecycle-aware resource release
|
|
462
|
+
|
|
463
|
+
---
|
|
464
|
+
|
|
465
|
+
### 20. android-ci-cd
|
|
466
|
+
|
|
467
|
+
Cross-cutting skill — GitHub Actions, Fastlane, signing, Play Store deployment, build optimization.
|
|
468
|
+
|
|
469
|
+
**Enforces:**
|
|
470
|
+
- Never store signing keys in repository
|
|
471
|
+
- Unit tests on every PR
|
|
472
|
+
- Release AAB built in CI
|
|
473
|
+
- Pin CI action versions to SHA hashes
|
|
474
|
+
- Gradle build cache and configuration cache
|
|
475
|
+
- Separate CI stages (lint → test → build → deploy)
|
|
476
|
+
|
|
477
|
+
---
|
|
478
|
+
|
|
479
|
+
### 21. android-maps-location
|
|
480
|
+
|
|
481
|
+
Cross-cutting skill — Google Maps SDK, FusedLocationProvider, geofencing, permissions.
|
|
482
|
+
|
|
483
|
+
**Enforces:**
|
|
484
|
+
- FusedLocationProviderClient (not LocationManager)
|
|
485
|
+
- Request only needed location accuracy
|
|
486
|
+
- Remove location updates when not needed
|
|
487
|
+
- Protect API keys with app restrictions
|
|
488
|
+
- Foreground service for background location
|
|
489
|
+
- Handle approximate vs precise location (API 31+)
|
|
490
|
+
|
|
491
|
+
---
|
|
492
|
+
|
|
493
|
+
### 22. android-ml-ondevice
|
|
494
|
+
|
|
495
|
+
Cross-cutting skill — ML Kit, TensorFlow Lite, Gemini Nano, model management.
|
|
496
|
+
|
|
497
|
+
**Enforces:**
|
|
498
|
+
- ML Kit for common vision/NLP tasks
|
|
499
|
+
- Run inference off main thread
|
|
500
|
+
- Play Services-based models to reduce APK size
|
|
501
|
+
- Validate model input/output shapes
|
|
502
|
+
- Graceful fallback when models unavailable
|
|
503
|
+
- Quantize models for size and performance
|
|
504
|
+
|
|
505
|
+
---
|
|
506
|
+
|
|
142
507
|
## Enterprise Mode (Auto-Detection)
|
|
143
508
|
|
|
144
509
|
Enterprise Mode activates automatically if the repository contains:
|
|
@@ -249,27 +614,99 @@ npx android-ai-skills@latest init --force
|
|
|
249
614
|
Running `init` with defaults creates:
|
|
250
615
|
|
|
251
616
|
```
|
|
252
|
-
AGENTS.md
|
|
253
|
-
CLAUDE.md
|
|
254
|
-
.github/copilot-instructions.md
|
|
255
|
-
.cursor/rules/compose-best-practices.mdc
|
|
617
|
+
AGENTS.md # Codex
|
|
618
|
+
CLAUDE.md # Claude Code
|
|
619
|
+
.github/copilot-instructions.md # GitHub Copilot
|
|
620
|
+
.cursor/rules/compose-best-practices.mdc # Cursor (per skill)
|
|
256
621
|
.cursor/rules/kmp-architecture-best-practices.mdc
|
|
257
622
|
.cursor/rules/compose-multiplatform-best-practices.mdc
|
|
258
623
|
.cursor/rules/kotlin-coroutines-best-practices.mdc
|
|
259
|
-
.
|
|
260
|
-
.
|
|
624
|
+
.cursor/rules/android-security-best-practices.mdc
|
|
625
|
+
.cursor/rules/android-performance-best-practices.mdc
|
|
626
|
+
.cursor/rules/play-store-readiness.mdc
|
|
627
|
+
.cursor/rules/android-testing-best-practices.mdc
|
|
628
|
+
.cursor/rules/android-accessibility-best-practices.mdc
|
|
629
|
+
.cursor/rules/android-build-infra.mdc
|
|
630
|
+
.cursor/rules/android-background-work.mdc
|
|
631
|
+
.cursor/rules/android-navigation-best-practices.mdc
|
|
632
|
+
.cursor/rules/play-billing-best-practices.mdc
|
|
633
|
+
.cursor/rules/firebase-best-practices.mdc
|
|
634
|
+
.cursor/rules/android-dependency-injection.mdc
|
|
635
|
+
.cursor/rules/android-networking.mdc
|
|
636
|
+
.cursor/rules/android-local-storage.mdc
|
|
637
|
+
.cursor/rules/android-auth-identity.mdc
|
|
638
|
+
.cursor/rules/android-media.mdc
|
|
639
|
+
.cursor/rules/android-ci-cd.mdc
|
|
640
|
+
.cursor/rules/android-maps-location.mdc
|
|
641
|
+
.cursor/rules/android-ml-ondevice.mdc
|
|
642
|
+
.windsurfrules # Windsurf
|
|
643
|
+
.clinerules/compose-best-practices.md # Cline (per skill)
|
|
261
644
|
.clinerules/kmp-architecture-best-practices.md
|
|
262
645
|
.clinerules/compose-multiplatform-best-practices.md
|
|
263
646
|
.clinerules/kotlin-coroutines-best-practices.md
|
|
264
|
-
.
|
|
647
|
+
.clinerules/android-security-best-practices.md
|
|
648
|
+
.clinerules/android-performance-best-practices.md
|
|
649
|
+
.clinerules/play-store-readiness.md
|
|
650
|
+
.clinerules/android-testing-best-practices.md
|
|
651
|
+
.clinerules/android-accessibility-best-practices.md
|
|
652
|
+
.clinerules/android-build-infra.md
|
|
653
|
+
.clinerules/android-background-work.md
|
|
654
|
+
.clinerules/android-navigation-best-practices.md
|
|
655
|
+
.clinerules/play-billing-best-practices.md
|
|
656
|
+
.clinerules/firebase-best-practices.md
|
|
657
|
+
.clinerules/android-dependency-injection.md
|
|
658
|
+
.clinerules/android-networking.md
|
|
659
|
+
.clinerules/android-local-storage.md
|
|
660
|
+
.clinerules/android-auth-identity.md
|
|
661
|
+
.clinerules/android-media.md
|
|
662
|
+
.clinerules/android-ci-cd.md
|
|
663
|
+
.clinerules/android-maps-location.md
|
|
664
|
+
.clinerules/android-ml-ondevice.md
|
|
665
|
+
.aiassistant/rules/compose-best-practices.md # JetBrains AI (per skill)
|
|
265
666
|
.aiassistant/rules/kmp-architecture-best-practices.md
|
|
266
667
|
.aiassistant/rules/compose-multiplatform-best-practices.md
|
|
267
668
|
.aiassistant/rules/kotlin-coroutines-best-practices.md
|
|
268
|
-
.
|
|
669
|
+
.aiassistant/rules/android-security-best-practices.md
|
|
670
|
+
.aiassistant/rules/android-performance-best-practices.md
|
|
671
|
+
.aiassistant/rules/play-store-readiness.md
|
|
672
|
+
.aiassistant/rules/android-testing-best-practices.md
|
|
673
|
+
.aiassistant/rules/android-accessibility-best-practices.md
|
|
674
|
+
.aiassistant/rules/android-build-infra.md
|
|
675
|
+
.aiassistant/rules/android-background-work.md
|
|
676
|
+
.aiassistant/rules/android-navigation-best-practices.md
|
|
677
|
+
.aiassistant/rules/play-billing-best-practices.md
|
|
678
|
+
.aiassistant/rules/firebase-best-practices.md
|
|
679
|
+
.aiassistant/rules/android-dependency-injection.md
|
|
680
|
+
.aiassistant/rules/android-networking.md
|
|
681
|
+
.aiassistant/rules/android-local-storage.md
|
|
682
|
+
.aiassistant/rules/android-auth-identity.md
|
|
683
|
+
.aiassistant/rules/android-media.md
|
|
684
|
+
.aiassistant/rules/android-ci-cd.md
|
|
685
|
+
.aiassistant/rules/android-maps-location.md
|
|
686
|
+
.aiassistant/rules/android-ml-ondevice.md
|
|
687
|
+
.amazonq/rules/compose-best-practices.md # Amazon Q (per skill)
|
|
269
688
|
.amazonq/rules/kmp-architecture-best-practices.md
|
|
270
689
|
.amazonq/rules/compose-multiplatform-best-practices.md
|
|
271
690
|
.amazonq/rules/kotlin-coroutines-best-practices.md
|
|
272
|
-
|
|
691
|
+
.amazonq/rules/android-security-best-practices.md
|
|
692
|
+
.amazonq/rules/android-performance-best-practices.md
|
|
693
|
+
.amazonq/rules/play-store-readiness.md
|
|
694
|
+
.amazonq/rules/android-testing-best-practices.md
|
|
695
|
+
.amazonq/rules/android-accessibility-best-practices.md
|
|
696
|
+
.amazonq/rules/android-build-infra.md
|
|
697
|
+
.amazonq/rules/android-background-work.md
|
|
698
|
+
.amazonq/rules/android-navigation-best-practices.md
|
|
699
|
+
.amazonq/rules/play-billing-best-practices.md
|
|
700
|
+
.amazonq/rules/firebase-best-practices.md
|
|
701
|
+
.amazonq/rules/android-dependency-injection.md
|
|
702
|
+
.amazonq/rules/android-networking.md
|
|
703
|
+
.amazonq/rules/android-local-storage.md
|
|
704
|
+
.amazonq/rules/android-auth-identity.md
|
|
705
|
+
.amazonq/rules/android-media.md
|
|
706
|
+
.amazonq/rules/android-ci-cd.md
|
|
707
|
+
.amazonq/rules/android-maps-location.md
|
|
708
|
+
.amazonq/rules/android-ml-ondevice.md
|
|
709
|
+
CONVENTIONS.md # Aider
|
|
273
710
|
.aider.conf.yml
|
|
274
711
|
```
|
|
275
712
|
|
|
@@ -342,6 +779,24 @@ compose-best-practices/
|
|
|
342
779
|
kmp-architecture-best-practices/
|
|
343
780
|
compose-multiplatform-best-practices/
|
|
344
781
|
kotlin-coroutines-best-practices/
|
|
782
|
+
android-security-best-practices/
|
|
783
|
+
android-performance-best-practices/
|
|
784
|
+
play-store-readiness/
|
|
785
|
+
android-testing-best-practices/
|
|
786
|
+
android-accessibility-best-practices/
|
|
787
|
+
android-build-infra/
|
|
788
|
+
android-background-work/
|
|
789
|
+
android-navigation-best-practices/
|
|
790
|
+
play-billing-best-practices/
|
|
791
|
+
firebase-best-practices/
|
|
792
|
+
android-dependency-injection/
|
|
793
|
+
android-networking/
|
|
794
|
+
android-local-storage/
|
|
795
|
+
android-auth-identity/
|
|
796
|
+
android-media/
|
|
797
|
+
android-ci-cd/
|
|
798
|
+
android-maps-location/
|
|
799
|
+
android-ml-ondevice/
|
|
345
800
|
README.md
|
|
346
801
|
```
|
|
347
802
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
---
|
|
3
|
+
name: android-accessibility-best-practices
|
|
4
|
+
description: Android accessibility — content descriptions, TalkBack, touch targets, contrast, Compose semantics.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Android Accessibility Best Practices
|
|
8
|
+
|
|
9
|
+
Cross-cutting skill — always activates alongside the project-type-specific skill.
|
|
10
|
+
|
|
11
|
+
## Hard Rules
|
|
12
|
+
- Provide contentDescription on all interactive non-text elements.
|
|
13
|
+
- Set contentDescription = null on purely decorative images.
|
|
14
|
+
- Minimum touch target size: 48dp × 48dp.
|
|
15
|
+
- Meet WCAG AA contrast ratios: 4.5:1 for normal text, 3:1 for large text.
|
|
16
|
+
- Never convey information by color alone — add icons, patterns, or labels.
|
|
17
|
+
- Ensure logical TalkBack reading order matches visual layout.
|
|
18
|
+
- Apply correct semantics (Role, stateDescription) on custom composables.
|
|
19
|
+
- Time-based content must be pausable or extendable.
|
|
20
|
+
- All form fields must have associated labels.
|
|
21
|
+
- Use sp (not dp) for text sizes to respect user font scaling.
|
|
22
|
+
|
|
23
|
+
## Core Patterns
|
|
24
|
+
- Use Modifier.semantics {} to expose custom component meaning.
|
|
25
|
+
- Use mergeDescendants to group related elements for TalkBack.
|
|
26
|
+
- Test with TalkBack enabled on a real device.
|
|
27
|
+
- Run Accessibility Scanner for automated checks.
|
|
28
|
+
- Support dynamic font sizes — test at maximum font scale.
|
|
29
|
+
- Verify dark theme meets contrast requirements separately.
|
|
30
|
+
|
|
31
|
+
## References
|
|
32
|
+
- references/content_descriptions.md
|
|
33
|
+
- references/talkback_navigation.md
|
|
34
|
+
- references/touch_targets.md
|
|
35
|
+
- references/color_contrast.md
|
|
36
|
+
- references/compose_semantics.md
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Color & Contrast
|
|
2
|
+
|
|
3
|
+
## WCAG AA Requirements
|
|
4
|
+
- Normal text (< 18sp or < 14sp bold): contrast ratio ≥ 4.5:1.
|
|
5
|
+
- Large text (≥ 18sp or ≥ 14sp bold): contrast ratio ≥ 3:1.
|
|
6
|
+
- Non-text elements (icons, borders, form fields): contrast ratio ≥ 3:1.
|
|
7
|
+
- WCAG AAA (optional, stricter): 7:1 for normal text, 4.5:1 for large text.
|
|
8
|
+
|
|
9
|
+
## Exceptions
|
|
10
|
+
- Disabled/inactive elements: no contrast requirement (but consider usability).
|
|
11
|
+
- Logos and decorative elements: no contrast requirement.
|
|
12
|
+
- Text within images: same contrast requirements as regular text.
|
|
13
|
+
|
|
14
|
+
## Color Independence
|
|
15
|
+
- Never use color alone to convey information (e.g., red=error, green=success).
|
|
16
|
+
- Add icons, patterns, underlines, or labels alongside color indicators.
|
|
17
|
+
- Error states: use error icon + red color + descriptive text.
|
|
18
|
+
- Charts/graphs: use patterns, labels, or shapes in addition to color.
|
|
19
|
+
|
|
20
|
+
## Dark Theme
|
|
21
|
+
- Verify contrast ratios for both light and dark themes separately.
|
|
22
|
+
- Dark theme surfaces use lighter text — ensure sufficient contrast.
|
|
23
|
+
- Surface color hierarchy matters: surface, surfaceVariant, surfaceContainer.
|
|
24
|
+
- Test dynamic theming (Material You) — user-generated colors may fail contrast.
|
|
25
|
+
|
|
26
|
+
## Tools
|
|
27
|
+
- Accessibility Scanner (Android): scans visible UI for contrast issues.
|
|
28
|
+
- WebAIM Contrast Checker: manual ratio calculation.
|
|
29
|
+
- Colour Contrast Analyser (desktop): eyedropper-based tool.
|
|
30
|
+
- Android Studio Layout Inspector: check rendered colors.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Compose Semantics
|
|
2
|
+
|
|
3
|
+
## Modifier.semantics
|
|
4
|
+
- Use Modifier.semantics { } to add accessibility information to composables.
|
|
5
|
+
- mergeDescendants = true: combines child semantics into a single TalkBack announcement.
|
|
6
|
+
- clearAndSetSemantics { }: removes all child semantics and sets custom ones.
|
|
7
|
+
|
|
8
|
+
## Roles
|
|
9
|
+
- Role.Button: announces as "button" (double-tap to activate).
|
|
10
|
+
- Role.Checkbox, Role.Switch, Role.RadioButton: announces toggle state.
|
|
11
|
+
- Role.Tab: announces as "tab" with position.
|
|
12
|
+
- Role.Image: announces as "image".
|
|
13
|
+
- Set via: Modifier.semantics { role = Role.Button }.
|
|
14
|
+
|
|
15
|
+
## State Description
|
|
16
|
+
- stateDescription: announces the current state (e.g., "Selected", "Expanded", "50%").
|
|
17
|
+
- toggleableState: ToggleableState.On, Off, Indeterminate.
|
|
18
|
+
- selected: Boolean for selectable items.
|
|
19
|
+
- Use for custom components that have states TalkBack should announce.
|
|
20
|
+
|
|
21
|
+
## Headings & Structure
|
|
22
|
+
- heading(): marks element as a heading for navigation.
|
|
23
|
+
- Modifier.semantics { heading() } — TalkBack users can jump between headings.
|
|
24
|
+
- Use for screen titles, section headers, group labels.
|
|
25
|
+
|
|
26
|
+
## Content & Actions
|
|
27
|
+
- contentDescription: text read by TalkBack.
|
|
28
|
+
- customActions: list of CustomAccessibilityAction for contextual actions.
|
|
29
|
+
- onClick(label = "action description") { }: labeled click action.
|
|
30
|
+
- disabled(): marks element as non-interactive.
|
|
31
|
+
- error("message"): announces error state.
|
|
32
|
+
|
|
33
|
+
## Password & Input
|
|
34
|
+
- password(): hides text from TalkBack, announces "password".
|
|
35
|
+
- editableText: programmatic text for text fields.
|
|
36
|
+
- textSelectionRange: cursor position information.
|
|
37
|
+
- imeAction: announces expected keyboard action.
|
|
38
|
+
|
|
39
|
+
## Live Regions
|
|
40
|
+
- liveRegion = LiveRegionMode.Polite: announce changes when idle.
|
|
41
|
+
- liveRegion = LiveRegionMode.Assertive: announce changes immediately.
|
|
42
|
+
- Use for: toast messages, loading states, live counters, error banners.
|
|
43
|
+
|
|
44
|
+
## Testing Semantics
|
|
45
|
+
- Use ComposeTestRule.onNodeWithText().assertHasClickAction().
|
|
46
|
+
- assert(SemanticsMatcher.keyIsDefined(SemanticsProperties.Heading)).
|
|
47
|
+
- printToLog() to dump the semantic tree for debugging.
|
|
48
|
+
- Verify role, state, and content description in tests.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Content Descriptions
|
|
2
|
+
|
|
3
|
+
## Required Elements
|
|
4
|
+
- All interactive non-text elements: IconButton, Image (clickable), FAB, custom icons.
|
|
5
|
+
- Compose: Image(contentDescription = "description") or Icon(contentDescription = "description").
|
|
6
|
+
- View system: android:contentDescription or setContentDescription().
|
|
7
|
+
|
|
8
|
+
## Decorative Elements
|
|
9
|
+
- Set contentDescription = null on decorative images (Compose).
|
|
10
|
+
- View system: android:importantForAccessibility="no".
|
|
11
|
+
- Decorative = adds no information beyond what's already visible as text.
|
|
12
|
+
|
|
13
|
+
## Writing Descriptions
|
|
14
|
+
- Describe the action, not the appearance: "Delete item" not "Red trash can icon".
|
|
15
|
+
- Keep it concise: 2–5 words is ideal.
|
|
16
|
+
- Avoid "button" or "image" — TalkBack announces the role automatically.
|
|
17
|
+
- Match the language of the UI locale.
|
|
18
|
+
|
|
19
|
+
## Dynamic Descriptions
|
|
20
|
+
- Update contentDescription when state changes (e.g., "Play" → "Pause").
|
|
21
|
+
- Use stateDescription for toggle states (e.g., "Selected", "Expanded").
|
|
22
|
+
- Compose: Modifier.semantics { stateDescription = "Expanded" }.
|
|
23
|
+
|
|
24
|
+
## Icon + Text Combinations
|
|
25
|
+
- If an icon is next to text that describes it, set icon contentDescription = null.
|
|
26
|
+
- TalkBack reads both — redundant descriptions cause confusion.
|
|
27
|
+
- Use mergeDescendants to group icon and text into one TalkBack announcement.
|
|
28
|
+
|
|
29
|
+
## Live Regions
|
|
30
|
+
- Use Modifier.semantics { liveRegion = LiveRegionMode.Polite } for dynamic updates.
|
|
31
|
+
- Polite: announces when TalkBack is idle. Assertive: interrupts immediately.
|
|
32
|
+
- Use for: snackbars, loading indicators, real-time counters.
|