Compose Kotlin Agent Skills logo

Compose Kotlin Agent Skills

Community
haidrrrry
compose-kotlin-agent-skills

Enterprise Android/Kotlin skill for 2026 — Kotlin 2.x K2 compiler, AGP 9, Navigation 3, edge-to-edge Compose, strict MVI with atomic _state.update, banned AI antipatterns. Jetpack Compose, Hilt, Room, KMP, CameraX/ML Kit, performance, testing. Use when writing Kotlin for Android, building Compose UI, MVVM/MVI architecture, debugging recomposition, Room DAOs, Navigation 3, coroutines, or asking "structure Android app", "ViewModel UiState", "collectAsStateWithLifecycle", "edge to edge", "AGP 9", "K2 compiler", "Play Store release".

Overview

Publisherhaidrrrry
Repositorycompose-kotlin-agent-skills
Skill namecompose-kotlin-agent-skills
Stars
63
Forks
8
Bundled files
64
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 64 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by haidrrrry on GitHub. Read the source before you install it.

Installation

Install the Compose Kotlin Agent Skills AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/haidrrrry/compose-kotlin-agent-skills/tree/main
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/haidrrrry/compose-kotlin-agent-skills.git \
  .claude/skills/compose-kotlin-agent-skills
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Compose Kotlin Agent Skills in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Compose Kotlin Agent Skills on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Compose Kotlin Agent Skills is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Android & Kotlin — Enterprise Production Skill (2026)

Authoritative Android engineering kit. Real patterns from AnimatedClockJetpacl, Authenticator, RepLock.

Not an Android library, voice-assistant skill, on-device LLM SDK, or Compose UI library. This is markdown for coding AIs — clone into .cursor/skills/ or .claude/skills/. See README § "What this is NOT".

Meta index: AGENTS.md · CI: python3 scripts/validate_skills.py

Sub-Skills (Modular)

SkillPathScope
Architectureskills/android-kotlin-architecture/SKILL.mdMVI/MVVM, modules, UseCases, UDF
Compose UIskills/android-kotlin-compose/SKILL.mdUI, edge-to-edge, performance, motion
Testingskills/android-kotlin-testing/SKILL.mdTurbine, Compose tests, Hilt fakes

2026 Toolchain — Non-Negotiable

ToolMinimumNotes
Kotlin2.0+ (2.1.x)K2 compiler only — no K1 fallback
AGP9.0+Built-in Kotlin, new DSL defaults
Compose BOM2025.05+Material 3, strong skipping default
Navigation3.x (2.9+ artifact)Type-safe NavKey, @Serializable routes
compileSdk / targetSdk35+Edge-to-edge mandatory
JDK17Required for AGP 9
toml
[versions]
kotlin = "2.1.20"
agp = "9.0.0"
compose-bom = "2025.05.00"
navigation = "2.9.0"
room = "2.7.1"
hilt = "2.56.2"
lifecycle = "2.9.0"
coroutines = "1.10.2"

Kotlin 2.x / K2 Compiler Constraints

  1. Enable K2 — kotlin.compiler.execution.strategy default; use ksp not kapt for Hilt/Room.
  2. Smart casts — prefer when (val x = state) { is Loaded -> ... } over unsafe !!.
  3. Sealed hierarchy — sealed interface UiState + data object Loading : UiState for exhaustive when.
  4. @JvmInline value class for IDs (@JvmInline value class UserId(val raw: String)).
  5. @Immutable / @Stable on UiState and UI models passed to Compose.
  6. Explicit API optional for libraries — kotlin { explicitApi() } in published modules.
  7. No !! except in tests with comment — use requireNotNull / early return.
  8. data class copy for state — never mutate UiState fields in place.
kotlin
sealed interface AccountsUiState {
    data object Loading : AccountsUiState
    data class Ready(
        val accounts: List<AccountUi>,
        val query: String = ""
    ) : AccountsUiState
    data class Error(@StringRes val messageRes: Int) : AccountsUiState
}

MVI Guardrails — Atomic State Only

Allowed mutation: _state.update { it.copy(...) } or _state.update { prev -> ... }.

Banned in ViewModel:

kotlin
// BANNED
_state.value = AccountsUiState(...)           // naked assign
_state.value.accounts.add(item)               // mutating list inside state
mutableStateOf / mutableStateListOf in VM      // Compose scope only
viewModelScope.launch { _state.value = ... }  // use update inside launch

Required pattern:

kotlin
class AccountsViewModel @Inject constructor(
    private val repository: AccountsRepository
) : ViewModel() {

    private val _state = MutableStateFlow<AccountsUiState>(AccountsUiState.Loading)
    val state: StateFlow<AccountsUiState> = _state.asStateFlow()

    private val _effects = Channel<AccountsEffect>(Channel.BUFFERED)
    val effects: Flow<AccountsEffect> = _effects.receiveAsFlow()

    fun onEvent(event: AccountsEvent) {
        when (event) {
            AccountsEvent.Refresh -> refresh()
            is AccountsEvent.QueryChanged -> _state.update { current ->
                when (current) {
                    is AccountsUiState.Ready -> current.copy(query = event.query)
                    else -> current
                }
            }
        }
    }

    private fun refresh() {
        viewModelScope.launch {
            _state.update { AccountsUiState.Loading }
            repository.load()
                .onSuccess { list ->
                    _state.update { AccountsUiState.Ready(accounts = list.map { it.toUi() }) }
                }
                .onFailure {
                    _state.update { AccountsUiState.Error(R.string.error_load_failed) }
                }
        }
    }
}

