Skip to main content
skill CX Codex

android-development · dpconde — Claude Code skill: Android with Kotlin

A skill that keeps your agent on Google's Android architecture: modules, Jetpack Compose, Hilt, Room. Useful once a Kotlin project grows past one screen.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add dpconde/claude-android-skill --skill android-development -a claude-code
npx skills add dpconde/claude-android-skill --skill dpconde-android-development -a claude-code
Open on GitHub

What android-development does

The skill ships reference files on Android architecture: module layout, the UI, Domain and Data layers, Compose patterns, Gradle setup and a testing approach. A decision tree routes the agent by task — new project, new feature, screen, data layer — and templates live in assets/templates/. The agent reads the matching file from references/ and writes code against it.

A feature comes as two modules: api holding the navigation key, and impl with the screen, ViewModel, UiState and a Hilt module. State is exposed as StateFlow, data flows from a repository over Kotlin Flow, and the local database is treated as the source of truth. Build config is meant to go through convention plugins in build-logic/, one each for app, library, feature, Compose and Hilt.

NowInAndroid is the reference here, so the module names will look familiar if you have read that codebase. You still supply the dependencies yourself: the examples mark Kotlin, Compose BOM, Hilt and Room as 1.9.x, 2024.x.x, 2.48 and 2.6.x, which is a starting point rather than a pinned set. Bring your own module layout and the skill will keep steering you back to this one.

What it helps with

  • split a feature into api and impl modules without dependency tangles
  • build a Compose screen with its ViewModel and sealed UI state
  • wire Hilt and Room into a new module
  • move a repository to offline-first with Kotlin Flow
  • pull shared build config into convention plugins

Example prompts for the agent

  • Create a new Android project using the module structure from the skill
  • Add a profile feature: api and impl modules, screen, ViewModel and Hilt module
  • Write an offline-first repository for the orders list with Room and Flow

How to install android-development

1Skills CLI (Vercel)

npx skills add dpconde/claude-android-skill --skill android-development -a claude-code
npx skills add dpconde/claude-android-skill --skill dpconde-android-development -a claude-code

2Manually: put the files in place

~/.claude/skills/dpconde-android-development/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/dpconde-android-development/

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 dpconde/claude-android-skill --skill android-development -a claude-code. The skill file lands at ~/.claude/skills/dpconde-android-development/SKILL.md.

What does android-development do?

It gives the agent reference docs and templates for Android architecture: layers, modules, Compose, Hilt, Room, Gradle and tests. The agent consults them when writing screens, ViewModels and repositories.

Does it work if my project already has its own module layout?

It assumes a specific one: app, feature/<name>/api and impl, plus a set of core modules. With a different layout the agent will keep suggesting you move toward this.

Source text

SKILL.md · MIT
---
name: android-development
description: Create production-quality Android applications following Google's official architecture guidance and NowInAndroid best practices. Use when building Android apps with Kotlin, Jetpack Compose, MVVM architecture, Hilt dependency injection, Room database, or multi-module projects. Triggers on requests to create Android projects, screens, ViewModels, repositories, feature modules, or when asked about Android architecture patterns.
---

# Android Development

Build Android applications following Google's official architecture guidance, as demonstrated in the NowInAndroid reference app.

## Quick Reference

| Task | Reference File |
|------|----------------|
| Project structure & modules | [modularization.md](references/modularization.md) |
| Architecture layers (UI, Domain, Data) | [architecture.md](references/architecture.md) |
| Jetpack Compose patterns | [compose-patterns.md](references/compose-patterns.md) |
| Gradle & build configuration | [gradle-setup.md](references/gradle-setup.md) |
| Testing approach | [testing.md](references/testing.md) |

## Workflow Decision Tree

**Creating a new project?**
→ Read [modularization.md](references/modularization.md) for project structure
→ Use templates in `assets/templates/`

**Adding a new feature?**
→ Create feature module with `api` and `impl` submodules
→ Follow patterns in [architecture.md](references/architecture.md)

**Building UI screens?**
→ Read [compose-patterns.md](references/compose-patterns.md)
→ Create Screen + ViewModel + UiState

**Setting up data layer?**
→ Read data layer section in [architecture.md](references/architecture.md)
→ Create Repository + DataSource + DAO

## Core Principles

1. **Offline-first**: Local database is source of truth, sync with remote
2. **Unidirectional data flow**: Events flow down, data flows up
3. **Reactive streams**: Use Kotlin Flow for all data exposure
4. **Modular by feature**: Each feature is self-contained with clear boundaries
5. **Testable by design**: Use interfaces and test doubles, no mocking libraries

## Architecture Layers

```
┌─────────────────────────────────────────┐
│              UI Layer                    │
│  (Compose Screens + ViewModels)          │
├─────────────────────────────────────────┤
│           Domain Layer                   │
│  (Use Cases - optional, for reuse)       │
├─────────────────────────────────────────┤
│            Data Layer                    │
│  (Repositories + DataSources)            │
└─────────────────────────────────────────┘
```

