Composables

Android Architecture

Community

HoangNguyen0403

Apply Clean Architecture layering, modularization, and Unidirectional Data Flow in Android projects. Use when setting up project structure, placing code in layers, configuring feature/core modules, or implementing UDF patterns; defer Compose state and ViewModel/StateFlow implementation to their specific skills.

Overview

Repository
HoangNguyen0403/agent-skills-standard
Publisher
HoangNguyen0403
Stars
585
Forks
163
Bundled files
3
License
MIT
Updated
Nov 14, 2026

Installation

tmp=$(mktemp -d)
git clone --depth 1 https://github.com/HoangNguyen0403/agent-skills-standard.git "$tmp"
mkdir -p ~/.claude/skills
cp -R "$tmp/skills/android/android-architecture" ~/.claude/skills/android-architecture
rm -rf "$tmp"

Instructions

Android Architecture Standards

Priority: P0 (CRITICAL)

1. Layer Your Project (Clean Architecture)

  • Domain: Pure Kotlin (No Android deps). Contains UseCases and Models.
  • Data: Repository impl, DataSources (API/DB). Maps DTO -> Domain.
  • UI: ViewModel + Composable. Maps Domain -> UiState.

See structure & examples for Clean Architecture layer examples.

2. Modularize by Feature and Core

  • Feature Modules: :feature:home, :feature:profile.
  • Core Modules: :core:ui (Design System), :core:network, :core:database.
  • App Module: DI Root and Navigation Guard.

See structure & examples for module configuration.

3. Enforce Unidirectional Data Flow (UDF)

  • Events: UI -> ViewModel (user actions flow UP).
  • State: ViewModel -> UI (StateFlow<UiState> flows DOWN).

4. Verify Jetpack Compose Integration

  • Hosting: Use setContent in Activity (No XML Layouts).
  • State: Hoist state to ViewModel using collectAsStateWithLifecycle.
  • Recomposition: Ensure Composable parameters @Stable or @Immutable.
  • Navigation: Use Compose Navigation with Type-Safe destinations.

Anti-Patterns

  • No Logic in Activity: Host Navigation only.
  • No Repo in UI: Access data exclusively via ViewModel.
  • No Context in Domain: Keep Logic Pure.

Verification

  • Domain layer has zero Android framework imports.
  • Each feature module compiles independently.
  • State flows one-way: Events UP, State DOWN.
  • ./gradlew build succeeds.

References

Bundled files

FAQ

What does Android Architecture do?

Apply Clean Architecture layering, modularization, and Unidirectional Data Flow in Android projects. Use when setting up project structure, placing code in layers, configuring feature/core modules, or implementing UDF patterns; defer Compose state and ViewModel/StateFlow implementation to their specific skills.

Who made Android Architecture?

HoangNguyen0403 (a community member) publishes it in the HoangNguyen0403/agent-skills-standard repository on GitHub.

Is Android Architecture free?

Yes. Android Architecture is open source, published by HoangNguyen0403 under the MIT license.

What comes with Android Architecture?

Its instructions and 3 files the agent reads only when a task needs them, such as references, examples or scripts.

Which agents can use Android Architecture?

Any coding agent that reads SKILL.md files, including Claude Code, Codex, Cursor, GitHub Copilot and Gemini CLI. The agent loads the skill when a task matches its description.

What are agent skills?

An agent skill is a folder with a SKILL.md file: instructions that teach a coding agent how to do one kind of task, and optionally files it can read while it works. The agent keeps only the skill's name and description in mind and reads the rest when a task calls for it.

How are agent skills different from MCP servers?

An MCP server gives an agent new tools to call, code that runs somewhere and returns results. A skill gives it knowledge: how to approach a task with the tools it already has. Many agents use both.

How can my agent test my Android app?

Robomori lets coding agents create, start and control Android emulators and devices from one command, so they can install your app, take screenshots and check dark mode, font sizes and languages.

You're subscribed

The next lesson lands in on Wednesday.