android-dev-standards
Standards, architecture patterns, and best practices for Android app development with Kotlin, Jetpack Compose, and Android Jetpack libraries using clean architecture and MVVM. Use for any Android coding, review, refactor, or design task, especially when acting as an AI coding agent that must follow established project conventions.
Best use case
android-dev-standards is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Standards, architecture patterns, and best practices for Android app development with Kotlin, Jetpack Compose, and Android Jetpack libraries using clean architecture and MVVM. Use for any Android coding, review, refactor, or design task, especially when acting as an AI coding agent that must follow established project conventions.
Teams using android-dev-standards should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/android-dev-standards/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How android-dev-standards Compares
| Feature / Agent | android-dev-standards | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Standards, architecture patterns, and best practices for Android app development with Kotlin, Jetpack Compose, and Android Jetpack libraries using clean architecture and MVVM. Use for any Android coding, review, refactor, or design task, especially when acting as an AI coding agent that must follow established project conventions.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
SKILL.md Source
# Android Development Standards
These standards apply to all Android application code unless a specific project document explicitly says otherwise. When in doubt, follow these conventions.
## 1. Technology and language
- Prefer Kotlin for all new Android code.
- Use Jetpack Compose for UI in new features. Use XML layouts only when:
- Modifying existing XML based screens.
- Integrating legacy components that are not Compose ready.
- Use Android Jetpack libraries where appropriate:
- `ViewModel`, `LiveData` or `StateFlow`, `Navigation`, `Room`, `DataStore`, `WorkManager`.
When a module is already heavily based on Java or XML, follow the existing style in that module and avoid mixing paradigms without a clear and incremental migration plan.
## 2. Architecture
Follow clean architecture with clear separation of concerns.
- Use MVVM as the default presentation pattern.
- Structure code into layers:
- `presentation` for UI and ViewModels.
- `domain` for use cases and business logic.
- `data` for repositories and data sources.
- ViewModels:
- Expose UI state via `StateFlow`, `SharedFlow` or `MutableState` for Compose.
- Keep Android framework types out of the domain layer.
- Repositories:
- Hide data source and caching details from the rest of the app.
- Expose suspend functions or reactive streams for consumption.
## 3. Project structure
Prefer a modular structure in larger apps.
- Split into modules such as:
- `core` for shared utilities, design system, common models.
- `feature-*` modules per screen or feature.
- `data-*` modules per data source when complex enough.
- Avoid creating new modules for trivial features. Default to placing code in existing relevant modules.
Use consistent and meaningful package names:
- `com.company.app.feature.name`
- `com.company.app.core.ui`
- `com.company.app.data.api`
## 4. UI and Compose standards
- Maintain a single source of truth for UI state per screen.
- Write composable functions that:
- Are small, focused and composable.
- Receive all dynamic data and callbacks via parameters.
- Do not access repositories, data sources or navigation directly.
- Use a central design system:
- Centralise colours, typography, shapes and spacing in a `designsystem` or `core/ui` module.
- Avoid hard coded values in composables. Use theme tokens instead.
- Model screen states explicitly, for example:
- Loading
- Content
- Empty
- Error
- Accessibility:
- Provide `contentDescription` for important images and icons.
- Ensure tap targets are large enough and layouts support dynamic font sizes.
## 5. Navigation
- Use the Navigation Component or Compose Navigation for in app navigation.
- Define routes or destinations in a single place per feature.
- Pass only minimal arguments between screens. Prefer IDs over full objects.
- Do not store `NavController` in ViewModels. Pass it from composables or use navigation events from ViewModels that are handled in the UI layer.
## 6. Data, networking and persistence
- Use a dedicated networking layer:
- Prefer Retrofit with OkHttp for HTTP APIs when suitable.
- Model responses with data classes and map them into domain models.
- Error handling:
- Wrap remote calls in a result type, such as `Result<T>` or a sealed class.
- Distinguish clearly between:
- Network errors.
- Server errors.
- Business rule or validation errors.
- Persistence:
- Use Room for structured data and DataStore for key value preferences.
- Keep database entities separate from domain models. Map explicitly between layers.
- Do not block the main thread:
- Use coroutines with `Dispatchers.IO` for IO and heavy work.
- Ensure any expensive computation runs off the UI thread.
## 7. Dependency injection
- Use Hilt as the default dependency injection framework in new projects.
- Provide Hilt modules for:
- Network clients.
- Repositories.
- Use cases and other core services.
- Do not manually construct dependencies inside ViewModels or composables.
## 8. Coroutines and concurrency
- Use structured concurrency:
- Launch coroutines in appropriate scopes such as `viewModelScope` or `lifecycleScope`.
- Ensure work is cancelled when the owning scope is cancelled.
- Use `suspend` functions for long running or IO operations.
- Avoid `GlobalScope` except for initialisation that must live for the entire process lifetime and is explicitly safe.
## 9. Testing
- Types of tests:
- Unit tests for ViewModels, use cases and pure logic.
- Instrumentation tests for persistence and integration with Android components.
- UI tests using Compose testing APIs, or Espresso for legacy views.
- Testing rules:
- Cover new ViewModel and use case logic with tests.
- Mock external dependencies instead of calling real services.
- Keep tests deterministic, isolated and fast.
## 10. Performance and reliability
- Avoid unnecessary recompositions in Compose:
- Hoist state where possible and use stable data structures.
- Use `remember` only where it avoids work and does not hide state.
- Use pagination for lists that can grow large.
- Use `WorkManager` for background work that must be guaranteed or persisted.
- Monitor startup time and memory usage. When optimisation is needed, measure first, then change code based on data.
## 11. Security and privacy
- Do not store secrets in source code or in the app binary.
- Use secure storage for sensitive user data according to platform guidance.
- Follow platform recommendations for permissions:
- Request permissions as late as possible, near the feature that needs them.
- Provide rationale dialogs when appropriate.
- When handling personal data, adhere to project specific privacy, compliance and regulatory requirements.
## 12. AI coding agent guidance
When acting as an AI coding agent on Android tasks:
- Respect existing project patterns and constraints before introducing new libraries or frameworks.
- When adding dependencies:
- Justify why they are needed.
- Update relevant Gradle files consistently, including version catalogues if present.
- Prefer small, incremental changes over large refactors. Preserve behaviour unless a change is explicitly requested.
- Clearly explain:
- Breaking changes.
- Migration steps.
- Any required manual changes or configuration updates for the team.Related Skills
dev_standards_skill
Development standards and architecture management skill. Enforces modular design, low coupling, clean code practices, and maintains project architecture graph for quick context understanding. Language-agnostic, works with TypeScript, Python, Go, Rust, Java, and more. Use when starting development tasks, refactoring, or analyzing project structure.
custom-project-standards
Hệ thống tiêu chuẩn dự án đa năng (Standard Platform). Hỗ trợ Frontend, Backend, DevOps với nhiều tùy chọn ngôn ngữ/framework.
coding-standards
Provides coding standards for React Native — performance patterns, consistency rules, and clean React architecture. Use when writing, modifying, or reviewing code.
cc-skill-coding-standards
Universal coding standards, best practices, and patterns for TypeScript, JavaScript, React, and Node.js development.
app-standards
All modes that write scripts or code follow these app standards for communication, modularization, simplification, naming conventions
android
Build, review, and refactor Android mobile apps (Kotlin) using modern Android patterns. Use for tasks like setting up Gradle modules, Jetpack Compose UI, navigation, ViewModel/state management, networking (Retrofit/OkHttp), persistence (Room/DataStore), DI (Hilt/Koin), testing, performance, release builds, and Play Store readiness.
android-watch-logs
Start real-time log streaming from connected Android device using adb logcat. Shows only app's log messages. Use when monitoring app behavior, debugging, or viewing Android logs.
android-use
Control Android devices via ADB commands - tap, swipe, type, navigate apps
android-supabase
Supabase integration patterns for Android - authentication, database, realtime subscriptions. Use when setting up Supabase SDK, implementing OAuth, querying database, or setting up realtime.
android-stop-app
Stop the Android app running on connected device. Cleanly terminates the app using force-stop. Use when stopping the app for debugging, testing, or cleanup.
android-project
Navigate and analyze Android project structure, modules, and dependencies. Use when exploring project structure, finding related files, analyzing dependencies, or locating code patterns.
android-notification-builder
Эксперт Android notifications. Используй для push notifications, channels и notification patterns.