pradeepthallapelly369/everything-claude-code/android-clean-architecture
Claude Code and agent skill by pradeepthallapelly369/everything-claude-code
- community
Checking that the SKILL.md file is still in the repository.
Clean Architecture patterns for Android and Kotlin Multiplatform projects — module structure, dependency rules, UseCases, Repositories, and data layer patterns. Use when structuring modules, layers, or data flow in an Android or KMP project.
Install
npx vskill@latest install pradeepthallapelly369/everything-claude-code/android-clean-architectureSKILL.md
The same SKILL.md was published earlier as junmystery/agent-guidance-rust/android-clean-architecture.
Android Clean Architecture
Clean Architecture patterns for Android and KMP projects. Covers module boundaries, dependency inversion, UseCase/Repository patterns, and data layer design with Room, SQLDelight, and Ktor.
When to Activate
- Structuring Android or KMP project modules
- Implementing UseCases, Repositories, or DataSources
- Designing data flow between layers (domain, data, presentation)
- Setting up dependency injection with Koin or Hilt
- Working with Room, SQLDelight, or Ktor in a layered architecture
Module Structure
Recommended Layout
Dependency Rules
Critical: domain must NEVER depend on data, presentation, or any framework. It contains pure Kotlin only.
Domain Layer
UseCase Pattern
Each UseCase represents one business operation. Use operator fun invoke for clean call sites:
Domain Models
Domain models are plain Kotlin data classes — no framework annotations:
Repository Interfaces
Defined in domain, implemented in data:
Data Layer
Repository Implementation
Coordinates between local and remote data sources:
Mapper Pattern
Keep mappers as extension functions near the data models:
Room Database (Android)
SQLDelight (KMP)
Ktor Network Client (KMP)
Dependency Injection
Koin (KMP-friendly)
Hilt (Android-only)
Error Handling
Result/Try Pattern
Use Result<T> or a custom sealed type for error propagation:
Convention Plugins (Gradle)
For KMP projects, use convention plugins to reduce build file duplication:
Apply in modules:
Anti-Patterns to Avoid
- Importing Android framework classes in
domain— keep it pure Kotlin - Exposing database entities or DTOs to the UI layer — always map to domain models
- Putting business logic in ViewModels — extract to UseCases
- Using
GlobalScopeor unstructured coroutines — useviewModelScopeor structured concurrency - Fat repository implementations — split into focused DataSources
- Circular module dependencies — if A depends on B, B must not depend on A
References
See skill: compose-multiplatform-patterns for UI patterns. See skill: kotlin-coroutines-flows for async patterns.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/android-clean-architecture/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Grok Build (Cursor)
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/pradeepthallapelly369/everything-claude-code/android-clean-architecture)