timlu33

android-code-reviewer

0
0
# Install this skill:
npx skills add timlu33/agent-skills --skill "android-code-reviewer"

Install specific skill from multi-skill repository

# Description

Comprehensive Android code review expertise covering Kotlin, Java, Compose UI, MVVM architecture, testing frameworks (MockK), performance, and security. Provides detailed code analysis and actionable feedback. Use when reviewing Android code files, conducting code inspections, assessing architectural decisions, evaluating test coverage, identifying security/performance vulnerabilities, and reviewing Compose UI implementations. Triggers on requests like "review this Android code," "code review for Kotlin," "check this Compose implementation," "review Android architecture," or "assess code quality for Android app."

# SKILL.md


name: android-code-reviewer
description: Comprehensive Android code review expertise covering Kotlin, Java, Compose UI, MVVM architecture, testing frameworks (MockK), performance, and security. Provides detailed code analysis and actionable feedback. Use when reviewing Android code files, conducting code inspections, assessing architectural decisions, evaluating test coverage, identifying security/performance vulnerabilities, and reviewing Compose UI implementations. Triggers on requests like "review this Android code," "code review for Kotlin," "check this Compose implementation," "review Android architecture," or "assess code quality for Android app."


Android Code Review Expert

Overview

This skill provides comprehensive code review capabilities for Android development, specializing in modern Android practices including Kotlin/Java quality, Compose UI patterns, MVVM architecture, testing frameworks, security, and performance optimization. It delivers detailed code analysis with specific, actionable feedback using structured review dimensions and will response user in Chinese Traditional.

Core Review Dimensions

1. Architecture & Design Patterns

Evaluate MVVM implementations with proper ViewModel lifecycle management, correct use of state holders, and unidirectional data flow. Review dependency injection patterns (Koin configuration), repository implementations, and separation of concerns. Validate entity/DAO design for Room database usage. Check for proper composition of business logic layer with data layer.

When to apply: When reviewing activity/fragment structure, ViewModel implementations, repository patterns, or overall application architecture.

2. Kotlin & Java Code Quality

Assess adherence to Kotlin conventions and best practices. Review nullability handling, proper extension function usage, scope function appropriateness, sealed class/data class patterns, and coroutine usage. Identify anti-patterns like unnecessary null checks, improper lifecycle awareness, or incorrect coroutine scope usage. Evaluate naming conventions, code clarity, and idiomatic expressions.

When to apply: When reviewing core business logic, utility functions, or general code structure.

3. Compose UI Implementation

Review Compose UI code for recomposition efficiency, proper state management (remember vs ViewModel state), and correct side effect handling. Evaluate LazyList/LazyColumn optimization, composition lambda performance, remember key usage, and proper Modifier application. Check for unnecessary recompositions, memory leaks from state retention, and performance anti-patterns.

When to apply: When reviewing UI layer implementation, recomposable functions, and state management in UI code.

4. Testing & Test Coverage

Validate unit test quality using MockK, including proper mock configuration, verify block semantics, and argument matching. Review integration test approach, test organization, test naming conventions, and assertion clarity. Assess test independence and isolation. Check for appropriate use of fixtures vs factories.

When to apply: When reviewing test files, evaluating test coverage, or assessing testing strategy.

5. Security & Data Protection

Identify security vulnerabilities in data handling, API communication, and sensitive information storage. Review encryption implementation, secure storage patterns, authentication/authorization mechanisms, and compliance considerations. Validate protection against common attacks (SQL injection, data leaks, insecure deserialization).

When to apply: When handling sensitive data, API integration, or security-related code.

6. Performance & Memory

Detect potential memory leaks, inefficient data structures, excessive object allocation, and performance bottlenecks. Review bitmap handling, image loading, database query optimization, network request patterns, and UI rendering efficiency. Check for memory leaks from lifecycle-unaware references.

When to apply: When reviewing resource-intensive operations, list rendering, or performance-critical code.

Review Process Workflow

  1. Context Understanding: Identify code purpose, scope, component type (Activity, ViewModel, Repository, Composable), and dependencies
  2. Systematic Dimension Analysis: Apply all relevant review dimensions methodically
  3. Issue Categorization: Classify findings by severity and attach specific line references
  4. Structured Documentation: Present findings with clear examples and improvement suggestions
  5. Actionable Recommendations: Provide concrete code improvements and reference relevant documentation

Feedback Structure

For each finding, provide:

  • Category: Architecture, Code Quality, Compose, Testing, Security, or Performance
  • Severity: Critical (breaks functionality/security), High (significant improvement needed), Medium (good-to-improve), Low (nice-to-have)
  • Location: File path and specific line numbers
  • Issue Description: Clear, specific explanation of the problem
  • Recommendation: Concrete improvement with code example
  • Reference: Links to official Android documentation, Compose guidelines, or best practices

Reference Materials

  • references/compose-patterns.md - Compose UI best practices and performance patterns
  • references/kotlin-standards.md - Kotlin coding conventions and idioms
  • references/mvvm-architecture.md - MVVM architecture patterns and ViewModel best practices
  • references/testing-patterns.md - Testing strategies with MockK and unit testing approaches
  • references/security-checklist.md - Security considerations and data protection patterns

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.