Skip to content
Back to skills

Android Architecture Clean

ASecurity

Apply clean architecture boundaries, use cases, repositories, and lifecycle-aware presentation models in Android projects.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 2, 2026
ai-agentspythongokotlinrailsrefactoringapi

Works with

  • api

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 2, 2026

npx -y skills add FJRG2007/enigma --skill android-architecture-clean --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Android Architecture Clean?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Android Architecture Clean
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/fjrg2007-android-architecture-clean/badge)](https://www.skillsdirectory.com/skills/fjrg2007-android-architecture-clean)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "android-architecture-clean"
description: "Apply clean architecture boundaries, use cases, repositories, and lifecycle-aware presentation models in Android projects."
metadata:
  version: "0.1.0"
  category: "foundations"
  tags: ["android", "architecture", "clean-architecture", "layers"]
  triggers:
    include: ["clean architecture in android", "split use cases and repositories", "untangle presentation and data layer", "android architecture cleanup", "mvvm to cleaner boundaries"]
    exclude: ["retrofit config only", "compose animation tweak", "play store release only"]
  owners: ["@android-agent-skills/maintainers"]
  test_targets: ["examples/orbittasks-compose", "examples/orbittasks-xml", "benchmarks/triggers.jsonl"]
---
# Android Architecture Clean

## When To Use
- Use this skill when the request is about: clean architecture in android, split use cases and repositories, untangle presentation and data layer.
- Primary outcome: Apply clean architecture boundaries, use cases, repositories, and lifecycle-aware presentation models in Android projects.
- Handoff skills when the scope expands:
- `android-modularization`
- `android-state-management`

## Workflow
1. Map the request to the current Android stack, module boundaries, and minimum supported API level.
2. Inspect the existing implementation for implicit assumptions, duplicate helpers, and outdated patterns.
3. Apply the smallest change that improves correctness, readability, and long-term maintainability.
4. Validate the result against the relevant showcase app path and repo benchmarks.
5. Hand off adjacent work to the next specialized skill only after the core foundation is stable.

## Guardrails
- Prefer official Android and Kotlin guidance over custom local conventions when they conflict.
- Keep public APIs boring and explicit; avoid clever abstractions that hide Android lifecycle costs.
- Do not mix architectural cleanup with product behavior changes unless the request explicitly needs both.
- Document any compatibility constraints that will affect old modules or generated code.

## Anti-Patterns
- Sprinkling helpers across modules without a clear ownership boundary.
- Introducing framework-specific code into pure domain or data layers.
- Refactoring every adjacent file when only one contract needed to change.
- Leaving migration notes implied instead of writing them down.

## Examples
### Happy path
- Scenario: Separate OrbitTasks feature state, use case, and repository contracts.
- Command: `cd examples/orbittasks-compose && ./gradlew :app:testDebugUnitTest`

### Edge case
- Scenario: Keep XML activity actions thin while preserving saved-state behavior.
- Command: `cd examples/orbittasks-xml && ./gradlew :app:testDebugUnitTest`

### Failure recovery
- Scenario: Catch trigger confusion against modularization and state-management requests.
- Command: `python3 scripts/eval_triggers.py --skill android-architecture-clean`

## Done Checklist
- The implementation path is explicit, minimal, and tied to the right Android surface.
- Relevant example commands and benchmark prompts have been exercised or updated.
- Handoffs to adjacent skills are documented when the request crosses boundaries.
- Official references cover the chosen pattern and the main migration or troubleshooting path.

## Official References
- [https://developer.android.com/topic/architecture](https://developer.android.com/topic/architecture)
- [https://developer.android.com/topic/architecture/recommendations](https://developer.android.com/topic/architecture/recommendations)
- [https://developer.android.com/jetpack/guide](https://developer.android.com/jetpack/guide)
- [https://developer.android.com/topic/libraries/architecture/viewmodel](https://developer.android.com/topic/libraries/architecture/viewmodel)

Files in this skill

  • SKILL.md3.7 KB
  • agents/openai.yaml402 B
  • references/official-links.md519 B
  • references/patterns.md989 B
  • references/scenarios.md578 B
  • scripts/run_examples.sh424 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…