00-andruia-consultant
Usar al iniciar o mejorar un proyecto de IA: diagnostica código y restricciones, propone skills existentes y redacta tareas y un…
Expert guidance for building modern Android UIs with Jetpack Compose, covering state management, navigation, performance, and Material Design 3.
Claude Code
$ npx -y skills add sickn33/agentic-awesome-skills --skill android-jetpack-compose-expert --agent claude-code
Codex
$ npx skills add sickn33/agentic-awesome-skills --skill android-jetpack-compose-expert -a codex -y
Cursor
$ npx skills add sickn33/agentic-awesome-skills --skill android-jetpack-compose-expert -a cursor -y
Gemini CLI
$ npx skills add sickn33/agentic-awesome-skills --skill android-jetpack-compose-expert -a gemini-cli -y
GitHub Copilot
$ npx skills add sickn33/agentic-awesome-skills --skill android-jetpack-compose-expert -a github-copilot -y
OpenCode
$ npx skills add sickn33/agentic-awesome-skills --skill android-jetpack-compose-expert -a opencode -y
Windsurf
$ npx skills add sickn33/agentic-awesome-skills --skill android-jetpack-compose-expert -a windsurf -y
name: android-jetpack-compose-expert description: "Expert guidance for building modern Android UIs with Jetpack Compose, covering state management, navigation, performance, and Material Design 3." risk: safe source: community date_added: "2026-02-27"
A comprehensive guide for building production-quality Android applications using Jetpack Compose. This skill covers architectural patterns, state management with ViewModels, navigation type-safety, and performance optimization techniques.
Ensure your `libs.versions.toml` includes the necessary Compose BOM and libraries.
[versions]
composeBom = "2024.02.01"
activityCompose = "1.8.2"
[libraries]
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
androidx-ui = { group = "androidx.compose.ui", name = "ui" }
androidx-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" }
androidx-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
androidx-material3 = { group = "androidx.compose.material3", name = "material3" }
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }Use `ViewModel` with `StateFlow` to expose UI state. Avoid exposing `MutableStateFlow`.
// UI State Definition
data class UserUiState(
val isLoading: Boolean = false,
val user: User? = null,
val error: String? = null
)
// ViewModel
class UserViewModel @Inject constructor(
private val userRepository: UserRepository
) : ViewModel() {
private val _uiState = MutableStateFlow(UserUiState())
val uiState: StateFlow<UserUiState> = _uiState.asStateFlow()
fun loadUser() {
viewModelScope.launch {
_uiState.update { it.copy(isLoading = true, error = null) }
try {
val user = userRepository.getUser()
_uiState.update { it.copy(user = user, isLoading = false) }
} catch (e: kotlinx.coroutines.CancellationException) {
throw e
} catch (e: Exception) {
_uiState.update { it.copy(error = e.message, isLoading = false) }
}
}
}
}Consume the state in a "Screen" composable and pass data down to stateless components.
@Composable
fun UserScreen(
viewModel: UserViewModel = hiltViewModel()
) {
val uiState by viewModel.uiState.collectAsStateWithLifecycle()
UserContent(
uiState = uiState,
onRetry = viewModel::loadUser
)
}
@Composable
fun UserContent(
uiState: UserUiState,
onRetry: () -> Unit
) {
Scaffold { padding ->
Box(modifier = Modifier.padding(padding)) {
when {
uiState.isLoading -> CircularProgressIndicator()
uiState.error != null -> ErrorView(uiState.error, onRetry)
uiState.user != null -> UserProfile(uiState.user)
}
}
}
}The dependency versions above are historical examples, not a current recommended stack. Type-safe navigation additionally needs compatible Navigation Compose and Kotlin serialization plugin/dependency; lifecycle collection and Hilt need their own dependencies/imports/setup. Fragments require project User/Repository/View components. Trigger initial loading deliberately (for example in ViewModel init or a keyed effect); onRetry alone does not load the first user. Avoid overlapping load jobs and exposing raw server exception messages in UI.
Using the new Navigation Compose Type Safety (available in recent versions).
// Define Destinations
@Serializable
object Home
@Serializable
data class Profile(val userId: String)
// Setup NavHost
@Composable
fun AppNavHost(navController: NavHostController) {
NavHost(navController, startDestination = Home) {
composable<Home> {
HomeScreen(onNavigateToProfile = { id ->
navController.navigate(Profile(userId = id))
})
}
composable<Profile> { backStackEntry ->
val profile: Profile = backStackEntry.toRoute()
ProfileScreen(userId = profile.userId)
}
}
}**Problem:** Infinite Recomposition loop. **Solution:** New object allocation alone is not an infinite loop. Check for a feedback cycle updating observed state inside the composition phase instead of a side-effect or callback. Use Layout Inspector to debug recomposition counts.
Find reusable instructions for your project, inspect their complete files, and keep an exact skill set you can review and reuse.
Usar al iniciar o mejorar un proyecto de IA: diagnostica código y restricciones, propone skills existentes y redacta tareas y un…
Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and…
Usar para crear o mejorar una skill de Andru.ia: define entradas y resultados, redacta SKILL.md con ejemplos y límites, valida la…
Usar tras definir el sector de un proyecto: prepara un dossier en español con contexto, normas aplicables, patrones UX y riesgos,…
AI-powered presentation generation via the 2slides API — create slides from text, match a reference image style, summarize…
360 feedback register: reviewer, subject, review cycle, visibility, due date and score, as CSV, SQL, JSON Schema or Notion on…
Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…
Create a new Architecture Decision Record with sequential numbering and AgentDB registration