본문으로 건너뛰기
cccskills
무료GitHub에 공개

android

Provides expert knowledge for building modern native Android apps using Kotlin, Jetpack Compose, Material Design 3, MVI architecture, Hilt dependency injection, and Media3/ExoPlayer.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md5.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Android + Kotlin (Jetpack Compose & Media3)

This playbook defines the architecture, UI design system, performance guidelines, and testing strategy for native Android applications.

android-ui-design owns specialized Jetpack Compose phone UI/UX design, implementation, review, and audit guidance. This skill remains the general guide for architecture, Hilt dependency injection, Media3, performance, and testing.


1. Lead Architect & Modularization

Architecture (MVI / MVVM with Clean Architecture)

  • Prefer MVI (Model-View-Intent) for state management. Ensure a strict unidirectional data flow:
    • UiState: Single source of truth for the UI state.
    • UiIntent: Actions initiated by the user or system.
    • UiEffect: One-time events (navigation, toasts, snackbars).
  • Separate the project into clean logical modules:
    • app: Application entry point, launcher activity, global dependency injection configuration.
    • core: Shared resources, network layer, media playback logic (ExoPlayer/Media3), storage.
    • feature: Individual business features (isolated and independent of other features).

Dependency Injection (Hilt)

  • Annotate the Application class with @HiltAndroidApp.
  • Annotate Activities and Fragments with @AndroidEntryPoint.
  • Use constructor injection for ViewModels with @HiltViewModel.

2. Jetpack Compose UI/UX

Recomposition & State Management

  • Consume StateFlow from ViewModels safely using collectAsStateWithLifecycle() to respect the activity lifecycle.
  • Keep data models immutable. Mark configuration classes with @Immutable or @Stable to prevent redundant recompositions.
  • Use contentType and key in LazyColumn and LazyRow to optimize item recycling and rendering performance.
  • Avoid fixed hardcoded margins. Apply WindowInsets to support modern edge-to-edge screens.

3. Performance & Multimedia (Media3 / ExoPlayer)

Playback & Services

  • Run ExoPlayer / Media3 inside a robust Foreground Service (using MediaSessionService) to ensure playback continues when the app is in the background.
  • Clean up resources: release player instances in onDestroy or when the service is stopped.
  • Control wake locks strictly to avoid draining the user's battery when playback is paused.

Kotlin Coroutines & Threading

  • Always inject CoroutineDispatcher instances instead of hardcoding them:
    • Dispatchers.IO: Database access, network operations, file reading.
    • Dispatchers.Default: CPU-intensive operations (parsing JSON, filtering large lists).
    • Dispatchers.Main: UI modifications and light interactions.

R8 & Resource Optimization

  • Enable shrinking and obfuscation in production builds:
    • isMinifyEnabled = true
    • isShrinkResources = true
  • Convert all static images to the modern WebP format to minimize the application binary size.

4. Quality Assurance & Automated Testing

Unit Testing

  • Use JUnit 5 and MockK for mocking dependencies.
  • Test ViewModels and Reducers by asserting StateFlow updates. Use Turbine to easily test Kotlin Flows.
  • Mock all multimedia/ExoPlayer components to avoid loading actual audio/video resources in unit tests.

UI Testing

  • Create UI tests using Compose test rules: createComposeRule() or createAndroidComposeRule<MainActivity>().
  • Assert correct rendering, visibility states, and user interactions without executing real network calls.

5. Key Gradle & ADB Commands

Use these commands for building, checking code style, running tests, and profiling performance:

CommandAction
./gradlew initInitialize a new Gradle project structure.
./gradlew app:dependenciesList all dependencies of the application module.
./gradlew assembleDebugValidate compilation and generate debug APK.
./gradlew ktlintCheckRun KtLint check to enforce Kotlin style guidelines.
./gradlew lintDebugRun Android Lint tool to inspect code quality and UI issues.
./gradlew testDebugUnitTestRun unit tests for debug build variant.
./gradlew connectedAndroidTestRun instrumented UI tests on connected emulator or device.
./gradlew assembleReleaseGenerate release build variant with R8 optimizations.
adb shell dumpsys batterystatsProfile system battery consumption metrics.
adb shell am dumpheap <package> heap.hprofDump application heap memory file for profiling.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use when adding monitoring, metrics, logging, or tracing to Spring AI or LLM integration code. Covers token tracking, latency measurement, cost estimation, and prompt/response logging. Use when user mentions AI monitoring, token costs, or LLM observability.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

lgzarturo/springboot-course32026년 10월 17일 업데이트

Design, implement, review, and audit Android Jetpack Compose UI/UX for phone interfaces. Use when a request concerns concrete Compose layout, components, interaction, accessibility, or visual behavior. Do not activate for framework or dependency presence alone; non-UI Android work is excluded.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

lgzarturo/springboot-course32026년 10월 17일 업데이트

Provides expert knowledge for designing, implementing, and managing REST API versioning strategies with deprecation workflows.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

lgzarturo/springboot-course32026년 10월 17일 업데이트

astro

무료

Provides expert knowledge for building Astro 5+ sites with Islands Architecture, Content Collections, TypeScript, and performance-first rendering strategies.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

lgzarturo/springboot-course32026년 10월 17일 업데이트

Audits token storage mechanisms to prevent XSS-based JWT theft.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

lgzarturo/springboot-course32026년 10월 17일 업데이트

Provides patterns to configure AWS RDS (Aurora, MySQL, PostgreSQL) with Spring Boot applications. Configures HikariCP connection pools, implements read/write splitting, sets up IAM database authentication, enables SSL connections, and integrates with AWS Secrets Manager. Use when setting up RDS connections in Spring Boot, configuring connection pooling, or managing database credentials securely.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

lgzarturo/springboot-course32026년 10월 17일 업데이트

lgzarturo의 스킬 모두 보기

이 스킬의 문제 신고