android-patterns

Provide standardized Kotlin 2.0 and Jetpack Compose coding patterns for MVI and Clean Architecture.

1|Updated Dec 3, 2024
One-click install
npx skills add https://github.com/Enso-Soft/lotto-assist --skill android-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-patterns
Source: https://github.com/Enso-Soft/lotto-assist/tree/main/.claude/skills/android-patterns
Command: npx skills add https://github.com/Enso-Soft/lotto-assist --skill android-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides Android coding patterns and architecture guidance for Kotlin 2.0 and Jetpack Compose projects, helping teams write clean, maintainable, scalable Android apps with consistent patterns.

Core Features & Use Cases

  • MVI pattern guidance with state, events, and effects
  • Clean Architecture layering and dependency directions
  • Compose patterns for state handling and recomposition optimization
  • Coroutines & Flow patterns for asynchronous work and UI state
  • Quick examples for ViewModel templates, UseCase, and Repository templates
  • Use Case: when starting a new Android feature and you want consistent architecture across modules.

Quick Start

Open the Android Patterns skill and refer to the Compose Patterns, MVI Pattern, and Clean Architecture guidelines to structure a new feature. No code required yet; start by reading the contracts and examples to implement in your project.

Frequently Asked Questions about android-patterns

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

FAQPage Schema
How do I structure a new Android feature with Clean Architecture and MVI?

Clean Architecture with MVI organizes code into Domain, Data, and Presentation layers with unidirectional data flow: state represents UI, events capture user actions, and effects trigger side effects. This Skill provides ViewModel, UseCase, and Repository templates to enforce dependency rules and consistent contracts across your Kotlin and Compose projects.

What's the best way to handle asynchronous operations in Jetpack Compose with Coroutines and Flow?

Coroutines and Flow patterns manage background work and state updates in Compose without blocking the UI thread. This Skill covers Flow usage for reactive updates, coroutine scope management in ViewModels, and patterns to safely collect state for recomposition optimization.

How do I map between DTOs and domain models in Android without inconsistency?

Mapper patterns convert Data Transfer Objects from API responses into domain model objects, maintaining type safety and decoupling layers. This Skill provides mapper templates and contracts that standardize these transformations across your feature modules.

Can I use these architecture patterns with Kotlin 2.0 and Jetpack Compose?

Yes. This Skill provides standardized patterns specifically for Kotlin 2.0 and Jetpack Compose projects, including Compose-specific state handling, recomposition optimization, and coroutine integration with modern Kotlin language features.

Why do my Android modules have inconsistent architecture across features?

Inconsistent patterns emerge when teams lack shared contracts and templates for layers, ViewModels, and dependencies. This Skill resolves that by providing ready-to-use architecture guidance, dependency rules, and code review standards for MVI and Clean Architecture.

What are the dependency rules between Domain, Data, and Presentation layers?

Presentation depends on Domain; Domain depends on Data; Data never depends upward. This unidirectional flow prevents circular dependencies and keeps business logic testable. This Skill enforces these rules through contract structures and template examples.