# Android clean architecture

> Android clean architecture is an open-source agent skill for developer tools. Guides Android and KMP project structure with layered modules, UseCases and repositories. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/smartworldarafath/REA_Skill/tree/main/.agents/skills/android-clean-architecture
- **Repository:** https://github.com/smartworldarafath/rea_skill
- **GitHub stars:** 66
- **License:** MIT
- **Skill name:** android-clean-architecture
- **Collection:** https://github.com/smartworldarafath/REA_Skill
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

This skill gives the agent a layered architecture reference for Android and Kotlin Multiplatform projects. It describes a module layout that separates app wiring, core utilities, a pure Kotlin domain layer, data, presentation and a design system, along with the dependency rules that keep those layers apart.

It walks through the building blocks of each layer with Kotlin examples: UseCases that wrap a single business operation, domain models, repository interfaces and their implementations, mappers between entities and domain objects, and a Result or sealed error type for propagating failures to the UI. Persistence examples cover Room on Android and SQLDelight for KMP, and networking covers a Ktor client. Dependency injection is shown with both Koin and Hilt, and Gradle convention plugins are shown for sharing KMP build setup across modules.

The skill also lists common anti-patterns to avoid, such as framework imports in the domain layer, leaking DTOs to the UI and circular module dependencies. It has no scripts and no tool requirements; it is guidance the agent applies while writing or reviewing code in an Android or KMP codebase.

## When your agent uses it

> Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/smartworldarafath/REA_Skill/tree/HEAD/.agents/skills/android-clean-architecture)
- [License: MIT](https://github.com/smartworldarafath/REA_Skill/tree/HEAD/.agents/skills/android-clean-architecture)

## Features

- **Module layout rules:** Defines the recommended module structure and which modules may depend on which.
- **UseCase and repository patterns:** Shows how to structure single-purpose UseCases and repository interfaces in the domain layer.
- **Data layer examples:** Covers repository implementations, mappers, Room, SQLDelight and Ktor client setup.
- **Dependency injection setup:** Provides module wiring examples for both Koin and Hilt.
- **Error handling approach:** Describes a Result or sealed error type pattern for passing failures to ViewModels.
- **Anti-pattern checklist:** Lists common architecture mistakes to avoid in Android and KMP code.

## Good for

- Plan the module split for a new Android app
- Refactor a ViewModel that contains business logic into UseCases
- Set up Room or SQLDelight with a repository layer
- Wire Koin or Hilt bindings for repositories and UseCases
- Review a KMP project for dependency rule violations

## Install

### Claude Code

This skill ships in the `rea-skills` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add smartworldarafath/REA_Skill
/plugin install rea-skills@smartworldarafath
```

Or copy only this skill to `~/.claude/skills/android-clean-architecture`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/android-clean-architecture &&
cp -R "$tmp/.agents/skills/android-clean-architecture" ~/.claude/skills/android-clean-architecture &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/android-clean-architecture` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/android-clean-architecture` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/android-clean-architecture &&
cp -R "$tmp/.agents/skills/android-clean-architecture" ~/.agents/skills/android-clean-architecture &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/android-clean-architecture` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/android-clean-architecture` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/android-clean-architecture &&
cp -R "$tmp/.agents/skills/android-clean-architecture" ~/.cursor/skills/android-clean-architecture &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/android-clean-architecture` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/smartworldarafath/REA_Skill.git --path .agents/skills/android-clean-architecture
```

Or copy the folder to `~/.gemini/skills/android-clean-architecture` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/android-clean-architecture`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/android-clean-architecture &&
cp -R "$tmp/.agents/skills/android-clean-architecture" ~/.copilot/skills/android-clean-architecture &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/android-clean-architecture` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git
```

Then copy `REA_Skill/.agents/skills/android-clean-architecture` into your agent's skills folder as `android-clean-architecture`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need to run?

It has no scripts or tool requirements. It is a SKILL.md with guidance and code examples that the agent reads when a task involves Android or KMP project structure.

### When does Android clean architecture trigger?

It is meant for structuring modules, layers or data flow in an Android or Kotlin Multiplatform project, as stated in its description.

### Which persistence and DI libraries does Android clean architecture cover?

It covers Room and SQLDelight for storage, Ktor for networking, and Koin or Hilt for dependency injection.

### How do I install Android clean architecture in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/android-clean-architecture to use it in all your projects, or to .claude/skills/android-clean-architecture in one project. Or install the rea-skills plugin, which includes it: /plugin marketplace add smartworldarafath/REA_Skill, then /plugin install rea-skills@smartworldarafath.

### Does Android clean architecture run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Android clean architecture?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Android clean architecture?

The closest alternatives to Android clean architecture are Kotlin springboot, Compose multiplatform patterns, Espresso skill, Android SDK knowledge patch and Flutter apply architecture best practices.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Kotlin springboot](https://ai-powered.com/skills/kotlin-springboot): Kotlin springboot is an open-source agent skill for developer tools.
- [Compose multiplatform patterns](https://ai-powered.com/skills/compose-multiplatform-patterns): Compose multiplatform patterns is an open-source agent skill for developer tools.
- [Espresso skill](https://ai-powered.com/skills/espresso-skill): Espresso skill is an open-source agent skill for developer tools.
- [Android SDK knowledge patch](https://ai-powered.com/skills/android-sdk-knowledge-patch): Android SDK knowledge patch is an open-source agent skill for developer tools.
- [Flutter apply architecture best practices](https://ai-powered.com/skills/flutter-apply-architecture-best-practices): Flutter apply architecture best practices is an open-source agent skill for developer tools.
- [Expo module](https://ai-powered.com/skills/expo-module): Expo module is an open-source agent skill for developer tools.
- [Codebase design](https://ai-powered.com/skills/codebase-design): Codebase design is an open-source agent skill for design and media.
- [Java development](https://ai-powered.com/skills/java-development): Java development is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/android-clean-architecture
