Android & Kotlin Patterns
Expert guidance on modern Android development covering architecture, Jetpack Compose, coroutines, Room, networking, navigation, dependency injection, testing, accessibility, and permissions.
Rules
See rules index for detailed patterns organized by:
- Architecture — Clean Architecture layers, unidirectional data flow, ViewModel purity
- Accessibility — Content descriptions, touch targets, heading semantics
- Concurrency — Structured coroutines, lifecycle-aware Flow, dispatcher usage
- Compose — State hoisting, remember, side effects, animations, theming, recomposition
- Persistence — Room entities, migrations, reactive queries
- Networking — Retrofit and Ktor configuration, error handling
- Navigation — Type-safe args, deep links, single-activity architecture
- Dependency Injection — Hilt scoping, assisted injection
- Testing — Compose semantics testing, coroutine dispatchers, Turbine
- Permissions — Runtime requests, rationale handling, permission state
Examples
Positive Trigger
User: "Refactor this ViewModel to use StateFlow and make the Compose screen follow unidirectional data flow."
Expected behavior: Use tech-android guidance, follow its workflow, and return actionable output.
Non-Trigger
User: "Write a Python script to parse CSV files."
Expected behavior: Do not prioritize tech-android; choose a more relevant skill or proceed without it.
Troubleshooting
Skill Does Not Trigger
- Error: The skill is not selected when expected.
- Cause: Request wording does not clearly match the description trigger conditions.
- Solution: Rephrase with explicit domain/task keywords from the description and retry.
Guidance Conflicts With Another Skill
- Error: Instructions from multiple skills conflict in one task.
- Cause: Overlapping scope across loaded skills.
- Solution: State which skill is authoritative for the current step and apply that workflow first.
Output Is Too Generic
- Error: Result lacks concrete, actionable detail.
- Cause: Task input omitted context, constraints, or target format.
- Solution: Add specific constraints (environment, scope, format, success criteria) and rerun.
Workflow
- Identify whether the request clearly matches
tech-android scope and triggers.
- Apply the skill rules and referenced guidance to produce a concrete result.
- Validate output quality against constraints; if gaps remain, refine once with explicit assumptions.
1---2name: tech-android3description: Android and Kotlin development patterns — Compose, architecture, coroutines, Room, navigation, Hilt. Use when building Android apps, writing Jetpack Compose UI, or reviewing Android-specific code.4---56# Android & Kotlin Patterns78Expert guidance on modern Android development covering architecture, Jetpack Compose, coroutines, Room, networking, navigation, dependency injection, testing, accessibility, and permissions.910## Rules1112See [rules index](rules/_sections.md) for detailed patterns organized by:1314- **Architecture** — Clean Architecture layers, unidirectional data flow, ViewModel purity15- **Accessibility** — Content descriptions, touch targets, heading semantics16- **Concurrency** — Structured coroutines, lifecycle-aware Flow, dispatcher usage17- **Compose** — State hoisting, remember, side effects, animations, theming, recomposition18- **Persistence** — Room entities, migrations, reactive queries19- **Networking** — Retrofit and Ktor configuration, error handling20- **Navigation** — Type-safe args, deep links, single-activity architecture21- **Dependency Injection** — Hilt scoping, assisted injection22- **Testing** — Compose semantics testing, coroutine dispatchers, Turbine23- **Permissions** — Runtime requests, rationale handling, permission state2425## Examples2627### Positive Trigger2829User: "Refactor this ViewModel to use StateFlow and make the Compose screen follow unidirectional data flow."3031Expected behavior: Use `tech-android` guidance, follow its workflow, and return actionable output.3233### Non-Trigger3435User: "Write a Python script to parse CSV files."3637Expected behavior: Do not prioritize `tech-android`; choose a more relevant skill or proceed without it.3839## Troubleshooting4041### Skill Does Not Trigger4243- Error: The skill is not selected when expected.44- Cause: Request wording does not clearly match the description trigger conditions.45- Solution: Rephrase with explicit domain/task keywords from the description and retry.4647### Guidance Conflicts With Another Skill4849- Error: Instructions from multiple skills conflict in one task.50- Cause: Overlapping scope across loaded skills.51- Solution: State which skill is authoritative for the current step and apply that workflow first.5253### Output Is Too Generic5455- Error: Result lacks concrete, actionable detail.56- Cause: Task input omitted context, constraints, or target format.57- Solution: Add specific constraints (environment, scope, format, success criteria) and rerun.5859## Workflow60611. Identify whether the request clearly matches `tech-android` scope and triggers.622. Apply the skill rules and referenced guidance to produce a concrete result.633. Validate output quality against constraints; if gaps remain, refine once with explicit assumptions.