opencode-skills-collection 3.0.42 → 3.0.43

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.
Files changed (26) hide show
  1. package/README.md +10 -0
  2. package/bundled-skills/.antigravity-install-manifest.json +3 -1
  3. package/bundled-skills/2slides-ppt-generator/SKILL.md +8 -18
  4. package/bundled-skills/accesslint-diff/SKILL.md +5 -2
  5. package/bundled-skills/android-dev/SKILL.md +524 -0
  6. package/bundled-skills/android-dev/references/flutter.md +269 -0
  7. package/bundled-skills/android-dev/references/hybrid.md +158 -0
  8. package/bundled-skills/android-dev/references/java-android.md +586 -0
  9. package/bundled-skills/android-dev/references/kmm.md +206 -0
  10. package/bundled-skills/android-dev/references/native-android.md +239 -0
  11. package/bundled-skills/android-dev/references/react-native.md +242 -0
  12. package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
  13. package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
  14. package/bundled-skills/docs/maintainers/repo-growth-seo.md +3 -3
  15. package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
  16. package/bundled-skills/docs/users/bundles.md +1 -1
  17. package/bundled-skills/docs/users/claude-code-skills.md +1 -1
  18. package/bundled-skills/docs/users/gemini-cli-skills.md +1 -1
  19. package/bundled-skills/docs/users/getting-started.md +1 -1
  20. package/bundled-skills/docs/users/kiro-integration.md +1 -1
  21. package/bundled-skills/docs/users/usage.md +4 -4
  22. package/bundled-skills/docs/users/visual-guide.md +4 -4
  23. package/bundled-skills/event-staffing-ordering/SKILL.md +2 -17
  24. package/bundled-skills/unship/SKILL.md +138 -0
  25. package/package.json +1 -1
  26. package/skills_index.json +44 -0
package/README.md CHANGED
@@ -220,3 +220,13 @@ To use the latest beta version, update your `~/.config/opencode/opencode.json`:
220
220
  ## License
221
221
 
222
222
  [MIT ©](./LICENSE)
223
+
224
+ ## Star History
225
+
226
+ <a href="https://www.star-history.com/?repos=FrancoStino%2Fopencode-skills-collection&type=date&legend=top-left">
227
+ <picture>
228
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=FrancoStino/opencode-skills-collection&type=date&theme=dark&legend=top-left" />
229
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=FrancoStino/opencode-skills-collection&type=date&legend=top-left" />
230
+ <img alt="Star History Chart" src="https://api.star-history.com/chart?repos=FrancoStino/opencode-skills-collection&type=date&legend=top-left" />
231
+ </picture>
232
+ </a>
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "updatedAt": "2026-06-10T02:07:01.120Z",
3
+ "updatedAt": "2026-06-11T02:30:21.005Z",
4
4
  "entries": [
5
5
  "00-andruia-consultant",
6
6
  "007",
@@ -65,6 +65,7 @@
65
65
  "analytics-tracking",
66
66
  "analyze-project",
67
67
  "andrej-karpathy",
68
+ "android-dev",
68
69
  "android-jetpack-compose-expert",
69
70
  "android_ui_verification",
70
71
  "angular",
@@ -1422,6 +1423,7 @@
1422
1423
  "unity-developer",
1423
1424
  "unity-ecs-patterns",
1424
1425
  "unreal-engine-cpp-pro",
1426
+ "unship",
1425
1427
  "unslop",
1426
1428
  "unsplash-integration",
1427
1429
  "upgrading-expo",
@@ -450,25 +450,16 @@ python scripts/generate_narration.py --job-id "abc-123-def-456"
450
450
  # Single speaker, specific voice
451
451
  python scripts/generate_narration.py --job-id "abc-123-def-456" --voice Aoede
452
452
 
453
- # No speaker intro
454
- python scripts/generate_narration.py --job-id "abc-123-def-456" --no-intro
455
-
456
- # Multi-speaker (names required)
457
- python scripts/generate_narration.py --job-id "abc-123-def-456" --multi-speaker \
458
- --speaker1-name "Alice" --speaker2-name "Bob" \
459
- --speaker1-voice Aoede --speaker2-voice Puck
453
+ # Multi-speaker mode
454
+ python scripts/generate_narration.py --job-id "abc-123-def-456" --multi-speaker
460
455
  ```
461
456
 
462
457
  **Parameters (aligned with [2slides API](https://2slides.com/api.md)):**
463
458
  - `--job-id`: Job ID (required, UUID for Nano Banana)
464
- - `--mode`: `single` or `multi` (default: single)
465
- - `--speaker-name`: Speaker name (single mode)
466
459
  - `--voice`: Voice name (default: Puck); use `--list-voices` for all 30
467
- - `--content-mode`: `concise` or `standard` (default: standard)
468
- - `--no-intro`: Omit speaker introduction (single mode)
469
- - `--speaker1-name`, `--speaker2-name`: Required for multi mode
470
- - `--speaker1-voice`, `--speaker2-voice`: Optional for multi mode
471
- - `--multi-speaker`: Shortcut for `--mode multi`
460
+ - `--language`: Narration language (default: Auto)
461
+ - `--multi-speaker`: Enable multi-speaker mode
462
+ - `--list-voices`: Print the supported voices without calling the API
472
463
 
473
464
  **Step 3: Check Status**
474
465
 
@@ -717,10 +708,9 @@ All scripts accept parameters that match [2slides API](https://2slides.com/api.m
717
708
  | | `--resolution` | 1K, 2K, 4K |
718
709
  | | `--content-detail` | concise, standard |
719
710
  | `create_pdf_slides.py` | Same as above + `--design-style` / `--design-spec` (free text) | |
720
- | `generate_narration.py` | `--mode` | single, multi |
721
- | | `--voice` | 30 voices (Puck, Aoede, Charon, …); use `--list-voices` |
722
- | | `--content-mode` | concise, standard |
723
- | | Multi: `--speaker1-name`, `--speaker2-name`, `--speaker1-voice`, `--speaker2-voice` | |
711
+ | `generate_narration.py` | `--voice` | 30 voices (Puck, Aoede, Charon, …); use `--list-voices` |
712
+ | | `--language` | Auto, English, Spanish, Arabic, Portuguese, Indonesian, Japanese, Russian, Hindi, French, German, Vietnamese, Turkish, Polish, Italian, Korean, Simplified Chinese, Traditional Chinese |
713
+ | | `--multi-speaker` | enabled when present |
724
714
  | `search_themes.py` | `--query` (required), `--limit` (1–100) | |
725
715
  | `get_job_status.py` | `--job-id` (required) | |
726
716
  | `download_slides_pages_voices.py` | `--job-id` (required), `--output` (path) | |
@@ -34,14 +34,17 @@ npx -y @accesslint/cli@latest "<url>" --port "$PORT" --snapshot accesslint-diff
34
34
 
35
35
  Branch switching triggers a rebuild but not a browser reload — the CLI opens a fresh tab each time so it always reads the current build. Use `--wait-for "<selector>"` to gate the audit until the rebuild is ready; without it, warn the user that a slow build may yield a stale baseline.
36
36
 
37
+ Keep the branch value in the quoted `branch` variable below; never paste or evaluate a branch name as shell syntax.
38
+
37
39
  ```bash
38
40
  git diff --quiet && git diff --cached --quiet || git stash push -u -m "accesslint-diff-branch"
39
41
  branch="<branch>"
40
42
  git check-ref-format --branch "$branch" >/dev/null
41
43
  case "$branch" in -*) echo "Refusing option-like branch name: $branch" >&2; exit 1 ;; esac
42
- git checkout -- "$branch"
44
+ git rev-parse --verify --quiet "$branch^{commit}" >/dev/null
45
+ git switch "$branch"
43
46
  npx -y @accesslint/cli@latest "<url>" --port "$PORT" --snapshot accesslint-diff --snapshot-dir /tmp --update-snapshot [--wait-for "<selector>"]
44
- git checkout - && git stash pop 2>/dev/null
47
+ git switch - && git stash pop 2>/dev/null
45
48
  npx -y @accesslint/cli@latest "<url>" --port "$PORT" --snapshot accesslint-diff --snapshot-dir /tmp --format json [--wait-for "<selector>"]
