android-clean-architecture
Skill11 starsChanged 8 months agoMITView on GitHub
Use when designing the architecture, data layer, domain models, or business logic for Android apps.
10 other projects use a version of this.
Adopted by
Most recently taken up by
- templetongroup/radianttheir own version, first seen Sep 17, 2026
- SamuelNDCE/claude-super-skill-librarytheir own version, first seen Aug 1, 2026
- JunMystery/Agent-Guidance-Pythontheir own version, first seen Jul 21, 2026
- Jamkris/everything-gemini-codetheir own version, first seen Apr 27, 2026
- loulanyue/awesome-claude-notestheir own version, first seen Mar 24, 2026
- mryeastcode/ClaudeCodetheir own version, first seen Mar 20, 2026
Used with
Projects with it also use everything-claude-code, perl-security and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
InfopibeSkilleverything-claude-code
Also in 3 projects that use this
InfopibeSkillperl-security
Comprehensive Perl security covering taint mode, input validation, safe process execution, DBI parameterized queries, web security (XSS/SQLi/CSRF), and perlcritic security policies.
Also in 3 projects that use this
saxon-ySkillconfigure-ecc
Interactive installer for Everything Claude Code — guides users through selecting and installing skills and rules to user-level or project-level directories, verifies paths, and optionally optimizes installed files.
Also in 3 projects that use this
- +9 more from Infopibe
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- loulanyue/awesome-claude-notes★ 272same name
- tpavanipradeep/everything-claude-code★ 134same name
- templetongroup/radiant★ 113same name
- Jamkris/everything-gemini-code★ 87same name
- Infopibe/everything-claude-code★ 8same name
- JunMystery/Agent-Guidance-Python★ 2same name
- ashutoshrathi0909-oss/everything-claude-code★ 1same name
- SamuelNDCE/claude-super-skill-library★ 1same name
- LeeYoonSam/ClaudeSkillsForAndroid★ 0same name
- mryeastcode/ClaudeCode★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository40 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- android-accessibilitySkill
- android-adaptive-layoutsSkill
- android-adb-terminalSkill
- android-background-executionSkill
- android-bluetooth-bleSkill
- android-build-verificationSkill
- android-camerax-mlkitSkill
- android-ci-cd-expertSkill
- android-code-review-expertSkill
- android-coroutines-expertSkill
- android-custom-drawing-canvasSkill
- android-design-system-m3Skill
- android-design-to-codeSkill
- android-detekt-expertSkill
- android-enterprise-securitySkill
- android-gemini-nanoSkill
- android-google-workspace-expertSkill
- android-gradle-expertSkill
- android-hardware-testingSkill
- android-jetpack-composeSkill
- android-kmp-compose-uiSkill
- android-kmp-platform-channelsSkill
- android-kmp-sharedSkill
- android-ktlint-formattingSkill
- android-lint-and-qualitySkill
- android-local-stt-ttsSkill
- android-location-mapsSkill
- android-macrobenchmarkSkill
- android-media3-exoplayerSkill
- android-media-and-image-expertSkill
- android-motion-animationsSkill
- android-navigation-expertSkill
- android-offline-firstSkill
- android-performance-auditSkill
- android-rag-localSkill
- android-screenshot-testingSkill
- android-security-hardenedSkill
- android-unit-testingSkill
- android-wear-os-composeSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 0 are common, 4 are distinctive, and 12 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 34
Pattern: Always use Jetpack ViewModel.
- Very specific: line 35
State: Use MutableStateFlow in ViewModel.
- Distinctive: line 36
MVI/MVVM: Prefer State + Events + Effects for complex screens.
- Very specific: line 37
Anti-Pattern (No Stubs): NEVER generate stubbed empty callbacks (e.g., onClicked = { /* Future implementation */ }) when scaffolding.
- Distinctive: line 38
Navigation: Use Compose Navigation with Safe Args (Type-safe routing via Kotlinx Serialization) instead of manual screen swapping.
- Very specific: line 42
Rule: NO Android dependencies (except maybe @Inject).
- Very specific: line 52
CRITICAL ANTI-HALLUCINATION GUARD: NEVER assume or guess the properties of a data class (e.g., guessing a TodoItem has a dueDate).
- Very specific: line 59
Room TypeConverters (CRITICAL): If your domain model contains non-primitive types (e.g., LocalDateTime, Enums, Custom Objects), you MUST …
- Very specific: line 66
Rule: Create a class inheriting from Application and annotate it with @HiltAndroidApp.
- Very specific: line 76
Use @HiltViewModel for ViewModels.
- Very specific: line 77
Use @AndroidEntryPoint for Activities/Fragments (if any).
- Very specific: line 78
Use @Inject constructor for Use Cases and Repositories.
- Very specific: line 79
Create @Module and @InstallIn(SingletonComponent::class) for platform dependencies.
- Very specific: line 83
Unit Tests: Place in test/. Use MockK for mocking interfaces.
- Very specific: line 84
Test Coroutines: Use runTest and TestDispatcher.
- Distinctive: line 85
Fakes vs Mocks: Prefer Fakes for complex Data sources and Mocks for simple verification.
“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Android Clean Architecture Excellence 🏗️
Standardized architectural patterns for scalable, testable, and maintainable Android applications.
⚡ When to Use
- App Structure: Planning or refactoring the module/package layout.
- Data Fetching: Implementing Retrofit or Room repositories.
- Business Logic: Writing Use Cases or Interactors.
- UI Architecture: Choosing between MVI, MVVM, or custom patterns.
- State Management: Consuming data from Flow/StateFlow in ViewModels.
🏗️ The Three Pillars
1. Presentation Layer (UI & ViewModels)
- Pattern: Always use Jetpack ViewModel.
- State: Use
MutableStateFlowin ViewModel. In Compose UI, ALWAYS collect usingcollectAsStateWithLifecycle()(requiresandroidx.lifecycle:lifecycle-runtime-compose). NEVER usecollectAsState()as it wastes resources in the background. - MVI/MVVM: Prefer State + Events + Effects for complex screens.
- Anti-Pattern (No Stubs): NEVER generate stubbed empty callbacks (e.g.,
onClicked = { /* Future implementation */ }) when scaffolding. If tasked to build a feature, ALWAYS implement the full event flow from UI to ViewModel to Repository. - Navigation: Use Compose Navigation with Safe Args (Type-safe routing via Kotlinx Serialization) instead of manual screen swapping.
2. Domain Layer (The Core)
- Rule: NO Android dependencies (except maybe
@Inject). Pure Kotlin. Use Cases: Each Use Case should have a single responsibility.
class GetUserUseCase @Inject constructor(private val repository: UserRepository) { operator fun invoke(id: String): Flow<User> = repository.getUser(id) }- Models: Pure Kotlin data classes (Domain-specific).
- CRITICAL ANTI-HALLUCINATION GUARD: NEVER assume or guess the properties of a data class (e.g., guessing a
TodoItemhas adueDate). You MUST explicitly read the data classes indomain/model/before writing ViewModel or Repository mapping logic to preventUnresolved referenceor constructor errors.
3. Data Layer (Sources & Repositories)
- Pattern: Repository as a single source of truth.
- DTOs: Data Transfer Objects (e.g., Json objects from Retrofit). Always map DTOs to Domain Models before passing to the Domain Layer.
- Sources: Remote (Retrofit/Ktor) and Local (Room/DataStore).
- Room TypeConverters (CRITICAL): If your domain model contains non-primitive types (e.g.,
LocalDateTime, Enums, Custom Objects), you MUST create a@TypeConverterclass and explicitly register it on the@Databaseclass before compiling. Room cannot natively store them!
💉 Dependency Injection (Hilt)
Hilt is the standard DI library. Ensure the following foundational setup is ALWAYS present:
1. Mandatory Application Class
- Rule: Create a class inheriting from
Applicationand annotate it with@HiltAndroidApp.@HiltAndroidApp class BaseApplication : Application()
2. Manifest Registration
- Rule: Register your application class in
AndroidManifest.xmlusingandroid:name=".BaseApplication".
3. Usage Patterns
- Use
@HiltViewModelfor ViewModels. - Use
@AndroidEntryPointfor Activities/Fragments (if any). - Use
@Inject constructorfor Use Cases and Repositories. - Create
@Moduleand@InstallIn(SingletonComponent::class)for platform dependencies.
🧪 Testing Strategy
- Unit Tests: Place in
test/. Use MockK for mocking interfaces. - Test Coroutines: Use
runTestandTestDispatcher. - Fakes vs Mocks: Prefer Fakes for complex Data sources and Mocks for simple verification.
🚀 Modern Reactive Flows
- StateFlow: For state that needs initial value and persistence.
- SharedFlow: For one-off events (e.g., Navigation, Snackbar).
- Error Handling: Use a
Resultwrapper orResourceobject to encapsulate Success/Error states.
🔗 Related Resources
- Google Official Architecture Guide
- Compose Skill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

