Agent skill
kotlin-android
Modern Android development - Jetpack, Compose, Architecture Components
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/kotlin-android
SKILL.md
Kotlin Android Skill
Production-ready Android development with Jetpack libraries.
Topics Covered
MVVM Pattern
@HiltViewModel
class UserViewModel @Inject constructor(
private val repository: UserRepository
) : ViewModel() {
private val _uiState = MutableStateFlow(UiState())
val uiState = _uiState.asStateFlow()
fun load() = viewModelScope.launch {
_uiState.update { it.copy(isLoading = true) }
repository.getUsers()
.onSuccess { users -> _uiState.update { it.copy(users = users, isLoading = false) } }
}
}
Compose UI
@Composable
fun UserScreen(viewModel: UserViewModel = hiltViewModel()) {
val state by viewModel.uiState.collectAsStateWithLifecycle()
UserContent(state)
}
Type-Safe Navigation
@Serializable
data class ProfileRoute(val userId: String)
composable<ProfileRoute> { entry ->
val route: ProfileRoute = entry.toRoute()
}
Troubleshooting
| Issue | Resolution |
|---|---|
| Recomposition loop | Mark class @Stable or use derivedStateOf |
| ViewModel recreated | Use hiltViewModel() not viewModel() |
Usage
Skill("kotlin-android")
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?