[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74FTSN2YEVXZPSSQB0K975S":3,"skill-same:01M74FTSN2YEVXZPSSQB0K975S":65},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":13,"repositoryHtmlUrl":25,"repositoryHomepageUrl":6,"ownerHtmlUrl":26,"ownerBlogUrl":6,"ownerDescription":27,"updatedAt":28,"install":29,"resources":42},"01M74FTSN2YEVXZPSSQB0K975S","kmp-multiplatform-specialist",null,"Astrumon\u002Fspovishun-skills","Astrumon","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F67917191?v=4","01M74FSGPFMM3XWY2PMSEN8Z2W","Danylo Bidnyk","01M74FSGQ12JX4QM4FEY6NEH6N",0,"MIT","https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkmp-multiplatform-specialist\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"# KMP Multiplatform Specialist Skill\n\nThe build and platform layer of a Kotlin Multiplatform \u002F Compose Multiplatform project: source sets,\n`expect`\u002F`actual`, targets, the KMP Gradle DSL, Compose Resources, and per-platform engines.\n\nArchitecture, layering and the MVI contract live in `.claude\u002Frules\u002Fkmp\u002Farchitecture.md` — this skill\nimplements against those rules, it does not restate them. That rule is deliberately free of Kotlin;\nthe code it describes is here:\n\n| If you need… | Read |\n|---|---|\n| The `MviViewModel` base class, a screen written against it, the typed-error `load()` helper, the `composeCompiler { }` and `stability.txt` wiring | `references\u002Fmvi-and-stability.md` |\n| The AGP 9 `androidLibrary { }` DSL — what it has, what it dropped (`BuildConfig`, variants, kapt, NDK), and the `androidResources` trap | `references\u002Fagp9-kmp-library.md` |\n| Navigation 3 wiring — keys and their `SerializersModule`, the navigator, feature entry builders, `NavDisplay` and its decorators, deriving the selected destination | `references\u002Fnavigation-3.md` |\n| Component architecture — the five infrastructure types, `MviViewModel` as the root owner, the Koin factory-function wiring, previewing and testing a component | `references\u002Fcomponent-architecture.md` |\n| The normative architecture, MVI and Compose-stability rules | `.claude\u002Frules\u002Fkmp\u002Farchitecture.md` |\n| The normative navigation rules | `.claude\u002Frules\u002Fkmp\u002Fnavigation.md` |\n| The normative rules for when a screen escalates to components | `.claude\u002Frules\u002Fkmp\u002Fcomponent-architecture.md` |\n\n## Scope\n\n**In scope**\n- Source-set hierarchy and where a file belongs.\n- `expect`\u002F`actual` — whether to use it, where to put it, and what to use instead.\n- Adding, removing or configuring a target (Android, iOS, JVM Desktop, Wasm).\n- KMP Gradle DSL: `kotlin { }` blocks, source-set dependencies, version catalog wiring, convention\n  plugins, `composeResources`, Compose compiler options.\n- Platform-specific artifacts: HTTP engines, file paths, settings\u002Fpreferences, platform APIs.\n- Diagnosing multiplatform build failures (missing `actual`, wrong source set, JVM-only dependency\n  pulled into `commonMain`).\n\n**Out of scope — hand off, do not answer here**\n- Coroutines, `Flow`, sealed classes, null safety, general idiomatic Kotlin → **`kotlin-specialist`**\n- Koin module design, constructor injection, layer boundaries → **`dependency-injection-architecture`**\n- Creating a feature module or a screen → **`new-feature`**\n- Test framework choice per source set → `.claude\u002Frules\u002Fkmp\u002Ftesting.md`, then **`unit-testing-kotlin`**\n- Compose UI composition, state hoisting, component design → `.claude\u002Frules\u002Fkmp\u002Fuikit.md`\n\nIf the question is a general Kotlin or DI question that merely happens to be asked inside a KMP\nproject, say which skill owns it and stop.\n\n## Procedure\n\n1. **Read the build files first.** `gradle\u002Flibs.versions.toml`, root `build.gradle.kts`,\n   `settings.gradle.kts`, the module's `build.gradle.kts`, and any convention plugins in\n   `build-logic\u002F`. Report actual versions from the catalog — never state a version from memory.\n2. **Identify the target set** the project actually declares. Do not assume iOS exists.\n3. **Answer or change against those facts**, reusing the catalog aliases and convention plugins that\n   are already there.\n4. **Verify.** Run the narrowest useful Gradle task (`:module:compileKotlin\u003CTarget>`,\n   `:module:allTests`, or `.\u002Fgradlew build`) and report the real output.\n\n## Source sets\n\n```\ncommonMain    shared code + every `expect` declaration\nandroidMain   actual — OkHttp engine, Android APIs\niosMain       actual — Darwin engine, iOS APIs\njvmMain       actual — CIO engine, Desktop APIs\n\ncommonTest    kotlin.test + coroutines-test (no MockK — it has no Kotlin\u002FNative support)\njvmTest       Desktop Compose UI tests; MockK allowed\nandroidHostTest \u002F androidDeviceTest \u002F iosTest\n```\n\n- A dependency added to `commonMain` must exist for **every** declared target. A JVM-only library\n  there fails the native compilation, often with a confusing \"unresolved reference\" in shared code.\n- Intermediate source sets (e.g. a shared `nonAndroidMain`) are worth it only when two targets share\n  a real implementation. Otherwise they add a hierarchy nobody reads.\n\n## expect \u002F actual\n\nPrefer an interface in `commonMain` with a platform implementation supplied through DI. It is\ntestable, it does not force every target to declare an `actual` at once, and it keeps the platform\nseam visible in the dependency graph.\n\nReach for `expect`\u002F`actual` when there is genuinely one canonical per-platform answer and DI would\nbe ceremony — a factory, a constant, a single function.\n\n```kotlin\n\u002F\u002F commonMain — data layer, leaf-level\nexpect fun httpClientEngine(): HttpClientEngineFactory\u003C*>\n\n\u002F\u002F androidMain\nactual fun httpClientEngine(): HttpClientEngineFactory\u003C*> = OkHttp\n\n\u002F\u002F iosMain\nactual fun httpClientEngine(): HttpClientEngineFactory\u003C*> = Darwin\n\n\u002F\u002F jvmMain\nactual fun httpClientEngine(): HttpClientEngineFactory\u003C*> = CIO\n```\n\nRules:\n- The `actual` lives in the same layer as the `expect`. A platform engine belongs to `data`, never `ui`.\n- Never an `expect class` that carries business logic — that logic then exists N times and drifts.\n- Never an `expect` in `domain`: that layer stays platform-free.\n- Adding a target means supplying every missing `actual` in the same change.\n\n## Compose Resources\n\nEach Gradle module generates its **own** `Res` class. Import the one from the module you are in; a\nmodule cannot read another module's `Res`. Placement rules are in\n`.claude\u002Frules\u002Fkmp\u002Flocalization.md`.\n\n## Common failures\n\n| Symptom | Cause | Fix |\n|---|---|---|\n| `Res.*` crashes at runtime, build stayed green | `androidResources { enable = true }` missing under AGP 9 `androidLibrary` | enable it — see `references\u002Fagp9-kmp-library.md` |\n| An `android { }` option does not resolve | the module uses the AGP 9 KMP-library plugin, not `com.android.library` | `references\u002Fagp9-kmp-library.md` |\n| Unresolved reference in shared code, only on iOS | JVM-only dependency in `commonMain` | move it to `jvmMain`\u002F`androidMain`, or find a KMP alternative |\n| \"Expected declaration has no actual\" | new target, or a new `expect` | add the `actual` to every declared target |\n| `runComposeUiTest` fails on the Android host target | UI test placed in `commonTest` | move it to `jvmTest` + `androidDeviceTest` |\n| Effects never arrive on Desktop | `Dispatchers.Main.immediate` unavailable | add `kotlinx-coroutines-swing` |\n| Composable recomposes constantly | cross-module type is Unstable | `@Immutable`, or add it to `stability.txt` |\n\n## Do NOT\n\n- Do NOT add a dependency version inline when the version catalog exists — add a catalog entry.\n- Do NOT add a target the project has not asked for, or answer as if iOS exists when it does not.\n- Do NOT put an `expect` in `domain`, or an `actual` in a different layer than its `expect`.\n- Do NOT put MockK or JUnit5 in `commonTest`.\n- Do NOT restate architecture or MVI rules — reference `.claude\u002Frules\u002Fkmp\u002Farchitecture.md`.\n- Do NOT apply `com.android.library` snippets to a module using the AGP 9 KMP-library plugin.\n- Do NOT load a reference during discovery — only when writing that code.\n- Do NOT edit generated artifacts or `build\u002F` output.\n\n## Error handling\n\n- **Build files unreadable or the project is not KMP** → say so and stop. Do not answer from\n  assumption about the layout.\n- **A required version is not in the catalog** → report which one is missing and propose the catalog\n  entry; do not silently hardcode it.\n- **A Gradle task fails** → paste the real error and diagnose it. Never report success on a red build.\n- **The question turns out to be a plain Kotlin or Koin question** → name the owning skill and stop.\n\n## Example\n\n> \"Add an iOS target to the shared module.\"\n\n1. Read `libs.versions.toml` and the module's `build.gradle.kts`; report the current target list.\n2. Add `iosX64()`, `iosArm64()`, `iosSimulatorArm64()` with the project's existing framework config.\n3. List every `expect` that now lacks an `actual`, create `iosMain` implementations (Ktor `Darwin`\n   engine, iOS platform values).\n4. Check `commonMain` dependencies for JVM-only artifacts and report anything that must move.\n5. Run `.\u002Fgradlew :shared:compileKotlinIosSimulatorArm64` and report the output.\n\nExpected outcome: the iOS target compiles, and any dependency that had to move out of `commonMain`\nis named explicitly in the summary.\n\n## Related Skills\n\n- `new-feature` — scaffolding a feature module pair\n- `kotlin-specialist` — coroutines, Flow, sealed classes, idiomatic Kotlin\n- `koin-kmp` — Koin modules, `platformModule`, layer boundaries in KMP\n- `kmp-testing` — test source sets, Compose test dispatching\n- `ktor-client-kmp` — the client the platform engines belong to\n- `kmp-persistence` — storage libraries and per-target KSP wiring\n- `compose-multiplatform` — Compose state, modifiers and stability\n- `kmp-ios-interop` — the Kotlin↔Swift boundary once an iOS target exists\n- `ci-cd-pipeline-builder` — building the multiplatform matrix in CI\n",{},"main","4ad702b3d4f403306c1a016277020693dd669f55","skills\u002Fkmp-multiplatform-specialist","https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills","https:\u002F\u002Fgithub.com\u002FAstrumon","Software Engineer","2026-10-14 01:01:46",{"source":7,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add Astrumon\u002Fspovishun-skills --skill kmp-multiplatform-specialist",{"tool":35,"command":36},"bunx","bunx skills add Astrumon\u002Fspovishun-skills --skill kmp-multiplatform-specialist",{"tool":38,"command":39},"pnpm","pnpm dlx skills add Astrumon\u002Fspovishun-skills --skill kmp-multiplatform-specialist","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkmp-multiplatform-specialist\u002FSKILL.md",true,[43,49,53,57,61],{"path":44,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":47,"sourceHtmlUrl":48},"manifest.yaml","REFERENCE","参考文档",1936,"https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkmp-multiplatform-specialist\u002Fmanifest.yaml",{"path":50,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":51,"sourceHtmlUrl":52},"references\u002Fagp9-kmp-library.md",4858,"https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkmp-multiplatform-specialist\u002Freferences\u002Fagp9-kmp-library.md",{"path":54,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Fcomponent-architecture.md",12561,"https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkmp-multiplatform-specialist\u002Freferences\u002Fcomponent-architecture.md",{"path":58,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Fmvi-and-stability.md",5011,"https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkmp-multiplatform-specialist\u002Freferences\u002Fmvi-and-stability.md",{"path":62,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Fnavigation-3.md",8111,"https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkmp-multiplatform-specialist\u002Freferences\u002Fnavigation-3.md",[66,72,78,85,90,95],{"skillNo":67,"name":68,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":18},"01M74FX71JH2KNG5KX7TZHSKCB","universal-skill","https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fsource\u002Fskills\u002Funiversal-skill\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":18},"01M74FX57GTEFPJVCPWPSP6CCW","notion-skill","https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fsource\u002Fskills\u002Fnotion-skill\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M74FX30F3K8906P5ASQ3DNXR","inline-frontmatter-skill","Hand-authored description that already lives in the body and must not be double-wrapped.","https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fsource\u002Fskills\u002Finline-frontmatter-skill\u002FSKILL.md",[],[],{"skillNo":86,"name":68,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":18},"01M74FX18AGHM2KHQ502PMJZRJ","https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fsource-v2\u002Fskills\u002Funiversal-skill\u002FSKILL.md",[],[],{"skillNo":91,"name":74,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":18},"01M74FWZJ193G810P0ZJ1PKEZ9","https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fsource-v2\u002Fskills\u002Fnotion-skill\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":18},"01M74FWPNEZWWGQ2Q37N6MMWP1","write-a-skill","https:\u002F\u002Fgithub.com\u002FAstrumon\u002Fspovishun-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwrite-a-skill\u002FSKILL.md",[],[]]