Airsc miễn phí cho tất cả. Nếu nó giúp bạn, hãy ủng hộ $2–$20.

Ủng hộ
SkillAn toànLàm web & appCần cài đặt chút

compose-kotlin-agent-skills

haidrrrry · haidrrrry/compose-kotlin-agent-skills

Bộ kỹ năng này dạy các tác nhân mã hóa AI tạo ra mã Jetpack Compose và Kotlin chính xác, chất lượng cao cho ứng dụng Android và đa nền tảng.

Jetpack Compose & Kotlin AI agent skills for Cursor, Claude Code, Codex, Gemini & 27+ agents. Strict MVI · Kotlin 2.x K2 · Compose 2026 · CI-validated.

56 sao8Giấy phép: MITCập nhật 3 tháng trước0 lượt mở

Xem trước

▍

Bạn có thể làm gì với nó

  • Tạo các thành phần UI Jetpack Compose chất lượng cao cho ứng dụng Android.
  • Xây dựng mã Kotlin Multiplatform Mobile (KMM) chính xác theo các mẫu MVI.
  • Tự động sửa các lỗi mã hóa Kotlin/Compose phổ biến như tình trạng tranh chấp hoặc rò rỉ.

Kiểm tra an toàn

An toàn

Không thấy dấu hiệu rủi ro trong các file đã quét.

Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.

Trích từ README

compose-kotlin-agent-skills

Make your AI coding agent actually understand Jetpack Compose & Kotlin — on Android, Kotlin Multiplatform, and Compose Multiplatform. Strict MVI · Kotlin 2.x K2 · Compose 2026 · CI-validated · 27 agents supported.


Quick install

AgentCommand
Cursorgit clone https://github.com/haidrrrry/compose-kotlin-agent-skills.git .cursor/skills/compose-kotlin-agent-skills
Claude Codegit clone https://github.com/haidrrrry/compose-kotlin-agent-skills.git ~/.claude/skills/compose-kotlin-agent-skills
Codex CLIgit clone https://github.com/haidrrrry/compose-kotlin-agent-skills.git → add block to root AGENTS.md (guide)
Gemini CLIgit clone https://github.com/haidrrrry/compose-kotlin-agent-skills.git → add block to GEMINI.md (guide)
GitHub Copilotgit clone https://github.com/haidrrrry/compose-kotlin-agent-skills.git .github/skills/compose-kotlin-agent-skills (guide)

Per-agent details → Setup · All 27 agents → agents/README.md

The problem

AI coding agents generate Kotlin/Compose code that compiles but gets the details wrong:

  • _state.value = … instead of atomic _state.update { } — race conditions
  • collectAsState() instead of collectAsStateWithLifecycle() — battery drain
  • Hardcoded UI strings instead of stringResource(R.string.…) — broken localisation
  • LazyColumn without key + contentType — broken scroll, recomposition storms
  • GlobalScope.launch { } inside ViewModels — leaks
  • mutableStateListOf in ViewModel — survives config change wrong

This skill kit fixes that by giving your AI agent:

  1. A primary SKILL.md with the 2026 toolchain, strict MVI guardrails, and a dedicated banned-antipatterns reference.
  2. 3 modular sub-skills (architecture, Compose, testing) loaded on demand — Compose sub-skill includes REVIEW MODE for screen audits.
  3. 20 reference modules (00–19) covering every major Android/Kotlin topic.
  4. 27 per-agent install guides so Cursor, Claude Code, Codex, Copilot, Gemini, etc. each load it correctly.
  5. CI-validated — every SKILL.md is frontmatter-linted, link-checked, and registered in api/skills.lock on every push.

What this is NOT

Wrong guessReality
Android library / Gradle dependencyNo — nothing to implementation(...). Pure markdown.
Alexa / Bixby / voice-assistant "skill"No — not a voice platform. The word "skill" here = agentskills.io format.
On-device LLM runtime / tool-calling SDKNo — no model inference, no agent framework.
Compose UI library (coachmarks, theming, charts)No — we don't ship Composables; we teach how to write them.
Backend or REST APINo — markdown files plus a Python validator.

TL;DR: clone this repo into your agent's skills folder. The agent reads it before writing Kotlin. That's it.


What changes when you install it

AreaWithout the skillWith the skill
ViewModel state_state.value = ... (race conditions)Atomic _state.update { it.copy(...) }
Flow collectioncollectAsState() (drains battery in background)collectAsStateWithLifecycle()
UI textHardcoded "Login" literalsstringResource(R.string.login)
ListsLazyColumn with no keyStable key + contentType per item
ArchitectureMixed MVVM / state in ComposableStrict MVI — UiState + UiEvent + UiEffect
DIcompanion object Singleton@HiltViewModel + constructor injection
NavigationString routes (deprecated)Navigation 3 type-safe NavKey routes
CoroutinesGlobalScope.launch { }viewModelScope + structured concurrency
Compose perfUnstable params → constant recomposition@Stable / @Immutable + deferred reads
Edge-to-edgeStatus bar overlaps contentenableEdgeToEdge() + correct insets
VersionsMade up / outdatedPinned to 2026 stable releases

Platforms

Supported
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 compatibility27 install guides (see agents/README.md)
Languages taughtKotlin 2.x (K2 compiler)
Tooling enforcedAGP 9, Compose BOM 2026, Navigation 3

Skill catalog

SkillWhen the agent loads it
SKILL.md (root)Any Android / Kotlin / Compose work — toolchain, MVI guardrails, banned antipatterns
skills/android-kotlin-architecture/SKILL.mdClean Architecture, MVVM/MVI, modules, UseCases, UiState / UiEvent / UiEffect
skills/android-kotlin-compose/SKILL.mdJetpack Compose UI, recomposition, Material 3, edge-to-edge, REVIEW MODE audits
skills/android-kotlin-testing/SKILL.mdViewModel tests, Compose UI tests, Hilt fakes, Turbine

Full routing index → AGENTS.md


What's covered

TopicReferenceWhat the agent learns
Banned antipatternsreferences/00-banned-antipatterns.mdMaster WRONG/RIGHT lookup — load first for reviews
Architecturereferences/01-architecture.mdClean Arch, MVVM, MVI, module structure
Compose UIreferences/02-compose-ui.mdComposition, stability, Modifier order, theming
Animationsreferences/03-animations.mdSprings, Canvas, gestures, shared el
Xem mã nguồn trên GitHub