GitHub CopilotKotlinCode Style

Kotlin GitHub Copilot Instructions

GitHub Copilot instructions for Kotlin: Android development, coroutines, and idiomatic Kotlin patterns.

.github/copilot-instructions.md
- Use Kotlin coroutines with viewModelScope for Android ViewModel operations
- Apply Jetpack Compose for all new UI; avoid XML layouts in new features
- Use Kotlin Flow for reactive streams; StateFlow for UI state
- Apply the ViewModel + Repository pattern with Hilt dependency injection
- Generate KDoc comments for all public functions in library modules
- Use Kotlin Multiplatform for shared business logic between Android and iOS
- Apply Result<T> type for operations that can fail; avoid throwing exceptions
- Generate unit tests with JUnit5 and MockK; use kotest for assertions

How to use with GitHub Copilot

Create `.github/copilot-instructions.md` in your repository. GitHub Copilot uses these to customize suggestions across your whole repo.

#kotlin#android#compose#copilot#github#coding-rules

Related Rules