46
49
  ```
47
50
 
@@ -0,0 +1,524 @@
1
+ ---
2
+ name: android-dev
3
+ description: "Production-grade Android app development guide covering native (Kotlin/Java), cross-platform (Flutter, RN, KMM), and hybrid architectures."
4
+ risk: safe
5
+ source: community
6
+ date_added: "2026-06-08"
7
+ ---
8
+
9
+ # Android App Development Skill
10
+
11
+ ## Overview
12
+
13
+ This skill guides production-grade Android and cross-platform (non-iOS) app development following practices used at big tech companies. It covers the entire development lifecycle — architecture, UI, code quality, testing, error handling, release, and maintenance.
14
+
15
+ ## When to Use This Skill
16
+
17
+ - Use when deciding on a tech stack (see §1 Stack Selection)
18
+ - Use when setting up project architecture (see §2 Architecture)
19
+ - Use when designing UI, screens, or a design system (see §3 UI & Design)
20
+ - Use when ensuring code quality, patterns, or APIs (see Best Practices)
21
+ - Use when implementing error handling or debugging crashes (see §5 Error Handling)
22
+ - Use when planning testing strategy (see §6 Testing)
23
+ - Use when configuring build, CI/CD, or release pipelines (see §7 Build & Release)
24
+ - Use when optimizing performance or memory (see §8 Performance)
25
+ - Use when debugging or fixing bugs (see §9 Debugging)
26
+ - Use when following the full development roadmap (see §10 Development Roadmap)
27
+ - Use when needing deep reference for a stack (see `references/` directory)
28
+
29
+ ---
30
+
31
+ ## §1 Stack Selection
32
+
33
+ Choose based on team, requirements, and platform targets. **Do not recommend iOS-specific paths.**
34
+
35
+ ### Native Android — Kotlin + Jetpack Compose
36
+ **Best for:** Android-only apps, hardware-intensive features, best-in-class UX, new projects.
37
+ - Language: **Kotlin**
38
+ - UI: **Jetpack Compose** (modern declarative UI)
39
+ - Key libs: Room, Retrofit/Ktor, Hilt, WorkManager, DataStore, Navigation Compose
40
+ - Reference: `references/native-android.md`
41
+
42
+ ### Native Android — Java + XML Views
43
+ **Best for:** Existing Java codebases, teams without Kotlin experience, legacy app maintenance, incremental Kotlin migration.
44
+ - Language: **Java** (fully supported by Google, not deprecated)
45
+ - UI: **XML Layouts** (ConstraintLayout, RecyclerView, ViewBinding)
46
+ - Key libs: Room, Retrofit, Hilt, WorkManager, LiveData, ViewModel
47
+ - Java and Kotlin **coexist seamlessly** in the same project — migrate incrementally
48
+ - Reference: `references/java-android.md`
49
+
50
+ ### Flutter (Dart)
51
+ **Best for:** Android + Web (+ desktop) from one codebase, fast iteration, pixel-perfect custom UI.
52
+ - Language: **Dart**
53
+ - UI: Flutter Widget tree (Material 3 / Cupertino widgets available but target Material for Android)
54
+ - Key libs: Provider/Riverpod/Bloc, Dio, Drift/Isar, go_router, flutter_local_notifications
55
+ - Reference: `references/flutter.md`
56
+
57
+ ### React Native (JavaScript/TypeScript)
58
+ **Best for:** Web + Android code sharing, JS/TS teams, rich ecosystem.
59
+ - Language: **TypeScript** (preferred)
60
+ - UI: React Native core components + NativeWind / React Native Paper
61
+ - Key libs: React Navigation, Zustand/Redux Toolkit, React Query, MMKV
62
+ - Reference: `references/react-native.md`
63
+
64
+ ### Kotlin Multiplatform (KMM / Compose Multiplatform)
65
+ **Best for:** Sharing business logic across Android + Desktop + Web while keeping native Android UI.
66
+ - Language: **Kotlin** everywhere
67
+ - UI: Native Compose on Android; Compose Multiplatform for shared UI
68
+ - Key libs: Ktor, SQLDelight, Koin, kotlinx.serialization, Napier
69
+ - Reference: `references/kmm.md`
70
+
71
+ ### Hybrid (Capacitor / Ionic)
72
+ **Best for:** Web-first teams, simple apps, PWA-like content apps.
73
+ - Language: TypeScript + HTML/CSS
74
+ - UI: Ionic components or custom web UI
75
+ - Avoid for: Heavy animations, native sensor access, high-performance games
76
+ - Reference: `references/hybrid.md`
77
+
78
+ ### Decision Matrix
79
+
80
+ | Requirement | Native Kotlin | Native Java | Flutter | RN | KMM | Hybrid |
81
+ |---|---|---|---|---|---|---|
82
+ | Android-only (new) | ✅ Best | ✅ | ✅ | ✅ | ✅ | ✅ |
83
+ | Android-only (existing Java) | ⚠️ migrate | ✅ Best | ❌ | ❌ | ⚠️ | ❌ |
84
+ | Android + Web | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ Best |
85
+ | Android + Desktop | ❌ | ❌ | ✅ | ⚠️ | ✅ | ⚠️ |
86
+ | Shared business logic only | N/A | N/A | N/A | N/A | ✅ Best | N/A |
87
+ | Native performance | ✅ | ✅ | ✅ | ⚠️ | ✅ | ❌ |
88
+ | JS/TS team | ❌ | ❌ | ❌ | ✅ Best | ❌ | ✅ |
89
+ | Custom pixel-perfect UI | ✅ | ⚠️ | ✅ Best | ⚠️ | ✅ | ❌ |
90
+
91
+ ---
92
+
93
+ ## §2 Architecture
94
+
95
+ ### Core Principle: Separation of Concerns
96
+ Every production Android project must separate **UI**, **business logic**, and **data** into distinct, independently testable layers.
97
+
98
+ ### Recommended Architecture: Clean Architecture + MVI/MVVM
99
+
100
+ ```
101
+ app/
102
+ ├── ui/ # Composables / Activities / Fragments / Screen states
103
+ ├── presentation/ # ViewModels, UI State, UI Events
104
+ ├── domain/ # Use cases, domain models, repository interfaces
105
+ ├── data/ # Repository impl, remote (API), local (DB), mappers
106
+ └── di/ # Dependency injection modules
107
+ ```
108
+
109
+ **Data flow (unidirectional):**
110
+ ```
111
+ User Action → ViewModel/Store → Use Case → Repository → Data Source
112
+
113
+ UI State (sealed class / StateFlow)
114
+
115
+ Composable / View renders state
116
+ ```
117
+
118
+ ### Key Architecture Patterns by Stack
119
+
120
+ **Native (MVVM + MVI):**
121
+ - `StateFlow` / `SharedFlow` for reactive state
122
+ - `sealed class UiState` + `sealed class UiEvent`
123
+ - Hilt for DI, coroutines + Flow for async
124
+ - Repository pattern wrapping Room + Retrofit
125
+
126
+ **Flutter (BLoC or Riverpod):**
127
+ - `Bloc` or `Cubit` for business logic isolation
128
+ - `AsyncNotifierProvider` (Riverpod) for data + state
129
+ - Repositories as abstract classes with impl injected
130
+
131
+ **React Native (Redux Toolkit or Zustand):**
132
+ - RTK Query or React Query for server state
133
+ - Zustand slices for client state
134
+ - Custom hooks to encapsulate business logic per feature
135
+
136
+ **KMM:**
137
+ - Shared `commonMain` holds domain + data layers
138
+ - `expect/actual` for platform-specific implementations
139
+ - Kotlin coroutines + Flow bridged to platform (StateFlow on Android)
140
+
141
+ ### Module Structure (Multi-module for large apps)
142
+
143
+ ```
144
+ :app # Entry point, DI wiring
145
+ :core:ui # Design system, shared composables
146
+ :core:network # API client, interceptors
147
+ :core:database # Room / SQLDelight setup
148
+ :feature:home
149
+ :feature:profile
150
+ :feature:settings
151
+ ```
152
+
153
+ ---
154
+
155
+ ## §3 UI & Design
156
+
157
+ ### Design System First
158
+ Before writing screens, define:
159
+ 1. **Color tokens** — Primary, secondary, surface, on-surface, error; light + dark variants
160
+ 2. **Typography scale** — Display, headline, title, body, label (Material 3 type system)
161
+ 3. **Spacing scale** — 4dp grid system (4, 8, 12, 16, 24, 32, 48dp)
162
+ 4. **Shape tokens** — Corner radii per component family
163
+ 5. **Component library** — Button, TextField, Card, BottomSheet, TopAppBar, etc.
164
+
165
+ ### Jetpack Compose UI Rules
166
+ - Use `MaterialTheme` tokens; never hardcode colors/dimensions
167
+ - `CompositionLocal` for theme, locale, haptics
168
+ - `remember` / `rememberSaveable` correctly (saveable for UI state surviving rotation)
169
+ - Extract large composables into sub-composables; each function ≤ 80 lines
170
+ - Use `LazyColumn`/`LazyVerticalGrid` for lists; never `Column` with forEach for large data
171
+ - Side effects only in `LaunchedEffect`, `DisposableEffect`, `SideEffect`
172
+ - Avoid state hoisting anti-patterns: hoist state to the lowest common ancestor
173
+
174
+ ### Accessibility (Non-Negotiable)
175
+ - All interactive elements: `contentDescription` or `semantics { }`
176
+ - Min touch target: **48×48dp**
177
+ - `TalkBack` compatibility tested before every release
178
+ - Dynamic text size support (`sp` not `dp` for text)
179
+ - Color contrast ratio ≥ 4.5:1 (WCAG AA)
180
+
181
+ ### Navigation
182
+ - **Native:** Navigation Compose with typed `NavHost` and `SafeArgs` equivalent
183
+ - **Flutter:** `go_router` with named routes and guards
184
+ - **RN:** React Navigation v7 with typed `NavigationProp`
185
+ - Deep link handling registered for every screen that can be externally opened
186
+ - Back stack managed deliberately — don't push duplicates, use `popUpTo` / `launchSingleTop`
187
+
188
+ ### Responsive & Adaptive UI
189
+ - Support all screen sizes: phones, foldables, tablets (`WindowSizeClass`)
190
+ - Test at 320dp, 360dp, 411dp, 600dp+, 840dp+ widths
191
+ - Foldable hinge awareness via `WindowInfoTracker`
192
+ - Edge-to-edge display + `WindowInsets` handling required for Android 15+
193
+
194
+ ---
195
+
196
+ ## Best Practices
197
+
198
+ ### Language Standards
199
+
200
+ **Kotlin:**
201
+ - Prefer `data class`, `sealed class`, `object`, `enum class` appropriately
202
+ - No `!!` null assertions — use `?.let`, `?: return`, `requireNotNull` with message
203
+ - Coroutines: always specify `CoroutineScope` + `Dispatcher` explicitly; never `GlobalScope`
204
+ - Use `@Stable` / `@Immutable` on Compose state classes for smart recomposition
205
+
206
+ **Java:**
207
+ - `@NonNull` / `@Nullable` annotations on every method param and return type
208
+ - Never call methods on unchecked objects — null-check explicitly or use `Objects.requireNonNull`
209
+ - Always null `binding` reference in Fragment's `onDestroyView()` to prevent memory leaks
210
+ - Use `ExecutorService` (not `AsyncTask` — deprecated) for background work; or `LiveData` + Room's built-in threading
211
+ - Prefer `ListAdapter` + `DiffUtil` over manual `notifyDataSetChanged()` in RecyclerView
212
+ - Use `ViewBinding` — never `findViewById`
213
+
214
+ **Dart (Flutter):**
215
+ - Null safety required — no `!` without explicit null check above
216
+ - Immutable state objects with `copyWith`
217
+ - `const` constructors on all stateless widgets
218
+
219
+ **TypeScript (RN):**
220
+ - `strict: true` in tsconfig always
221
+ - Zod or io-ts for runtime type validation of API responses
222
+ - No `any` — use `unknown` and narrow
223
+
224
+ ### Dependency Management
225
+ - Pin all dependency versions in `build.gradle.kts` / `pubspec.yaml` / `package.json`
226
+ - Audit dependencies monthly for security vulnerabilities
227
+ - Avoid transitive dependency conflicts — use dependency resolution strategies
228
+ - Keep dependency count minimal — every added lib is a maintenance burden
229
+
230
+ ### Code Review Checklist (PR gate)
231
+ - [ ] New public APIs have KDoc / DartDoc / JSDoc
232
+ - [ ] No hardcoded strings — use string resources / l10n
233
+ - [ ] No hardcoded dimensions or colors outside design tokens
234
+ - [ ] No blocking I/O on main thread
235
+ - [ ] No memory leaks (no `Activity` context stored in singletons)
236
+ - [ ] Coroutine scopes / streams properly cancelled / disposed
237
+ - [ ] Feature flag guarding any non-trivial feature
238
+
239
+ ---
240
+
241
+ ## §5 Error Handling
242
+
243
+ ### The Golden Rule
244
+ **Never let exceptions propagate to the user silently or crash the app.**
245
+
246
+ ### Error Classification
247
+
248
+ | Type | Strategy |
249
+ |------|----------|
250
+ | Network errors | Retry with exponential backoff; show retry UI |
251
+ | Auth errors (401/403) | Refresh token → re-request → logout if fails |
252
+ | Validation errors | Show inline field errors immediately |
253
+ | Data parsing errors | Log + fallback to cached/default state |
254
+ | Unexpected crashes | Catch at top-level; show error screen + report |
255
+ | Background task failures | Retry via WorkManager; notify user if critical |
256
+
257
+ ### Result / Either Pattern (Kotlin)
258
+ ```kotlin
259
+ sealed class AppResult<out T> {
260
+ data class Success<T>(val data: T) : AppResult<T>()
261
+ data class Error(val exception: AppException) : AppResult<Nothing>()
262
+ }
263
+
264
+ sealed class AppException(msg: String) : Exception(msg) {
265
+ class NetworkException(msg: String) : AppException(msg)
266
+ class AuthException(msg: String) : AppException(msg)
267
+ class ParseException(msg: String) : AppException(msg)
268
+ class UnknownException(msg: String) : AppException(msg)
269
+ }
270
+ ```
271
+
272
+ Use `AppResult<T>` as return type for all repository + use case functions. ViewModels map to `UiState.Error`.
273
+
274
+ ### Crash Reporting
275
+ - Integrate **Firebase Crashlytics** or **Sentry** from day one
276
+ - Set user identifiers and custom keys before crash occurs
277
+ - Non-fatal exceptions logged for all caught errors
278
+ - ANR monitoring enabled
279
+ - Crash-free sessions target: **≥ 99.5%**
280
+
281
+ ### Offline / Network Resilience
282
+ - Cache-first strategy: show stale data, fetch fresh in background
283
+ - `Room` / `Drift` / `MMKV` as single source of truth
284
+ - Expose network state via `ConnectivityManager` and reflect in UI
285
+ - All network calls wrapped with timeout + retry policy
286
+
287
+ ---
288
+
289
+ ## §6 Testing
290
+
291
+ ### Testing Pyramid
292
+
293
+ ```
294
+ /\
295
+ /E2E\ ← 10% (UI tests: Espresso, Maestro, Appium)
296
+ /------\
297
+ / Integr \ ← 20% (Repository, DB, API contract tests)
298
+ /----------\
299
+ / Unit \ ← 70% (ViewModels, Use Cases, Utilities)
300
+ /--------------\
301
+ ```
302
+
303
+ ### Unit Tests (70%)
304
+ - Every ViewModel, UseCase, Repository, Mapper tested
305
+ - **Native:** JUnit5 + MockK + Turbine (Flow testing) + Kotest assertions
306
+ - **Flutter:** `flutter_test` + `mocktail`
307
+ - **RN:** Jest + `@testing-library/react-native` + `msw` for API mocking
308
+ - Coverage target: **≥ 80%** on domain + presentation layers
309
+
310
+ ### Integration Tests (20%)
311
+ - Room DB tests with in-memory database
312
+ - Retrofit/Ktor tests with `MockWebServer` (OkHttp)
313
+ - Repository tests verifying cache + remote coordination
314
+ - API contract tests against real staging endpoint
315
+
316
+ ### UI / E2E Tests (10%)
317
+ - **Espresso** for critical user journeys (login, checkout, core action)
318
+ - **Maestro** for cross-platform E2E flows (recommended for Flutter + RN too)
319
+ - Run on real device farm (Firebase Test Lab / BrowserStack) before release
320
+ - Smoke test suite runs on every PR; full E2E suite nightly
321
+
322
+ ### Test Data Management
323
+ - Use factories / builders for test data, never copy-paste objects
324
+ - Hermetic tests: never share mutable state between test cases
325
+ - Fakes over mocks for complex dependencies (repositories, data sources)
326
+
327
+ ---
328
+
329
+ ## §7 Build & Release
330
+
331
+ ### Build Variants
332
+ ```
333
+ debug → dev API, logging on, no minification, debuggable
334
+ staging → staging API, logging on, minified, not debuggable
335
+ release → prod API, logging off, minified, signed
336
+ ```
337
+
338
+ ### Gradle Best Practices (Native)
339
+ - `build.gradle.kts` only — no Groovy DSL in new projects
340
+ - Version catalog (`libs.versions.toml`) for all dependency versions
341
+ - `buildConfig` for environment-specific constants
342
+ - Baseline profiles for startup performance
343
+ - R8 full mode enabled in release; maintain proguard rules in version control
344
+
345
+ ### CI/CD Pipeline
346
+
347
+ ```
348
+ PR Opened
349
+ └─ lint + unit tests + build debug APK [< 5 min]
350
+
351
+ Merge to main
352
+ └─ unit + integration tests + staging build [< 15 min]
353
+ └─ deploy to Firebase App Distribution (QA)
354
+
355
+ Release tag
356
+ └─ full test suite + E2E on device farm [< 45 min]
357
+ └─ build release AAB
358
+ └─ upload to Play Console (internal track)
359
+ └─ promote: internal → closed testing → open → production
360
+ ```
361
+
362
+ **Recommended CI:** GitHub Actions, Bitrise, or CircleCI.
363
+
364
+ ### Play Store Release Strategy
365
+ - Always release to **internal → closed → open testing** before production
366
+ - Use **staged rollouts**: 5% → 20% → 50% → 100% with 24-48h monitoring
367
+ - Monitor Crashlytics + ANR rate + rating before expanding rollout
368
+ - **Never skip staged rollout** for significant changes
369
+
370
+ ### App Signing
371
+ - Upload key (Play App Signing): stored in CI secrets, never committed
372
+ - Use Google Play App Signing for distribution key management
373
+ - Document key recovery procedure in team runbook
374
+
375
+ ---
376
+
377
+ ## §8 Performance
378
+
379
+ ### Startup Performance
380
+ - App startup time target: **cold start < 1s**, warm start < 500ms
381
+ - Use **App Startup library** for initializing libraries lazily
382
+ - Baseline profiles generated + committed to repo
383
+ - Heavy initialization moved off main thread
384
+
385
+ ### UI Performance
386
+ - Target: **60fps** (90/120fps on supported devices); **zero jank**
387
+ - Measure with **Android Studio Profiler** + `FrameMetrics` API
388
+ - Avoid allocation in `draw()` / `onMeasure()` / composition
389
+ - Use `derivedStateOf` in Compose to avoid unnecessary recompositions
390
+ - Image loading: Coil (Compose) / Glide / Picasso — never load full-res in thumbnails
391
+
392
+ ### Memory
393
+ - No `Activity` / `Context` references in ViewModels or singletons
394
+ - WeakReferences for listeners stored beyond their owner's lifecycle
395
+ - Bitmap recycling and memory cache sizing
396
+ - Heap dump + leak detection via **LeakCanary** in debug builds (always)
397
+
398
+ ### Network
399
+ - HTTP caching headers respected
400
+ - Image CDN + WebP format
401
+ - Gzip/Brotli compression verified
402
+ - Request batching where applicable
403
+ - Connection pooling configured
404
+
405
+ ### Battery
406
+ - Background work only via **WorkManager** with appropriate constraints
407
+ - Location updates: request only needed accuracy level; stop when backgrounded
408
+ - Wakelocks used sparingly with explicit release
409
+
410
+ ---
411
+
412
+ ## §9 Debugging & Bug Fixing
413
+
414
+ ### Debugging Process
415
+
416
+ 1. **Reproduce reliably** — document exact steps, device, OS version, account state
417
+ 2. **Isolate** — is it UI, business logic, network, or persistence?
418
+ 3. **Instrument** — add targeted logs / breakpoints, NOT shotgun logging
419
+ 4. **Hypothesize** — form 1-3 specific hypotheses before touching code
420
+ 5. **Fix the root cause** — never patch symptoms; trace back to the source
421
+ 6. **Regression test** — write a test that fails before fix, passes after
422
+ 7. **Document** — comment explaining why the fix works, not just what it does
423
+
424
+ ### Common Android Bug Patterns
425
+
426
+ | Bug | Likely Cause | Fix |
427
+ |-----|-------------|-----|
428
+ | ANR | Main thread I/O / long computation | Move to coroutine/Dispatcher.IO |
429
+ | Memory leak | Context stored in singleton | Use `applicationContext`; WeakRef |
430
+ | Crash on rotation | ViewModel not used; state not saved | `rememberSaveable` / ViewModel |
431
+ | UI lag | Recomposition loops | `derivedStateOf`, stable params |
432
+ | Blank screen after API call | Error swallowed silently | Check error state propagation |
433
+ | Deep link not working | Manifest intent-filter missing | Verify `adb shell am start` test |
434
+ | Push notification silent | Background restrictions | Test on real devices across OEMs |
435
+
436
+ ### Logging Standards
437
+ - **Production:** Firebase Crashlytics only (no `Log.d` in release builds)
438
+ - **Debug/Staging:** Timber with debug tree
439
+ - Log levels: ERROR (crashes), WARN (recoverable), INFO (key events), DEBUG (dev only)
440
+ - Never log PII — mask emails, phone numbers, tokens in logs
441
+
442
+ ### OEM-Specific Issues
443
+ - Test on **Samsung**, **Xiaomi/MIUI**, **OnePlus/OxygenOS**, **Huawei (no GMS)** for critical flows
444
+ - Background restrictions vary widely by OEM — test push, alarms, background sync
445
+ - Maintain a physical or cloud device farm with top market-share devices
446
+
447
+ ---
448
+
449
+ ## §10 Development Roadmap
450
+
451
+ Follow this phase structure for any new Android project:
452
+
453
+ ### Phase 0 — Foundation (Week 1-2)
454
+ - [ ] Stack decision documented with rationale
455
+ - [ ] Module structure defined
456
+ - [ ] Design system tokens defined (colors, type, spacing, shapes)
457
+ - [ ] CI pipeline running (lint + unit tests + build)
458
+ - [ ] Crash reporting integrated (Crashlytics/Sentry)
459
+ - [ ] Analytics baseline integrated (Firebase/Amplitude)
460
+ - [ ] API contract / mock server set up
461
+ - [ ] DI framework configured
462
+ - [ ] Navigation skeleton implemented
463
+ - [ ] Flavor/build variant config complete
464
+
465
+ ### Phase 1 — Core Features (Weeks 3-8)
466
+ - [ ] Auth flow (login, register, token refresh, logout)
467
+ - [ ] Core screen shells with real navigation
468
+ - [ ] Network layer (client, interceptors, error handling)
469
+ - [ ] Local persistence layer (DB schema + DAOs)
470
+ - [ ] Repository layer wiring remote + local
471
+ - [ ] ViewModels + UI states for each feature
472
+ - [ ] Unit tests for all ViewModels + use cases
473
+ - [ ] Feature flags infrastructure
474
+
475
+ ### Phase 2 — Polish (Weeks 9-12)
476
+ - [ ] Design QA pass against Figma/spec
477
+ - [ ] Accessibility audit (TalkBack, contrast, touch targets)
478
+ - [ ] Dark mode implementation + verification
479
+ - [ ] Localization (strings externalized, RTL support if needed)
480
+ - [ ] Loading, empty, error states on every screen
481
+ - [ ] Deep link handling
482
+ - [ ] Widget / notification implementation
483
+ - [ ] Offline mode verification
484
+
485
+ ### Phase 3 — Hardening (Weeks 12-14)
486
+ - [ ] Performance profiling (startup, scroll, memory)
487
+ - [ ] E2E test suite on device farm (Firebase Test Lab)
488
+ - [ ] Security review (certificate pinning, biometrics, secure storage)
489
+ - [ ] Proguard / R8 rules verified
490
+ - [ ] Crash-free rate ≥ 99.5% on staging
491
+ - [ ] Play Store listing, screenshots, privacy policy
492
+
493
+ ### Phase 4 — Release
494
+ - [ ] AAB signed and uploaded to internal track
495
+ - [ ] Staged rollout plan defined
496
+ - [ ] Monitoring dashboard set up (Crashlytics, Play Console vitals)
497
+ - [ ] Rollback plan documented
498
+ - [ ] On-call rotation assigned
499
+
500
+ ### Phase 5 — Post-Launch (Ongoing)
501
+ - Crash-free rate monitored daily
502
+ - ANR rate < 0.47% (Play Store threshold)
503
+ - App rating monitored; negative reviews triaged weekly
504
+ - Dependency updates reviewed monthly
505
+ - OS beta testing with each new Android release
506
+
507
+ ---
508
+
509
+ ## Limitations
510
+
511
+ - This skill is scoped to Android and Android-adjacent delivery paths; it does not cover iOS-only architecture, App Store release operations, or Apple platform UI guidance.
512
+ - Version numbers, Play Console policy thresholds, and recommended libraries can change; verify release-critical details against current Android, Google Play, and library documentation before shipping.
513
+ - Code snippets are architecture patterns, not complete applications; adapt package names, dependency versions, permissions, privacy disclosures, and security controls to the actual project.
514
+ - The guidance does not replace device QA, accessibility review, security review, legal/privacy review, or store compliance checks for a production release.
515
+
516
+ ## Additional Resources
517
+
518
+ For stack-specific deep dives, read:
519
+ - `references/native-android.md` — Kotlin, Compose, Room, Hilt, Coroutines
520
+ - `references/java-android.md` — Java, XML Views, ViewBinding, LiveData, Retrofit, Room, Hilt, migration path
521
+ - `references/flutter.md` — Dart, BLoC/Riverpod, Drift, go_router
522
+ - `references/react-native.md` — TypeScript, RN architecture, Hermes, New Architecture
523
+ - `references/kmm.md` — KMM shared modules, SQLDelight, Ktor, Compose Multiplatform
524
+ - `references/hybrid.md` — Capacitor, Ionic, PWA considerations