## Module Types

```
app/                    # App module - navigation, scaffolding
feature/
  ├── featurename/
  │   ├── api/          # Navigation keys (public)
  │   └── impl/         # Screen, ViewModel, DI (internal)
core/
  ├── data/             # Repositories
  ├── database/         # Room DAOs, entities
  ├── network/          # Retrofit, API models
  ├── model/            # Domain models (pure Kotlin)
  ├── common/           # Shared utilities
  ├── ui/               # Reusable Compose components
  ├── designsystem/     # Theme, icons, base components
  ├── datastore/        # Preferences storage
  └── testing/          # Test utilities
```

## Creating a New Feature

1. Create `feature:myfeature:api` module with navigation key
2. Create `feature:myfeature:impl` module with:
   - `MyFeatureScreen.kt` - Composable UI
   - `MyFeatureViewModel.kt` - State holder
   - `MyFeatureUiState.kt` - Sealed interface for states
   - `MyFeatureNavigation.kt` - Navigation setup
   - `MyFeatureModule.kt` - Hilt DI module

## Standard File Patterns

### ViewModel Pattern
```kotlin
@HiltViewModel
class MyFeatureViewModel @Inject constructor(
    private val myRepository: MyRepository,
) : ViewModel() {

    val uiState: StateFlow<MyFeatureUiState> = myRepository
        .getData()
        .map { data -> MyFeatureUiState.Success(data) }
        .stateIn(
            scope = viewModelScope,
            started = SharingStarted.WhileSubscribed(5_000),
            initialValue = MyFeatureUiState.Loading,
        )
    
    fun onAction(action: MyFeatureAction) {
        when (action) {
            is MyFeatureAction.ItemClicked -> handleItemClick(action.id)
        }
    }
}
```

### UiState Pattern
```kotlin
sealed interface MyFeatureUiState {
    data object Loading : MyFeatureUiState
    data class Success(val items: List<Item>) : MyFeatureUiState
    data class Error(val message: String) : MyFeatureUiState
}
```

### Screen Pattern
```kotlin
@Composable
internal fun MyFeatureRoute(
    onNavigateToDetail: (String) -> Unit,
    viewModel: MyFeatureViewModel = hiltViewModel(),
) {
    val uiState by viewModel.uiState.collectAsStateWithLifecycle()
    MyFeatureScreen(
        uiState = uiState,
        onAction = viewModel::onAction,
        onNavigateToDetail = onNavigateToDetail,
    )
}

@Composable
internal fun MyFeatureScreen(
    uiState: MyFeatureUiState,
    onAction: (MyFeatureAction) -> Unit,
    onNavigateToDetail: (String) -> Unit,
) {
    when (uiState) {
        is MyFeatureUiState.Loading -> LoadingIndicator()
        is MyFeatureUiState.Success -> ContentList(uiState.items, onAction)
        is MyFeatureUiState.Error -> ErrorMessage(uiState.message)
    }
}
```

### Repository Pattern
```kotlin
interface MyRepository {
    fun getData(): Flow<List<MyModel>>
    suspend fun updateItem(id: String, data: MyModel)
}

internal class OfflineFirstMyRepository @Inject constructor(
    private val localDataSource: MyDao,
    private val networkDataSource: MyNetworkApi,
) : MyRepository {

    override fun getData(): Flow<List<MyModel>> =
        localDataSource.getAll().map { entities ->
            entities.map { it.toModel() }
        }
    
    override suspend fun updateItem(id: String, data: MyModel) {
        localDataSource.upsert(data.toEntity())
    }
}
```

## Key Dependencies

```kotlin
// Gradle version catalog (libs.versions.toml)
[versions]
kotlin = "1.9.x"
compose-bom = "2024.x.x"
hilt = "2.48"
room = "2.6.x"
coroutines = "1.7.x"

[libraries]
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "compose-bom" }
hilt-android = { group = "com.google.dagger", name = "hilt-android", version.ref = "hilt" }
room-runtime = { group = "androidx.room", name = "room-runtime", version.ref = "room" }
```

## Build Configuration

Use convention plugins in `build-logic/` for consistent configuration:
- `AndroidApplicationConventionPlugin` - App modules
- `AndroidLibraryConventionPlugin` - Library modules  
- `AndroidFeatureConventionPlugin` - Feature modules
- `AndroidComposeConventionPlugin` - Compose setup
- `AndroidHiltConventionPlugin` - Hilt setup

See [gradle-setup.md](references/gradle-setup.md) for complete build configuration.

© dpconde · MIT · dpconde/claude-android-skill

Similar skills

Everything for Mobile →

android-development by other authors comes first.

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor