android-architecture

Design and review Android app architecture for MVVM or MVI feature modules.

1|Updated Feb 28, 2026
One-click install
npx skills add https://github.com/Binh230199/ai --skill android-architecture-binh230199
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-architecture
Source: https://github.com/Binh230199/ai/tree/main/.github/skills/android-architecture
Command: npx skills add https://github.com/Binh230199/ai --skill android-architecture-binh230199

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps you design, implement, and review Android app architecture so features stay cleanly layered, testable, and scalable across presentation, domain, and data code.

Core Features & Use Cases

  • Architecture Decisions: Compare MVVM and MVI, define UI state and effects, and keep business logic out of ViewModels.
  • Clean Architecture Guidance: Separate domain entities, use cases, repositories, and data sources with clear dependency direction.
  • Hilt and Modularization: Set up dependency injection scopes, repository bindings, and feature and core module graphs for production Android or AOSP projects.
  • Use Case: Refactor a screen with leaking dependencies into a feature module with domain use cases, a repository interface, and injected data implementations.

Quick Start

Ask for an architecture plan, refactor, or review for a named Android feature or module using Clean Architecture, MVVM or MVI, Hilt, and modularization.

Frequently Asked Questions about android-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure an Android app using clean architecture and MVVM?

Structure an Android app by enforcing strict layer separation across presentation, domain, and data. Keep business logic out of ViewModels, define repository interfaces in the domain layer, and inject data implementations to ensure feature modules remain testable and scalable.

What is the best way to modularize an Android project with Hilt?

The best way to modularize an Android project with Hilt is by setting up dependency injection scopes and repository bindings across feature and core module graphs. Apply feature-to-core dependency rules to maintain clear boundaries and scalable production builds.

How do I manage UI state and effects when using MVI in Android?

Manage UI state and effects in Android MVI by using single-state UI models and shared-flow effects. This approach centralizes screen rendering logic and ensures that UI updates remain predictable and consistently testable across feature modules.

Can I apply clean architecture boundaries to AOSP Soong builds?

Yes, you can apply clean architecture boundaries to AOSP Soong builds. The architecture design principles support Android Studio Gradle projects and AOSP Soong builds when planning layered screens, repository flows, and domain logic separation.

Why do my Android ViewModels leak dependencies during feature refactoring?

ViewModels leak dependencies when strict layer separation is violated. Refactor the screen into a feature module with domain use cases and a repository interface, ensuring dependencies and dispatchers are explicitly injected rather than directly referenced.

When should I choose MVI over MVVM for Android feature modules?

Choose MVI over MVVM when you need strict single-state UI models and unidirectional data flow for predictable screen rendering. MVI enforces shared-flow effects and pure domain logic, while MVVM offers flexibility for separating presentation from business logic.