Skip to content

Guide · Agent skill

How to use the Android Clean Architecture agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The android-clean-architecture skill gives an AI agent a reference playbook for organizing Android and Kotlin Multiplatform (KMP) projects into layers such as domain, data and presentation. It is useful for Android developers starting a new app, teams moving a Kotlin or KMP codebase toward clean architecture, and anyone learning how repositories, use cases and data sources fit together. After this guide you will know what the skill changes about the agent's behaviour, how to install it, and how to ask for work that triggers it.

Android Clean Architecture Guideaffaan-m/ECC · MIT

Quick start

  1. 1Download the ZIP. Download the skill ZIP from this page and unzip it so you have the android-clean-architecture folder containing SKILL.md.
  2. 2Choose an install location. Place the folder in ~/.claude/skills/ for personal use, or in your project's .claude/skills/ folder to limit it to one project.
  3. 3Or upload it in the Claude apps. If you use the Claude apps, open Settings → Capabilities → Skills and upload the skill there.
  4. 4Describe an Android or KMP task. Ask for work in plain language, naming layers or patterns such as use cases, repositories or Room.
  5. 5Review the generated structure. Check that domain has no Android or data imports, and that UI code receives domain models rather than entities or DTOs.
  6. 6Adjust to your conventions. If the output conflicts with your existing architecture, tell the agent which conventions your project follows.

What is an agent skill and what does this one do?

An agent skill is a folder containing a SKILL.md file with instructions the agent can read when a task matches them. This skill is a single SKILL.md file. Its source describes the module layout, the dependency rule that the domain layer must not depend on data, presentation or any framework, and code patterns for use cases, repositories, mappers, Room, SQLDelight, Ktor, Koin, Hilt, Result-based error handling and Gradle convention plugins.

When installed, the agent follows these patterns when you ask it to build or refactor app code. It is a reference for consistency, not a program that runs on its own.

  • Recommended modules: app, core, domain, data, presentation, design-system and an optional feature folder for large projects
  • Use cases with operator fun invoke, plain Kotlin domain models and repository interfaces defined in domain
  • Data layer patterns for Room (Android), SQLDelight and Ktor (KMP)
  • Dependency injection with Koin (KMP friendly) or Hilt (Android only)
  • An anti-patterns list, such as no business logic in ViewModels and no GlobalScope

How do you install the android-clean-architecture skill?

Download the ZIP for this skill from this page and unzip it. The skill folder contains SKILL.md. Put that folder in one of these locations:

For a personal install available across projects, place it in ~/.claude/skills/. For a single project, place it in the project's .claude/skills/ folder so it applies only there.

If you use the Claude apps, you can instead upload the skill under Settings → Capabilities → Skills.

  • Personal: ~/.claude/skills/android-clean-architecture/
  • Project only: .claude/skills/android-clean-architecture/ inside your project
  • Claude apps: Settings → Capabilities → Skills, then upload

How do you trigger the skill with natural requests?

You do not need a special command. Describe the Android or KMP task in plain language and mention the architecture work you want. The source lists these situations as triggers: structuring Android or KMP modules, implementing use cases, repositories or data sources, designing data flow between layers, setting up Koin or Hilt, and using Room, SQLDelight or Ktor in a layered architecture.

Naming the layers or patterns in your request makes it more likely the agent applies the playbook.

  • Set up a new Android app with domain, data and presentation modules following clean architecture.
  • Add a GetOrdersByCustomerUseCase and its repository interface in domain, with the implementation in data.
  • Refactor this ViewModel so the business logic moves into use cases.
  • Set up Koin modules for domain, data and presentation in our KMP project.
  • Add a Room entity and mapper so the data layer converts to domain models.

What can you expect the agent to produce?

For a feature request, the agent should place domain models and repository interfaces in the domain module, write use cases that wrap single business operations, implement the repository in data with local and remote data sources, and map entities or DTOs to domain models before they reach the UI. For error handling it can use Result<T> or a sealed type such as the Try and AppError pattern shown in the source.

Check the output against your project's conventions. The source notes the agent may push these patterns over existing ones.

What does the skill need, and is it safe to use?

The skill needs Kotlin and an Android or Kotlin Multiplatform project. It does not run code itself. According to its listing, it runs no scripts and makes no network calls. Its only file is SKILL.md.

The skill only adds instructions to the agent's context. Any code the agent writes still goes through your normal review, build and test process. The source includes example URLs such as https://api.example.com/ as placeholders, so replace them with your own endpoints.

  • Requires: Kotlin plus an Android or KMP project
  • Runs scripts: no
  • Uses network: no
  • Files: SKILL.md

Tips for getting good results

Give the agent your existing module names and layers so it fits them rather than inventing a new structure. If your project uses another architecture, such as MVI with its own conventions, say so up front, because this skill is written around clean architecture layers.

Ask for one feature at a time. Small, specific requests make it easier to review the generated domain, data and presentation changes.

  • Tell the agent which modules already exist before asking for new ones
  • Name the DI framework you use (Koin or Hilt)
  • Review dependency directions after each change: domain must not import Android or data classes

What people use it for

  • Starting a new Android app with a consistent domain, data and presentation layout
  • Adding a use case and repository for a new feature in an existing KMP project
  • Refactoring a ViewModel by moving business logic into use cases
  • Wiring Koin or Hilt modules for repositories, data sources and ViewModels
  • Setting up Room or SQLDelight tables with mappers between entities and domain models

Frequently asked questions

How do I install the android-clean-architecture skill?

Download the ZIP from this page and unzip it. Place the android-clean-architecture folder in ~/.claude/skills/ for personal use, or in a project's .claude/skills/ folder. In the Claude apps you can instead upload it under Settings → Capabilities → Skills.

What do I need to use this skill?

You need Kotlin and an Android or Kotlin Multiplatform project. The skill itself does not run code, and according to its listing it runs no scripts and uses no network.

Is the android clean architecture skill free?

The source is published under the MIT licence. The source does not mention pricing, so check the listing on this page for any further terms.

Does this skill work with Hilt and Koin?

Yes. The source covers Koin as KMP friendly and Hilt for Android only, with example module setups for each.

Can I use this skill for a project that uses MVI?

It is not a good fit for that. The source says projects that must follow a different architecture, such as MVI with its own conventions, should pick something else or be careful, because the agent may push these patterns over existing ones.

Why does the agent keep putting code in the domain layer without Android imports?

That is the core dependency rule in the skill: domain must not depend on data, presentation or any framework and contains only pure Kotlin. If the agent breaks this, point it back to the rule and to the anti-patterns list.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use this skill if you are building or refactoring an Android or Kotlin Multiplatform app and want the agent to follow a clear layered structure with use cases, repositories and mappers. Skip it for single-screen apps, non-Kotlin projects, or codebases that already commit to a different architecture such as MVI.

Download the skill