/engineering:android-developmentfrom engineering
Provides Android development standards for AI agents: Kotlin, Jetpack Compose, MVVM + Clean Architecture, Hilt DI, Room/DataStore persistence, offline sync, and test-driven development. Includes process death recovery patterns and evidence artifacts.
Ships in engineering. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Acknowledgement: Shared by Peter Bamuhigire, techguypeter.com, +256 784 464178.
Any Chwezi app or system UI work (effective 01 Nov 2026) MUST follow the Chwezi Product Excellence Standard in chwezi-design-engine (resolve via the engine-routing table; never hard-code the path): doctrine/product-excellence-standard.md and skill skills/00-cross-cutting-ops-qa-a11y/chwezi-product-excellence-standard. Engineering gates: product-excellence-engineering-gates.md. Play targetSdk 36 consequences (edge-to-edge without opt-out, predictive back, orientation locks ignored at sw600dp), Baseline Profiles with Macrobenchmark on a physical floor device, and Android vitals targets are release gates. Where this skill and the standard differ, the standard wins.
Save an immutable attempt and its item ID before submitting. A lost result is pending until authoritative reconciliation; retry with the same attempt ID. Keep saved screen arguments separate from the durable journal. Cancel superseded search work and reject callbacks whose generation is no longer current. Recreate the UI, then kill the process after the service commits and before acknowledgement. Require one service record, a matching receipt after recovery, and no change when late or duplicate replies arrive. Also submit a distinct attempt for the now-occupied item. Require a refusal while the original attempt still recovers its receipt. Let the borrower dismiss a definitive refusal and start a new intent without clearing a pending or confirmed attempt. The Tool Library Android trial includes the debug service double and emulator probes.
| Category | Artifact | Format | Example |
|---|---|---|---|
| Correctness | Android feature test plan | Markdown doc covering unit, instrumentation, and Compose tests | docs/android/feature-tests-checkout.md |
| UX quality | Accessibility audit | Markdown doc covering TalkBack, semantics, and contrast | docs/android/a11y-checkout.md |
references/ directory for deep detail after reading the core workflow below.references/android-ai-ml.md for on-device Android AI/ML, ML Kit, LiteRT, MediaPipe, AICore, and Gemini Nano.references/android-biometric-login.md for AndroidX Biometric launch gates and CryptoObject-backed authentication.references/android-pdf-export.md for native PdfDocument export and Android report PDF generation.world-class-engineering for shared production gates.system-architecture-design when the Android app is part of a larger backend or multi-module system.android-ui-ux-design for every user-facing Android screen, especially premium, dashboard, onboarding, reporting, form, or revenue-critical flows.vibe-security-skill and feature-specific skills as needed.Production-grade Android development standards for AI-assisted implementation. Kotlin-first with Jetpack Compose, following modern Android best practices.
Core Stack: Kotlin 100% | Jetpack Compose (default UI toolkit) | MVVM + Clean Architecture | Hilt DI Min SDK: Choose from the product's supported-device policy. Play target: API 36 or higher for general new apps and updates, verified 2026-10-29; check the official requirement for platform-specific exceptions before release. Compatibility: test the declared minSdk and the latest stable Android release that the project supports. Current source snapshot identifies Android 17/API 37 as released; this is a compatibility target, not the Play submission target. Reference App: Now in Android - Google's official sample demonstrating these standards in a production-quality codebase
Android apps connect to a PHP/MySQL backend deployed across three environments:
| Environment | Base URL Pattern | Database | Notes |
|---|---|---|---|
| Development | http://{LAN_IP}:{port}/DMS_web/api/ | MySQL 8.4.7 (Windows WAMP) | Use host machine's LAN IP, not localhost |
| Staging | https://staging.{domain}/api/ | MySQL 8.x (Ubuntu VPS) | For QA and testing |
| Production | https://{domain}/api/ | MySQL 8.x (Debian VPS) | Live users |
Configure base URLs using build flavors (dev, staging, prod) so the app targets the correct backend per build variant. All backends use utf8mb4_unicode_ci collation and MySQL 8.x.
| Topic | Reference File | Covers |
|---|---|---|
| Project Structure | references/project-structure.md | Directory layout, module organization |
| Kotlin Conventions | references/kotlin-conventions.md | Coding style, Compose patterns |
| Architecture | references/architecture-patterns.md | MVVM, Clean Architecture layers |
| Dependency Injection | references/dependency-injection.md | Hilt modules, scoping, ViewModel injection |
| Security | references/security.md | Encrypted storage, biometrics, network security |
| UI Design System | references/ui-design-system.md | Tokens, components, Material 3 |
| Chwezi House Style | references/house-style-compose.md | House colour roles, amount type, components, motion gate, guardrail tests |
| Premium Android UX | ../android-ui-ux-design/SKILL.md | Material 3 polish, mobile ergonomics, premium gate |
| Screen Patterns | references/screen-patterns.md | Complete screen templates, state handling |
| Testing | references/testing.md | Unit, UI, instrumentation tests |
| Build Configuration | references/build-configuration.md | Gradle KTS, Android Studio setup, dependencies, build types, build-speed tuning |
| API Integration | references/api-integration.md | Retrofit, error handling, repository pattern |
| Analytics & Performance | references/analytics-performance.md | Firebase, monitoring, optimization |
| AI Agent Guidelines | references/ai-agent-guidelines.md | Prompt templates, quality checklists |
Presentation Layer (Compose + ViewModels)
|
Domain Layer (Use Cases + Repository Interfaces)
|
Data Layer (Repository Impl + API + Room)
com.company.app/
core/ # Shared: DI, models, repositories, utils
data/ # Room DB, API services, data sources
presentation/ # Screens, ViewModels, components, navigation
theme/ # Design system tokens
LaunchedEffect for side effects, never in compositioncollectAsStateWithLifecycle() for Flow collectionLazyColumn/LazyRow itemsWindowSizeClass for phone/tablet/foldableandroidx.compose.material3.adaptive:adaptivepainterResource(R.drawable.<name>) or @drawable/<name>PROJECT_ICONS.md in the project rootFollow the mobile-platform-operations skill (its mobile-custom-icons reference) for naming, directory rules, and tracking.
android-ui-ux-design skill (business reports over 25 rows use table-first or dense list patterns) for table-first guidance, and the professional-word-output skill for exported report tables.Every Android app MUST have exactly 3 build variants. This is non-negotiable.
| Variant | Purpose | APK Name | Minified | Install Target |
|---|---|---|---|---|
| debug (dev) | Local development | {AppName}-dev-{version}.apk | No | Emulator (default) |
| staging | QA / pre-production | {AppName}-staging-{version}.apk | Yes (R8) | Emulator (on request) |
| release (prod) | Production / Play Store | {AppName}-prod-{version}.apk | Yes (R8) | Device (manual) |
Rules:
http://10.0.2.2/... for emulator or the host LAN IP).debug. Do not build staging and release on every iteration../gradlew installDebug (or assembleDebug) for normal coding, UI work, and device testing../gradlew assembleDebug assembleStaging assembleRelease./gradlew installStagingDMS-dev-1.0.0.apk, DMS-staging-1.0.0.apk, DMS-prod-1.0.0.apk). Configure via the modern Android Components Variant API, not deprecated internal output classes.Log.v, Log.d, Log.i, and println from staging and release builds.BuildConfig.API_BASE_URL (or similar) set per build type.See references/build-configuration.md for the complete Gradle setup.
Always set API endpoints through BuildConfig.API_BASE_URL (or a similar generated constant) per build type or flavor. Never hardcode server URLs in app code.
Before doing deeper performance work, establish this baseline:
kapt should be treated as legacy.2.+ or latest.release.Our apps MUST work for the few people still holding older devices, but MUST ALSO WORK for those with newer/latest devices. Never test only on one Android version.
Mandatory rules:
windowOptOutEdgeToEdgeEnforcement opt-out is deprecated and disabled (CR:M6). Since Play requires targetSdk 36 for new apps and updates from 31 Aug 2026 (CR:M7), there is no opt-out: call enableEdgeToEdge(), pad content by WindowInsets (system bars, display cutout, IME), never by fixed numbers, and keep bottom bars and the cart bar above the gesture area. Verify bar contrast, cut-outs, IME, gesture and 3-button navigation on the supported device range. Missing the helper is not evidence by itself that the app crashes; clipped or overlapped content is the observable failure.window.statusBarColor directly — It is deprecated and conflicts with edge-to-edge. Let enableEdgeToEdge() handle system bar colors. Only control light/dark icon appearance via WindowCompat.getInsetsController().isAppearanceLightStatusBars.onBackPressed is not called and KEYCODE_BACK is not dispatched (CR:M8). Put no logic in onBackPressed; use Compose BackHandler / PredictiveBackHandler (or OnBackPressedCallback), and intercept back only to protect unsaved data or an in-flight payment. The manifest opt-out android:enableOnBackInvokedCallback="false" is temporary and needs a DDR.CR:M9): screenOrientation, resizeableActivity=false and aspect-ratio limits do not hold on tablets and foldables. Build landscape and resizable layouts with window size classes (CR:M3) and keep state and drafts across rotation and resize. The compat opt-out ends at API 37.elegantTextHeight is ignored at targetSdk 36 (CR:M10): re-check Arabic and other tall scripts at 100% and 200% font scale.if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.X) checks.CR:M7); other form factors differ. Keep compileSdk compatibility separate from targetSdk and verify the actual Gradle/AGP/dependency combination.AppCompatActivity when locale switching is needed (AppCompatDelegate.setApplicationLocales()). Otherwise prefer ComponentActivity for pure Compose apps.Correct MainActivity pattern:
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
installSplashScreen() // Before super
enableEdgeToEdge() // No opt-out at targetSdk 36; pad content by WindowInsets
super.onCreate(savedInstanceState)
setContent { ... }
}
}
CR:<ID> rows are in the design engine currentness register (skills/00-cross-cutting-ops-qa-a11y/chwezi-product-excellence-standard/references/currentness-register.md, accessed 2026-11-07, review by 2027-02-07). Re-read them there before relying on them; a lapsed row makes the dependent check NOT_ASSESSED.
Before selecting an Android, Kotlin, Compose, Gradle, AGP, PHP, or database
version, check the official release/support and security sources recorded in
docs/source-registers/skills-engine-currentness-2026-09.json. The checked
2026-11-23 snapshot re-read the official sources: Android 17/API 37, Compose BOM
2026.09.00, and AGP 9.5.0 (Gradle 9.6.0 and JDK 17 minimum) remain the listed
values. Kotlin 2.4.21 is from the 2026-10-29 snapshot; the official Kotlin
release index was not re-read in this review. Re-check versions and compatibility
at implementation time. A Play target requirement is
not a statement about the latest Android runtime. For Kotlin 2.0 and later the
Compose compiler plugin follows the Kotlin version; still validate the chosen
toolchain with a real build.
EncryptedSharedPreferences for sensitive dataSSLPeerUnverifiedException). Extract real SHA-256 pins from servers using openssl before enabling. See references/security.md for the extraction command.ENABLE_CERT_PINNING BuildConfig flag: false for dev, true for staging/prodBuildConfig fieldsderivedStateOf for expensive calculationsdebug only during normal development; reserve full multi-variant builds for QA or release checkskapt unless there is no supported migration pathandroid.enableJetifier=false unless a dependency audit proves otherwiseBefore calling an Android feature production-ready:
android-ui-ux-design premium UX checks for navigation, touch targets, text scaling, TalkBack, state completeness, and platform-native polish.localhost.BASE_URL in the Android dev build.mobile-platform-operations skill (its google-play-store-review reference) before Play Console submission.Every Android app MUST include a theme appearance selector in its Tools/Settings section. This is a non-negotiable standard — users must be able to control the app's visual theme.
Requirements:
Implementation pattern:
// 1. ThemePreferences.kt (data/local/prefs/)
enum class ThemeMode(val key: String, val label: String) {
SYSTEM("system", "System default"),
LIGHT("light", "Light"),
DARK("dark", "Dark");
companion object {
fun fromKey(key: String): ThemeMode =
entries.firstOrNull { it.key == key } ?: SYSTEM
}
}
@Singleton
class ThemePreferences @Inject constructor(
@ApplicationContext context: Context
) {
private val prefs = context.getSharedPreferences("theme_prefs", Context.MODE_PRIVATE)
private val _themeMode = MutableStateFlow(loadThemeMode())
val themeMode: StateFlow<ThemeMode> = _themeMode.asStateFlow()
private fun loadThemeMode(): ThemeMode =
ThemeMode.fromKey(prefs.getString("theme_mode", "system") ?: "system")
fun setThemeMode(mode: ThemeMode) {
prefs.edit().putString("theme_mode", mode.key).apply()
_themeMode.value = mode
}
}
// 2. MainActivity.kt — resolve ThemeMode to darkTheme boolean
val themeMode by themePreferences.themeMode.collectAsState()
val darkTheme = when (themeMode) {
ThemeMode.SYSTEM -> isSystemInDarkTheme()
ThemeMode.LIGHT -> false
ThemeMode.DARK -> true
}
AppTheme(darkTheme = darkTheme) { /* content */ }
// 3. Tools/Settings screen — FilterChip row for selection
ThemeMode.entries.forEach { mode ->
FilterChip(
selected = selected == mode,
onClick = { viewModel.setThemeMode(mode) },
label = { Text(mode.label) },
leadingIcon = if (selected == mode) { { Icon(Icons.Default.Check, null) } } else null
)
}
When building a native Android app for an existing SaaS backend, always implement Phase 1 first: Login + Dashboard + Empty Tabs. This is the mandatory starting point before any business features.
See android-saas-planning skill for the complete Phase 1 plan template.
If this is a Kotlin Multiplatform project, this skill governs the
composeApp/ module (Android UI and platform integration). The shared/
module is governed by the kmp-development skill. Use Hilt for DI in
composeApp/ and Koin in shared/. Use the kmp-development skill for shared module test-driven development.
mutableStateOf in ViewModels instead of StateFlowkey parameter in LazyColumn itemscollectAsStateWithLifecycle)isTablet() checks instead of WindowSizeClass breakpointsCR:M6); unhandled insets put content under the system bars, cut-out or keyboardwindow.statusBarColor directly — deprecated, conflicts with edge-to-edgetenant-document-numbering)feature-planning -> spec + implementation strategy
|
android-development -> Kotlin/Compose implementation
|
android-ui-ux-design -> premium Material 3 UX and screen quality
|
mobile-platform-operations -> Play policy and submission readiness
|
api-error-handling -> Backend API error patterns
|
mysql-best-practices -> Database schema (backend)
|
vibe-security-skill -> Security review
Always apply vibe-security-skill alongside this skill for web-connected Android apps.
Use mobile-platform-operations when preparing Play Console submissions.
| Condition | Choice |
|---|---|
| New user interface | Compose; isolate an existing View system behind a stable boundary |
| Business rule shared across screens | Pure Kotlin domain use case |
| Android framework dependency | Keep it outside the domain layer |
| Release behaviour differs by environment | Typed build flavour configuration; no runtime hard-coded URL |
When builds or devices are unavailable, provide a reviewable patch and list the exact Gradle, unit, instrumentation, accessibility, and min-SDK checks still requiring execution. Do not claim device compatibility from static inspection alone.
Google maintains three official reference repos. Use them as canonical examples:
Full production-quality app. Use for: multi-module architecture, convention plugins, offline-first (Room + network sync), Hilt across modules, version catalogs, Gradle KTS build config.
Layered architecture TODO app. Use for: MVVM pattern clarity, Repository pattern with dual data sources, single-activity navigation with Compose, product flavors (mock/prod), comprehensive test suite (unit + integration + E2E), clean separation of concerns.
Collection of focused Compose apps. Use for specific UI patterns:
| Sample | Use For |
|---|---|
| JetNews | Material app structure, theming, Compose testing |
| Jetchat | Material 3, dynamic colors, navigation, state management |
| Jetsnack | Custom design systems, layouts, animations |
| Jetcaster | Redux-style architecture, dynamic theming, Room, coroutines |
| Reply | Adaptive UI (phone/tablet/foldable), Material 3 |
| JetLagged | Custom layouts, graphics, Canvas/Path drawing |
When in doubt about how to implement something, check these repos first.
| Artefact | Required? | Purpose |
|---|---|---|
| Android requirements, supported API levels, architecture, UX, and backend contracts | yes | Bound implementation |
Read/search and local builds follow task scope; signing, store publication, backend mutation, and device-data destruction require explicit authority.
references/ai-agent-guidelines.md (opens in a new tab)references/analytics-performance.md (opens in a new tab)references/android-ai-ml.md (opens in a new tab)references/android-ai-ml/aicore-gemini-nano.md (opens in a new tab)references/android-ai-ml/compose-streaming.md (opens in a new tab)references/android-ai-ml/litert-inference.md (opens in a new tab)references/android-ai-ml/mediapipe-camerax.md (opens in a new tab)references/android-ai-ml/ml-kit-catalogue.md (opens in a new tab)references/android-ai-ml/on-device-vs-cloud.md (opens in a new tab)references/android-biometric-login.md (opens in a new tab)references/android-pdf-export.md (opens in a new tab)references/android-pdf-export/skill-deep-dive.md (opens in a new tab)references/api-integration.md (opens in a new tab)references/architecture-patterns.md (opens in a new tab)references/build-configuration.md (opens in a new tab)references/dependency-injection.md (opens in a new tab)references/house-style-compose.md (opens in a new tab)references/kotlin-conventions.md (opens in a new tab)references/project-structure.md (opens in a new tab)references/screen-patterns.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
android-standards, kotlin, jetpack-compose, mvvm, clean-architecture, hilt
npx claudepluginhub peterbamuhigire/chwezi-dev-engine --plugin engineering169 skills in this plugin
/accounting-engineUse when designing or implementing double-entry accounting policy and an embedded ledger engine for invoices, payments, stock, balanced postings, mapped accounts, idempotency, reversals, period locks, audit trails, and financial statements./accounting-finance-controllerUse when coordinating accounting and finance implementation reviews, doctrine routing, control evidence, remediation priorities, and release decisions across a software system./advanced-testing-strategyUse when designing or reviewing test strategy for production systems, APIs, mobile apps, SaaS platforms, ERP workflows, and AI-enabled systems. Covers unit, integration, contract, end-to-end, regression, release-gate, and risk-based testing decisions.Other plugins' skills for the same job