android-architecture

Design Android app architecture with Clean Architecture and Hilt dependency injection.

Updated Mar 9, 2025
One-click install
npx skills add https://github.com/rock-hu/vitamin-compose --skill android-architecture-rock-hu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-architecture
Source: https://github.com/rock-hu/vitamin-compose/tree/main/.github/skills/android-architecture
Command: npx skills add https://github.com/rock-hu/vitamin-compose --skill android-architecture-rock-hu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides expert guidance for designing and maintaining a modern Android application architecture using Clean Architecture principles and Hilt, enabling consistent structure and scalable development across teams.

Core Features & Use Cases

  • Guidance on three-layer architecture (UI/Presentation, Domain, Data) with strict inward dependencies and testability.
  • Modularization strategies for multi-module Android projects and clear module boundaries.
  • Dependency injection setup with Hilt (annotated components, ViewModel injection, and testing considerations).
  • Architecture governance patterns for code organization, refactors, and team collaboration.
  • Use Case: refactor a monolithic app into modular layers while preserving behavior and test coverage.

Quick Start

Define a new Android project structure with UI, Domain, and Data layers, introduce Hilt for DI, and establish module boundaries per the guidelines.

Frequently Asked Questions about android-architecture

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

FAQPage Schema
How do I set up Android Clean Architecture with Hilt for dependency injection?

Android Clean Architecture with Hilt requires structuring your app into UI, Domain, and Data layers, using annotated Hilt components to inject dependencies while enforcing strict inward dependency rules where UI depends on Domain, and Domain depends on Data.

What is the correct dependency direction for Android Clean Architecture modules?

The correct dependency direction for Android Clean Architecture is strictly inward: UI and presentation layers depend on Domain, and Domain depends on Data, ensuring separation of concerns and testability across multi-module setups.

How do I refactor a monolithic Android app into modular layers?

Refactoring a monolithic Android app into modular layers involves defining clear module boundaries, applying architectural governance patterns to separate concerns, and preserving existing behavior and test coverage throughout the multi-module migration process.

Does Hilt work with multi-module Android projects using Clean Architecture?

Yes, Hilt works with multi-module Android projects by providing annotated components for ViewModel injection and dependency setup, integrating cleanly across clear module boundaries established by Clean Architecture layering rules.

When do I need to modularize my Android app architecture?

You need to modularize your Android app architecture when scaling development across teams requires consistent project structure, strict separation of concerns, and explicit module boundaries to maintain architectural governance and testability.

What are the limitations of using Hilt for Android dependency injection?

Hilt limitations in Android dependency injection include managing testing considerations for annotated components and ensuring explicit dependency directions are maintained, which requires careful architecture governance during multi-module refactoring to avoid breaking layering rules.