android-expert
БесплатноЗапускает вложенные скриптыНе проверенComprehensive Android development expert covering Jetpack Compose, Kotlin coroutines/Flow, Architecture Components, Hilt DI, Navigation, testing, performance…
от oimiragieo★ 48 звёзд на GitHubОб этом скилле
Android Expert
1. Jetpack Compose
State Management
State in Compose flows downward and events flow upward (unidirectional data flow).
State hoisting pattern:
// Stateless composable — accepts state and callbacks
@Composable
fun LoginForm(
email: String,
password: String,
onEmailChange: (String) -> Unit,
onPasswordChange: (String) -> Unit,
onSubmit: () -> Unit,
) {
Column {
TextField(value = email, onValueChange = onEmailChange, label = { Text("Email") })
TextField(value = password, onValueChange = onPasswordChange, label = { Text("Password") })
Button(onClick = onSubmit) { Text("Log in") }
}
}
// Stateful caller — owns state and passes it down
@Composable
fun LoginScreen(viewModel: LoginViewModel = hiltViewModel()) {
val state by viewModel.uiState.collectAsStateWithLifecycle()
LoginForm(
email = state.email,
password = state.password,
onEmailChange = viewModel::onEmailChanged,
onPasswordChange = viewModel::onPasswordChanged,
onSubmit = viewModel::onSubmit,
)
}
remember vs rememberSaveable:
remember: Survives recomposition only. Use for transient UI state.rememberSaveable: Survives recomposition AND process death (saved to Bundle). Use for user-visible state (scroll position, form input).
// remember — lost on configuration change / process death
var expanded by remember { mutableStateOf(false) }
// rememberSaveable — survives configuration change and process death
var selectedTab by rememberSaveable { mutableIntStateOf(0) }
derivedStateOf: Use when derived state depends on other state objects and you want to
avoid unnecessary recompositions.
val isSubmitEnabled by remember {
derivedStateOf { email.isNotBlank() && password.length >= 8 }
}
Side Effects
Use structured side effect APIs — never launch coroutines or perform side effects in composition.
| API | When to use |
|---|---|
LaunchedEffect(key) |
Launch a coroutine tied to a key; cancels/relaunches when key changes |
rememberCoroutineScope() |
Get a scope for event-driven coroutines (button click, etc.) |
SideEffect |
Run non-suspend side effects after every successful composition |
DisposableEffect(key) |
Side effects with cleanup (register/unregister callbacks) |
// Navigate to destination after login success
LaunchedEffect(uiState.isLoggedIn) {
if (uiState.isLoggedIn) navController.navigate(Route.Home)
}
// Scope for click-driven coroutine
val scope = rememberCoroutineScope()
Button(onClick = { scope.launch { /* ... */ } }) { Text("Save") }
// Register/unregister a callback
DisposableEffect(lifecycleOwner) {
val observer = LifecycleEventObserver { _, event -> /* ... */ }
lifecycleOwner.lifecycle.addObserver(observer)
onDispose { lifecycleOwner.lifecycle.removeObserver(observer) }
}
Recomposition Optimization
Recomposition is the main performance concern in Compose. Minimize its scope.
// AVOID: Unstable lambda captures the entire parent scope
@Composable
fun ItemList(items: List<Item>, onItemClick: (Item) -> Unit) {
LazyColumn {
items(items, key = { it.id }) { item ->
// New lambda instance created on each recomposition of ItemList
ItemRow(item = item, onClick = { onItemClick(item) })
}
}
}
// PREFER: Stable k
Установить android-expert в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditBashGrepGlobВложенные файлы
FAQ
Что делает скилл android-expert?
Comprehensive Android development expert covering Jetpack Compose, Kotlin coroutines/Flow, Architecture Components, Hilt DI, Navigation, testing, performance, Material Design 3, and modern Android patterns (MVI, Clean Architecture).
Как установить скилл android-expert?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл android-expert запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic