android-code-review-expert
Skill11 starsChanged 8 months agoMITView on GitHub
Use when performing a code review for Android pull requests, focusing on architecture, memory safety, and UI excellence.
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-clean-architectureSkill
- 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
Files
Android Code Review Excellence 🧐🛡️
A rigorous framework for AI agents and developers to perform high-quality, professional Android code reviews.
⚡ When to Use
- PR Review: Analyzing a Pull Request for logic, style, and regressions.
- Pre-commit Audit: Self-checking code before pushing.
- Architectural Check: Ensuring new features follow the established team patterns.
- Security Audit: Spotting sensitive data exposure or insecure networking.
- Performance Audit: Detecting potential memory leaks or UI jank.
🏗️ Review Checklist
1. Architecture & Design
- Clean Architecture: Is logic properly separated into Domain/Data/Presentation?
- State Flow: Does the ViewModel expose
StateFlow? Is state properly hoisted? - Dependency Injection: Are dependencies injected via Hilt/Koin? No manual
new Class()for dependencies. - Manifest Scaffolding: Are required permissions (like
INTERNETfor Coil/Retrofit) actually defined? Is the@HiltAndroidAppclass correctly designated inAndroidManifest.xmlviaandroid:name? - Type-Safe Navigation: Is the app using Compose
NavHostwith Kotlin Serialization (type-safe routes) instead of anti-pattern manual state swapping? - Modularity: Is the code placed in the correct module?
2. Jetpack Compose (UI)
- Recomposition: Are there expensive calculations inside
@Composable? Useremember. - Previews: Does the new component have
@Previewfor light/dark mode and accessibility? - Stability: Are domain models marked
@Stableor@Immutable? - Material 3: Is the code using the theme's
MaterialTheme.colorSchemeinstead of hardcoded hex values? - Theme Bridge: If XML resources are used (e.g.
res/), is the Material Components XML Bridge correctly set up in themes?
3. Stability & Networking
- Error Handling: Are network calls wrapped in
Resultortry/catchwith proper UI feedback? - Coroutine Scopes: Use
viewModelScopefor ViewModels andlifecycleScopefor Fragments/Activities. - Flow Lifecycle: Is
collectAsStateWithLifecycle()used instead of basecollectAsState()? (Critical for avoiding resource leaks when the app goes into the background). - Room TypeConverters: If caching domain models with complex definitions (e.g.
LocalDateTime,List<String>), did you verify a@TypeConverteris written and registered on the Database? ROOM WILL CRASH without this.
4. Performance & Memory
- Memory Leaks: Are there references to
Contextheld in long-lived objects? - Lazy Lists: Are
keyparameters provided foritems()inLazyColumn/LazyRow? - Heavy Work: Is heavy computation moved to
Dispatchers.Default?
5. Security & Privacy
- Sensitive Data: Ensure NO passwords, keys, or PII are logged or stored in plain text.
- Networking: Is all communication over HTTPS? No
cleartextTrafficallowed. - Permissions: Is the app requesting minimum necessary permissions?
📜 Reviewer Best Practices
- The "Why", Not Just the "What": Explain the reasoning behind a request (e.g., "Use
rememberhere to prevent re-calculating on every frame"). - Prioritize: Distinguish between "Critical" (security, crashes) and "Nitpick" (formatting, naming).
- Compliment: Acknowledge good code, elegant solutions, and clear documentation.
🧪 Verification Commands (For Agents)
Check Lint
./gradlew lintDebugCheck Style
./gradlew ktlintCheckRun Logic Tests
./gradlew testDebugUnitTest🔗 Related Resources
- Google Official Review Guide
- Lint & Quality 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.

