kotlin-multiplatform-expect-actual
Installation
SKILL.md
Kotlin Multiplatform: expect/actual boundaries
Core principle
Keep common APIs semantic and stable. Put platform mechanics behind small expect/actual declarations or interfaces, and keep Android/iOS/Desktop details out of commonMain.
Boundary procedure
- Name the product capability in common terms: share text, read clipboard, request haptic feedback, resolve current region.
- Check whether common callers need fakes, injected dependencies, lifecycle ownership, or runtime implementation choice.
- Pick the smallest boundary from the table below.
- Keep the common signature free of platform types and platform vocabulary.
- Put business branching in common code; keep actuals/platform bindings as translation layers.
- Validate by compiling every affected source set and testing common code with a fake where possible.