/ 디렉터리 / 플레이그라운드 / jetpack-compose-skills
● 커뮤니티 anhvt52 ⚡ 바로 사용

jetpack-compose-skills

제작: anhvt52 · anhvt52/jetpack-compose-skills

Make Claude an Android Compose dev — idiomatic @Composable, state hoisting, Material 3, proper previews.

jetpack-compose-skills encodes modern Android development patterns for Jetpack Compose: state hoisting, @Composable scoping, Modifier order rules, Material 3 theming, ViewModel + StateFlow wiring, navigation-compose, and Compose-compliant testing. Good for both greenfield Compose projects and migrating Views-based screens.

왜 쓰나요

핵심 기능

라이브 데모

실제 사용 모습

jetpack-compose-skill.replay ▶ 준비됨
0/0

설치

작성자 저장소 · Claude Skills 공식 문서

사용 사례

실전 활용법: jetpack-compose-skills

How to build a new Compose screen with state hoisting

👤 Android developers writing Compose UI ⏱ ~30 min intermediate

언제 쓸까: New screen in a Compose app — get it right the first time rather than refactoring later.

흐름
  1. Describe the screen
    Build a Profile screen: avatar, name, bio, follow button. State comes from a ProfileViewModel.✓ 복사됨
    → Stateless composable + stateful wrapper + preview
  2. Wire the ViewModel
    Hook up the ViewModel using collectAsStateWithLifecycle.✓ 복사됨
    → Lifecycle-aware state collection
  3. Add a preview
    Add @Preview variants for empty, loaded, and error states.✓ 복사됨
    → Three previews rendering without a live ViewModel

결과: A clean Compose screen with previews and a testable structure.

함정
  • Stateful composables you can't preview — Keep the composable stateless; hoist state to a wrapper
  • Wrong Modifier order — Skill prompts the order rule — padding before background for a padded background, etc.
함께 쓰기: filesystem

Migrate a Views-based screen to Compose

👤 Teams converting legacy Android screens ⏱ ~90 min advanced

언제 쓸까: You want to convert one screen at a time without rewriting the whole app.

흐름
  1. Map the XML
    Here's fragment_profile.xml. Map each widget to a Compose equivalent with notes on behaviors to preserve.✓ 복사됨
    → XML → Compose mapping with behavior notes
  2. Rewrite
    Produce the Compose screen. Keep state + actions identical to the Fragment.✓ 복사됨
    → Composable file + ViewModel untouched
  3. Keep the navigation hybrid if needed
    Swap only this screen, leave the rest on Fragments using ComposeView.✓ 복사됨
    → Hybrid navigation continues to work

결과: One screen cleanly ported without destabilizing the rest.

함정
  • Observer leaks when mixing with Fragment lifecycle — Use viewLifecycleOwner with ComposeView; release on destroy
함께 쓰기: android

조합

다른 MCP와 조합해 10배 효율

jetpack-compose-skill + android

Run the resulting screen in an emulator and iterate

Build the app, launch in the emulator, and show me the Profile screen.✓ 복사됨
jetpack-compose-skill + filesystem

Work across modules in a Compose project

Read feature/profile/ and add a Profile screen in ui/.✓ 복사됨

도구

이 MCP가 노출하는 것

도구입력언제 호출비용
compose-authoring screen intent + state Any new Compose UI 0
state-hoisting-review existing composable When a composable is hard to preview 0
view-to-compose-migration XML + behaviors Screen-by-screen migrations 0

비용 및 제한

운영 비용

API 쿼터
none
호출당 토큰
3–15k per screen
금액
free
팁
Scope to one screen + its ViewModel at a time

보안

권한, 시크릿, 파급범위

자격 증명 저장: none at skill level
데이터 외부 송신: none

문제 해결

자주 발생하는 오류와 해결

Preview fails to render

Make composables stateless; drop the ViewModel from the preview path.

StateFlow not collecting on background

Use collectAsStateWithLifecycle, not collectAsState, on screens that may be backgrounded.

대안

jetpack-compose-skills 다른 것과 비교

대안언제 쓰나단점/장점
apple-hig-designer-skillYou're on iOS SwiftUI instead of Android ComposeDifferent platform
claude-android-skillYou need broader Android help beyond UILess Compose-specific

더 보기

리소스

📖 GitHub에서 공식 README 읽기

🐙 열린 이슈 보기

🔍 400+ MCP 서버 및 Skills 전체 보기