copilot.md
.codex/skills/compose-kotlin-agent-skills/agents/copilot.md
1# GitHub Copilot Setup23## Install45```bash6cd your-android-project7git clone https://github.com/haidrrrry/compose-kotlin-agent-skills.git .github/skills/compose-kotlin-agent-skills8```910## .github/copilot-instructions.md Integration1112Add to `.github/copilot-instructions.md`:1314```markdown15## Android/Kotlin Engineering1617For all Kotlin and Jetpack Compose code, follow the patterns in18`.github/skills/compose-kotlin-agent-skills/SKILL.md`.1920Critical rules:21- ViewModel owns state via MutableStateFlow, not mutableStateOf22- Composables collect state with collectAsStateWithLifecycle23- Pass lambdas to composables, never ViewModels24- Modifier order matters: padding → clip → background → clickable25- LazyColumn always needs key parameter26- Use Room Flow queries for reactive data27- Use combine() for derived/filtered state in ViewModel2829For specific topics, read the matching file from30`.github/skills/compose-kotlin-agent-skills/references/`.31```3233## Copilot Chat Usage3435In Copilot Chat, reference the skill:3637```38@workspace How should I structure my ViewModel? Follow the compose-kotlin-agent-skills patterns.39```4041## Verification4243Ask Copilot: "Set up a Room DAO with Flow queries following the compose-kotlin-agent-skills."4445Should produce `@Dao` interface with `Flow<List<T>>` return type, `suspend` for writes, `@Query` annotations.46