android-architecture_skill

This skill helps you implement Android MVVM and Repository patterns by applying Google's architecture guides across ViewModels, Repositories, and Compose.
  • Shell

0

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill shotaiuchi/dotclaude --skill android-architecture

  • SKILL.md1.4 KB

Overview

This skill helps implement Android features using recommended architecture patterns like MVVM, UDF, Repository, and Clean Architecture. It guides creation of ViewModels, Repositories, dependency injection with Hilt, and Jetpack Compose integration to produce testable, maintainable apps. Use it to align code with Google’s Android Architecture guidance and established best practices.

How this skill works

The skill inspects feature designs and code structure to recommend pattern-aligned implementations: where to place UI state in ViewModels, how to define repositories and data sources, and how to wire dependencies with Hilt. It suggests Compose-friendly state flows, unidirectional data flow (UDF) event handling, and boundaries between layers to make testing and evolution easier.

When to use it

  • Implementing new screens with Jetpack Compose and ViewModel-driven state
  • Designing data access with Repository and data source separation
  • Setting up Hilt for scoped dependency injection in features
  • Applying UDF for predictable UI events and state transitions
  • Refactoring legacy code toward MVVM or Clean Architecture

Best practices

  • Keep UI logic in ViewModel; UI only renders state and emits user intents
  • Expose immutable state (e.g., StateFlow) from ViewModels and accept intents via functions
  • Define Repository interfaces for domain-facing operations and separate local/remote data sources
  • Use Hilt to provide scoped dependencies and avoid service locators or static singletons
  • Model side effects explicitly (events) and process them in a single, testable coordinator

Example use cases

  • Create a Compose screen: View emits intents, ViewModel updates StateFlow, Repository fetches data and maps to UI models
  • Add a Repository abstraction to enable unit testing of ViewModel logic without network/database dependencies
  • Introduce Hilt modules to inject feature-scoped use cases and repositories into ViewModels
  • Refactor a Presenter-based screen to MVVM: move presentation state and business logic into a ViewModel and keep UI stateless

FAQ

Place domain and business rules in use-case or domain-layer components (Repository or dedicated use-case classes). ViewModels should orchestrate and adapt domain outputs for the UI, not contain core business logic.

How do I test Compose UIs with UDF?

Keep UI deterministic by exposing StateFlows and one-way event channels. Write unit tests for ViewModel behavior and use Compose testing APIs to assert UI rendering from controlled states and simulated events.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational