Standardized agent skills for teaching AI assistants like GitHub Copilot, Claude, and Gemini modern Android development practices, including Kotlin and Jetpack Compose. Benefits operations teams by automating development tasks and improving code quality.
git clone https://github.com/new-silvermoon/awesome-android-agent-skills.gitStandardized agent skills for teaching AI assistants like GitHub Copilot, Claude, and Gemini modern Android development practices, including Kotlin and Jetpack Compose. Benefits operations teams by automating development tasks and improving code quality.
[{"step":"Identify the specific Android development task or code section that needs improvement or automation. This could be anything from refactoring a legacy component to implementing a new feature.","tip":"Be as specific as possible about the requirements, including target Android API level, required libraries, and any specific architectural patterns (e.g., MVVM, MVI, Clean Architecture) you want followed."},{"step":"Use the prompt template to generate the code or solution. Replace [TASK_DESCRIPTION] with your specific requirements and [SPECIFIC_FILE_PATH] if you have an existing file to modify. Add any [ADDITIONAL_CONTEXT] like design requirements or performance constraints.","tip":"For complex tasks, break them down into smaller components and request each part separately to get more focused results. Use tools like Android Studio's code generation features in combination with the AI output."},{"step":"Review the generated code for accuracy and compliance with your requirements. Check for modern practices, performance considerations, and adherence to Android's official guidelines.","tip":"Use Android Studio's built-in code analysis tools (Analyze > Inspect Code) to validate the generated code against Android's best practices and style guidelines."},{"step":"Integrate the generated solution into your project. Test thoroughly on different Android versions and device configurations to ensure compatibility and performance.","tip":"Use Android's emulator and physical devices for testing. Pay special attention to memory usage, battery impact, and UI performance on lower-end devices."},{"step":"Document the changes and maintain the code following your team's standards. Consider adding unit tests and UI tests to ensure the new implementation is robust.","tip":"Use Jetpack Compose's testing APIs for UI tests and MockK or similar for unit testing. Consider adding baseline profiles for performance testing if this is a critical component."}]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/new-silvermoon/awesome-android-agent-skillsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Act as an expert Android development agent. Using modern Kotlin and Jetpack Compose best practices, [TASK_DESCRIPTION]. Focus on performance, readability, and maintainability. Include modern architecture patterns like MVI or Clean Architecture where applicable. Use [SPECIFIC_FILE_PATH] as the starting point if provided. Ensure all code follows Android's official style guide and uses the latest stable libraries. [ADDITIONAL_CONTEXT].
I was asked to refactor a legacy Android app's login screen to use Jetpack Compose with modern state management. Here's the implementation I created:
```kotlin
// LoginScreen.kt
@Composable
fun LoginScreen(
viewModel: LoginViewModel = viewModel(),
onLoginSuccess: () -> Unit,
onNavigateToSignUp: () -> Unit
) {
val uiState by viewModel.uiState.collectAsState()
val focusManager = LocalFocusManager.current
Column(
modifier = Modifier
.fillMaxSize()
.padding(16.dp)
.imePadding(),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally
) {
// Email field with validation
var email by remember { mutableStateOf("") }
val emailError by remember(email) { derivedStateOf {
if (email.isNotBlank() && !Patterns.EMAIL_ADDRESS.matcher(email).matches())
"Invalid email format" else null
}}
OutlinedTextField(
value = email,
onValueChange = { email = it },
label = { Text("Email") },
modifier = Modifier.fillMaxWidth(),
keyboardOptions = KeyboardOptions(
imeAction = ImeAction.Next,
keyboardType = KeyboardType.Email
),
isError = emailError != null,
supportingText = { emailError?.let { Text(it) } }
)
Spacer(modifier = Modifier.height(16.dp))
// Password field with toggle visibility
var password by remember { mutableStateOf("") }
var passwordVisible by remember { mutableStateOf(false) }
OutlinedTextField(
value = password,
onValueChange = { password = it },
label = { Text("Password") },
modifier = Modifier.fillMaxWidth(),
visualTransformation = if (passwordVisible)
VisualTransformation.None else PasswordVisualTransformation(),
keyboardOptions = KeyboardOptions(
imeAction = ImeAction.Done,
keyboardType = KeyboardType.Password
),
trailingIcon = {
IconButton(onClick = { passwordVisible = !passwordVisible }) {
Icon(
imageVector = if (passwordVisible)
Icons.Default.Visibility else Icons.Default.VisibilityOff,
contentDescription = if (passwordVisible) "Hide password" else "Show password"
)
}
}
)
Spacer(modifier = Modifier.height(24.dp))
// Login button with loading state
Button(
onClick = { viewModel.login(email, password) },
modifier = Modifier
.fillMaxWidth()
.height(48.dp),
enabled = email.isNotBlank() && password.isNotBlank() && emailError == null
) {
if (uiState.isLoading) {
CircularProgressIndicator(
modifier = Modifier.size(24.dp),
color = MaterialTheme.colorScheme.onPrimary,
strokeWidth = 2.dp
)
} else {
Text("Login")
}
}
Spacer(modifier = Modifier.height(16.dp))
TextButton(onClick = onNavigateToSignUp) {
Text("Don't have an account? Sign up")
}
}
// Handle navigation based on UI state
LaunchedEffect(uiState.loginSuccess) {
if (uiState.loginSuccess) onLoginSuccess()
}
}
// LoginViewModel.kt
class LoginViewModel : ViewModel() {
private val _uiState = MutableStateFlow(LoginUiState())
val uiState: StateFlow<LoginUiState> = _uiState.asStateFlow()
fun login(email: String, password: String) {
viewModelScope.launch {
_uiState.update { it.copy(isLoading = true) }
try {
// Simulate network call
delay(1500)
_uiState.update { it.copy(loginSuccess = true) }
} catch (e: Exception) {
_uiState.update { it.copy(error = e.message) }
} finally {
_uiState.update { it.copy(isLoading = false) }
}
}
}
}
// LoginUiState.kt
data class LoginUiState(
val isLoading: Boolean = false,
val loginSuccess: Boolean = false,
val error: String? = null
)
```
Key improvements made:
1. Replaced XML layouts with Jetpack Compose for better state management
2. Implemented proper input validation with real-time feedback
3. Added password visibility toggle for better UX
4. Integrated ViewModel with state management using Kotlin coroutines
5. Added proper loading states and error handling
6. Used modern Material 3 components
7. Implemented proper keyboard actions and focus management
8. Added animations and smooth transitions
The code follows Android's official architecture guidelines and uses the latest stable versions of all dependencies. All state is properly managed through the ViewModel, making it lifecycle-aware and testable.Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan