android-development · mindrally — Claude Code skill: Kotlin Android rules
A rule set that keeps your coding agent on track with Kotlin and Android: clean architecture, MVI, Material 3. Useful when generated code drifts in style and layering.
npx skills add Mindrally/skills --skill android-development -a claude-codeWhat android-development does
The skill hands your agent a set of Kotlin and Android conventions. Naming is fixed: PascalCase for classes, camelCase for variables, UPPERCASE for constants, no magic numbers. Functions stay short and do one thing, boolean returns start with is, has or can. Nesting is meant to be cut down with early returns, and parameters grouped into objects.
On architecture it asks for clean layering across data, domain, presentation and di, repositories for persistence and caching, and business logic in Use Cases. Screen state lives in one immutable object, and user events go through a single entry point. Navigation runs on the Navigation Component with safe args, views are reached through ViewBinding, async work goes to coroutines, deferrable work to WorkManager, and dependencies come from Hilt or Dagger.
For UI the skill explicitly prefers XML layouts and Fragments over Jetpack Compose unless Compose is specifically required. Worth checking before you install: on a project already written in Compose, some of these recommendations will argue with the existing code. Testing is described as Arrange-Act-Assert for ViewModels, Use Cases and repositories, with Espresso for instrumented tests.
What it helps with
- keep an agent's Kotlin naming and types consistent
- split a screen across data, domain and presentation layers
- model screen state as one immutable object
- decide between XML layouts and Jetpack Compose
- wire dependency injection with Hilt or Dagger
Example prompts for the agent
- Split the profile screen into data, domain and presentation layers, keep state in a single object
- Rewrite this ViewModel as MVI with intents through one entry point and predictable side effects
- Check the naming in this file against the android-development skill rules
How to install android-development
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill android-development -a claude-code2Manually: put the files in place
~/.claude/skills/android-development/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/android-development/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill android-development -a codex2Manually: put the files in place
.agents/skills/android-development/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill android-development -a cursor2Manually: put the files in place
.cursor/skills/android-development/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Mindrally/skills android-development2Manually: put the files in place
.github/skills/android-development/SKILL.md1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill android-development -a gemini-cli2Platform CLI
gemini skills install https://github.com/Mindrally/skills --path android-developmentManually: put the files in place
.devin/skills/android-development/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Mindrally/skills --skill android-development -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about android-development
How do I install android-development in Claude?
Run npx skills add Mindrally/skills --skill android-development -a claude-code. The skill lands in ~/.claude/skills/android-development/SKILL.md.
What does android-development do?
It gives your agent Android rules for Kotlin: naming, function size, clean architecture, MVI, navigation, testing and lifecycle handling.
Does the skill support Jetpack Compose?
It prefers XML layouts and Fragments unless Compose is specifically required. On a Compose-first project, check which of those recommendations your agent actually applies.
Source text
SKILL.md · Apache-2.0
--- name: android-development description: Android development guidelines for Kotlin with clean architecture, MVI pattern, Material Design, and best practices for building robust mobile applications metadata: maintainer: Mindrally source: https://github.com/Mindrally/skills --- # Android Development Best Practices ## General Kotlin Guidelines ### Basic Principles - Use English for all code and documentation - Always declare variable and function types explicitly - Avoid the `any` type; create necessary custom types - Eliminate blank lines within function bodies ### Naming Standards - **PascalCase**: Classes, interfaces, enums - **camelCase**: Variables, functions, methods - **underscores_case**: Files and directories - **UPPERCASE**: Environment variables, constants - Avoid magic numbers; define constants instead - Functions should start with action verbs - Boolean variables use prefixes: `isLoading`, `hasError`, `canDelete` ### Function Design - Keep functions under 20 instructions with single responsibility - Use verb-based naming - Prefix boolean returns with `is`, `has`, or `can` - Prefix void returns with `execute`, `save`, `send` - Combat nesting through early returns, utility extraction, and higher-order functions - Use default parameters instead of null checks - Consolidate parameters into objects (RO-RO pattern) ### Data and Classes - Employ data classes for data structures - Encapsulate primitives in composite types; validate internally - Favor immutability; use `val` for unchanging values - Follow SOLID principles; prefer composition over inheritance - Keep classes under 200 instructions, 10 public methods, 10 properties ### Exception Handling - Reserve exceptions for unexpected errors - Catch exceptions only to fix anticipated issues or add context - Create custom exception types for domain errors ## Android Architecture ### Clean Architecture - Implement clean architecture with clear layer separation - Use repository pattern for data persistence and caching - Keep business logic in Use Cases or Interactors - Separate concerns between UI, domain, and data layers ### Project Structure ``` app/ ├── data/ # Data sources, repositories, models ├── domain/ # Use cases, domain models, interfaces ├── presentation/ # UI components, ViewModels, state └── di/ # Dependency injection modules ``` ### MVI Pattern - Deploy MVI pattern for state and event management - ViewModels manage UI state as a single immutable state object - UI components observe state and render accordingly - Handle user intents/events through a single entry point - Keep side effects predictable and traceable ## UI Development ### Navigation - Use Navigation Component for fragment and activity routing - Define navigation graph for app flow - Handle deep links through Navigation Component - Implement safe args for type-safe navigation arguments ### Main Activity Structure - MainActivity manages primary navigation - Use BottomNavigationView for main destinations (Home, Profile, Settings, etc.) - Handle navigation state properly across configuration changes ### View Binding and State - Use ViewBinding for type-safe view access - Use Flow or LiveData for UI state management - Observe state changes in lifecycle-aware manner - Handle loading, error, and success states consistently ### UI Framework Preferences - Prefer XML layouts and Fragments over Jetpack Compose (unless Compose is specifically required) - Use ConstraintLayout for complex layouts - Apply Material 3 design guidelines - Follow responsive design practices for different screen sizes ## Authentication Flow Structure authentication screens properly: 1. Splash Screen - Initial app launch 2. Login Screen - User authentication 3. Register Screen - New user registration 4. Forgot Password Screen - Password recovery 5. Verify Email Screen - Email verification ## Testing ### Unit Testing - Follow Arrange-Act-Assert conventions - Test ViewModels, Use Cases, and Repositories - Use test doubles for dependencies - Achieve good coverage of business logic ### UI Testing - Implement widget testing for UI components - Write integration tests for API modules - Test navigation flows - Use Espresso for instrumented tests ## Best Practices ### Lifecycle Management - Handle lifecycle events properly - Avoid memory leaks from improper lifecycle handling - Use lifecycle-aware components ### Background Processing - Use Coroutines for async operations - Handle cancellation properly - Use WorkManager for deferrable background work ### Dependency Injection - Use Hilt or Dagger for dependency injection - Scope dependencies appropriately - Keep DI configuration organized ### Performance - Avoid work on the main thread - Optimize RecyclerView with DiffUtil - Use lazy loading for heavy resources - Profile and optimize memory usage
© Mindrally · Apache-2.0 · Mindrally/skills
Similar skills
Everything for Mobile →android-development by other authors comes first.