kmp-patterns

Generate a Kotlin Multiplatform project skeleton with a shared module.

Updated Mar 14, 2026
One-click install
npx skills add https://github.com/Vivekmano27/agent-orchestrator --skill kmp-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kmp-patterns
Source: https://github.com/Vivekmano27/agent-orchestrator/tree/main/plugins/project-orchestrator/skills/kmp-patterns
Command: npx skills add https://github.com/Vivekmano27/agent-orchestrator --skill kmp-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Cross-platform code duplication makes maintaining consistent business logic across Android, iOS, desktop, and web painful. This skill provides a Kotlin Multiplatform project skeleton with a shared module to centralize core logic.

Core Features & Use Cases

  • Shared module architecture for common code (domain, data, networking, and UI) that runs on all target platforms.
  • Expect/Actual pattern scaffolding with platform-specific implementations for platform-specific features.
  • Ktor-based networking, SQLDelight for shared database access, Koin for dependency injection, and Compose Multiplatform UI to unify UI development.

Quick Start

Create a minimal Kotlin Multiplatform project skeleton with a shared module and basic expect/actual declarations to start building cross-platform features.

Frequently Asked Questions about kmp-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I share business logic across Android, iOS, and desktop using Kotlin Multiplatform?

Share business logic across Android, iOS, and desktop by using a Kotlin Multiplatform shared module skeleton that centralizes domain, data, and networking layers. This approach reduces cross-platform code duplication and ensures consistent behavior across all target platforms.

What is the expect/actual pattern in Kotlin Multiplatform and when do I need it?

The expect/actual pattern in Kotlin Multiplatform defines common declarations in shared code using 'expect' and provides concrete implementations using 'actual' for platform-specific features. It is needed for platform-specific implementations like networking, persistence, and UI composition.

How do I scaffold a Kotlin Multiplatform project with Ktor networking and SQLDelight?

Scaffold a Kotlin Multiplatform project with Ktor networking and SQLDelight by using a project skeleton that integrates Ktor-based networking, SQLDelight for shared database access, Koin for dependency injection, and Compose Multiplatform UI tooling.

Can I use Compose Multiplatform to unify UI development across Android, iOS, and web?

Yes, Compose Multiplatform unifies UI development across Android, iOS, and desktop. It is included in the shared module architecture alongside Ktor networking, SQLDelight, and Koin dependency injection to centralize both logic and UI composition.

Does Kotlin Multiplatform work for building shared authentication and API clients?

Kotlin Multiplatform works for building cross-platform features like authentication, data models, and API clients. The shared module architecture centralizes this logic, using Ktor for API networking and Koin for dependency injection across all platforms.

What are the limitations of using a shared module for cross-platform Kotlin development?

A shared module for cross-platform Kotlin development requires writing expect/actual declarations for platform-specific features, which adds boilerplate. While it unifies logic and UI, you must still maintain platform-specific implementations for features that cannot be fully shared.