UI collects:

kotlin
@Composable
fun AccountsRoute(vm: AccountsViewModel = hiltViewModel()) {
    val state by vm.state.collectAsStateWithLifecycle()
    LaunchedEffect(Unit) {
        vm.effects.collect { effect -> /* one-shot: nav, snackbar */ }
    }
    AccountsScreen(state = state, onEvent = vm::onEvent)
}

Navigation 3 + Edge-to-Edge

kotlin
@Serializable data object Home
@Serializable data class Detail(val id: String)

@Composable
fun AppNavHost(navController: NavHostController = rememberNavController()) {
    NavHost(navController, startDestination = Home) {
        composable<Home> { HomeScreen(onOpen = { navController.navigate(Detail(it)) }) }
        composable<Detail> { entry ->
            val route = entry.toRoute<Detail>()
            DetailScreen(id = route.id)
        }
    }
}
  • Routes = @Serializable types, not string paths
  • Pass IDs in nav args — fetch models in destination ViewModel
  • enableEdgeToEdge() in Activity — see compose sub-skill

Deep dive: references/07-navigation.md

Banned Antipatterns — AI Hallucination Lookup

Full table with WRONG/RIGHT pairs and row numbers: references/00-banned-antipatterns.md

Load before reviewing any agent-generated Kotlin. Compose audit checklist: skills/android-kotlin-compose/SKILL.md § REVIEW MODE.

Reference Routing

FileTopic
references/00-banned-antipatterns.mdMaster banned table — load first for reviews
references/01-architecture.mdClean Arch, MVVM, modules
references/02-compose-ui.mdComposition, M3, theming
references/03-animations.mdMotion, Canvas
references/04-coroutines-flow.mdFlow, errors, cancellation
references/05-hilt-di.mdDI, scopes
references/06-room-db.mdRoom, offline-first
references/07-navigation.mdNav 3, deep links
references/08-kmp-cmp.mdKMP, expect/actual
references/09-networking.mdKtor, JWT
references/10-performance.mdRecomposition, Coil, profiles
references/11-testing.mdTurbine, UI tests
references/12-camera-mlkit.mdCameraX, pose
references/13-release-checklist.mdR8, Play Store
references/14-datastore.mdDataStore, SP migration, encryption
references/15-paging3.mdPaging 3, RemoteMediator, asState()
references/16-coil-image.mdCoil 3.4, AsyncImage, cache
references/17-accessibility.mdTalkBack, semantics, WCAG
references/18-gradle-build-logic.mdConvention plugins, KSP, R8, baseline profiles
references/19-xml-to-compose-migration.mdXML → Compose, RxJava → Flow

Platforms

Target (what the docs teach): Android · Kotlin Multiplatform · Compose Multiplatform Host (where the docs are read): macOS · Linux · Windows — anywhere your AI agent runs Agent compatibility: 27 install guides → agents/README.md

Repo: https://github.com/haidrrrry/compose-kotlin-agent-skills

Mandatory Defaults (Summary)

  • Strings: stringResource / @StringRes — zero hardcoded UI text
  • State: ViewModel StateFlow + _state.update { }
  • UI: Stateless composables, modifier first optional param
  • Lists: LazyColumn + keys + contentType
  • DI: @HiltViewModel + constructor inject
  • Tests: Fakes + Turbine — see testing sub-skill

Validation Before PR

bash
python3 scripts/validate_skills.py --strict

Anti-Rationalizations

ExcuseReality
"UiState overkill"data object Loading costs one line
"Keys later"Broken scroll/focus NOW
"Prototype skip repo"Prototypes ship
"collectAsState fine"Background collector drains battery

Examples

PathPatterns
examples/animated-clock/Canvas, rotate(), particles
examples/authenticator/Room Flow, combine, CompositionLocal theme

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

and 4 more files.

Frequently asked questions

What does the Compose Kotlin Agent Skills AI skill do?

Enterprise Android/Kotlin skill for 2026 — Kotlin 2.x K2 compiler, AGP 9, Navigation 3, edge-to-edge Compose, strict MVI with atomic _state.update, banned AI antipatterns. Jetpack Compose, Hilt, Room, KMP, CameraX/ML Kit, performance, testing. Use when writing Kotlin for Android, building Compose UI, MVVM/MVI architecture, debugging recomposition, Room DAOs, Navigation 3, coroutines, or asking "structure Android app", "ViewModel UiState", "collectAsStateWithLifecycle", "edge to edge", "AGP 9", "K2 compiler", "Play Store release".

Why use Compose Kotlin Agent Skills on TypingMind?

Because you install it once and use it with any model. Compose Kotlin Agent Skills is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Compose Kotlin Agent Skills in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/haidrrrry/compose-kotlin-agent-skills/tree/main. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Compose Kotlin Agent Skills?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Compose Kotlin Agent Skills?

As many as you like. As long as a model supports skills, you can use Compose Kotlin Agent Skills with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Compose Kotlin Agent Skills AI skill free?

Yes. It is published on GitHub by haidrrrry under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