home / skills / shotaiuchi / dotclaude / kmp-architecture
/dotclaude/skills/kmp-architecture
This skill helps you design and apply Kotlin Multiplatform architecture patterns, share modules, and implement expect/actual, Koin, SQLDelight, and Compose
npx playbooks add skill shotaiuchi/dotclaude --skill kmp-architectureReview the files below or copy the command above to add this skill to your agents.
---
name: Kotlin Multiplatform Architecture
description: This skill should be used when implementing KMP features, creating shared modules, using expect/actual, setting up Koin/SQLDelight/Ktor, or implementing Compose Multiplatform.
references:
- path: ../../references/common/clean-architecture.md
- path: ../../references/common/testing-strategy.md
- path: ../../references/languages/kotlin/conventions.md
- path: ../../references/languages/kotlin/library-patterns.md
- path: ../../references/languages/kotlin/feature-patterns.md
- path: ../../references/languages/kotlin/kmp-architecture-patterns.md
external:
- id: kmp-docs
- id: compose-multiplatform
- id: kotlin-coroutines
---
**Always respond in Japanese.**
# Kotlin Multiplatform Architecture
Multiplatform development patterns based on Kotlin official documentation and Google's KMP recommendations.
Read and apply the patterns from the referenced documents to the user's implementation task.
## Reference Documents
- [Clean Architecture Guide](../../references/common/clean-architecture.md)
- [Testing Strategy Guide](../../references/common/testing-strategy.md)
- [KMP Conventions](../../references/languages/kotlin/conventions.md)
- [Library Patterns](../../references/languages/kotlin/library-patterns.md)
- [Feature Patterns](../../references/languages/kotlin/feature-patterns.md)
- [Architecture Patterns](../../references/languages/kotlin/kmp-architecture-patterns.md)
This skill helps implement robust Kotlin Multiplatform (KMP) architectures for shared modules, feature boundaries, and platform-specific integration. It focuses on practical patterns for expect/actual separation, dependency wiring, and multi-platform UI with Compose. Use it to align implementations with clean architecture, testing strategy, and KMP conventions.
The skill analyzes your module layout, boundary definitions, and DI/DB/network wiring and recommends concrete patterns: where to place expect/actual types, how to structure shared domain/data/presentation layers, and how to adapt libraries like Koin, SQLDelight, and Ktor. It also produces test strategies and Compose Multiplatform integration steps tailored to your targets and build configuration.
When should I use expect/actual vs platform libraries in shared code?
Use expect/actual for small, stable abstractions (file I/O, secure storage, platform-specific features). Avoid wrapping large platform SDKs; instead, isolate and expose minimal interfaces.
How do I manage database migrations across targets with SQLDelight?
Keep the schema and migration scripts in shared code. Provide platform-specific SQLDelight drivers via expect/actual and initialize the database through your DI entry point during app startup.