Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Android Development AI Skill

An Android development skill for Android single-module projects.

This repository is based on:

Overview

This skill provides the agent with comprehensive knowledge of the project's Android development patterns, including:

  • Clean Architecture with UI, Domain, and Data layers
  • Jetpack Compose patterns and best practices
  • Single-module feature-first package structure (no multi-module, no convention plugins)
  • Offline-first architecture with Room and reactive streams
  • Dependency injection with Koin or Hilt
  • Comprehensive testing strategies

Installation

  1. Clone this repository into your AI-agent skills directory.
  2. AI-agent will automatically detect and load the skill when you work on Android projects.

This skill is supported to be placed into the standard agents dirs like:

  • <project-root>/.claude/skills/,
  • <project-root>/.opencode/skills/,
  • ~/.claude/skills/,
  • ~/.config/opencode/skills/.

Example path to the skill: <project-root>/.opencode/skills/android-dev-ai-skill/SKILL.md

Usage

The skill automatically activates when you request Android-related tasks. Simply ask:

  • "Create a new feature package for history"
  • "Add the domain layer for feature"
  • "Implement data layer"
  • "Create new screen to display info about the app"

The AI-agent will follow instructions, patterns and best practices defined in SKILL.md.

Core Principles

This skill teaches AI-agent to follow these key Android development principles:

  1. Clean architecture": Strict separation of Data, Domain, and Presentation layers
  2. Feature-first structure: Each feature is self-contained with clear boundaries
  3. Offline-first: Local database as source of truth, synchronized with remote data
  4. Unidirectional data flow: Intents flow down, State flows up (MVI/UDF pattern)
  5. Reactive streams: Use Kotlin Flow for all data exposure

Architecture Overview

Clean Architecture

┌────────────────────────────────────────────────────┐
│               Presentation Layer                   │
│  ┌──────────────┐    ┌─────────────────────────┐   │
│  │   Screen     │◄───│      ViewModel          │   │
│  │  (Compose)   │    │  (StateFlow<State>)     │   │
│  │  Event -->   │───►│  onEvent(Event)         │   │
│  └──────────────┘    └───────────┬─────────────┘   │
├──────────────────────────────────┼─────────────────┤
│                  Domain Layer    │                 │
│              ┌───────────────────▼──────┐          │
│              │       Use Cases          │          │
│              │  (combine/transform)     │          │
│              └───────────┬──────────────┘          │
├──────────────────────────┼─────────────────────────┤
│                  Data Layer                        │
│  ┌───────────────────────▼──────────────────────┐  │
│  │              Repository                      │  │
│  │    (offline-first, single source of truth)   │  │
│  └─────────┬─────────────────────┬──────────────┘  │
│            │                     │                 │
│  ┌─────────▼─────────┐  ┌───────▼──────────────┐   │
│  │  Local DataSource │  │  Remote DataSource   │   │
│  │   (Room + DAO)    │  │     (Retrofit)       │   │
│  └───────────────────┘  └──────────────────────┘   │
└────────────────────────────────────────────────────┘

Feature-First Structure (single :app module)

app/src/main/java/<basePackage>/
├── App.kt                    # DI setup (Koin startup or @HiltAndroidApp)
├── MainActivity.kt           # Entry point
├── navigation/               # AppNavGraph and navigation config
├── core/                     # Shared code (di, network, database, preferences, ui)
└── feature/                  # Business features
    └── <featureName>/
        ├── data/             # Repositories, local and remote sources
        ├── domain/           # Models, interfaces, use cases
        ├── presentation/     # mvi/, viewmodel/, ui/
        └── di/               # DI module (Koin or Hilt)

Technology Stack

This skill configures projects with:

  • Language: Kotlin
  • UI: Jetpack Compose
  • Architecture: Clean Architecture + Feature-First Structure + MVI with UDF
  • DI: Koin or Hilt
  • Database: Room
  • Network: Retrofit + Kotlinx Serialization
  • Async: Kotlin Coroutines + Flow
  • Testing: kotlinx-coroutines-test, mockk
  • Build: Gradle, single module, version catalog

License

This project is licensed under the MIT License - see the LICENSE file for details.

Resources

About

AI Skill for Android single-module project development

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors