koin

Configure Kotlin Multiplatform projects for dependency injection with Koin.

1|1|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/pddhkt/kotlin-kmp-skills --skill koin-pddhkt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: koin
Source: https://github.com/pddhkt/kotlin-kmp-skills/tree/main/plugins/kotlin-kmp/skills/koin
Command: npx skills add https://github.com/pddhkt/kotlin-kmp-skills --skill koin-pddhkt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Koin provides a pragmatic dependency injection framework for Kotlin Multiplatform projects, reducing boilerplate and enabling clean wiring of dependencies across shared and platform-specific layers.

Core Features & Use Cases

  • DSL-based module definitions for singleton, factory, and scoped components
  • Multiplatform DI with expect/actual boundaries and lifecycle-aware injection
  • ViewModel and platform integrations across Android and iOS

Quick Start

Add a Koin module and start Koin during app initialization.

Frequently Asked Questions about koin

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

FAQPage Schema
How do I configure dependency injection for Kotlin Multiplatform projects?

Koin provides DSL-based module definitions for singleton, factory, and scoped components to set up Kotlin Multiplatform dependency injection. It manages wiring across shared and platform-specific layers using expect/actual boundaries and lifecycle-aware injection patterns.

How do I integrate ViewModels with Koin in a KMP project?

Integrate ViewModels in a KMP project using Koin's lifecycle-aware injection patterns. This Skill configures ViewModel integrations across Android and iOS, allowing shared code to utilize platform-specific ViewModel scopes cleanly without manual boilerplate.

What is the best way to handle scoped injections across shared and platform-specific Kotlin code?

The best way to handle scoped injections across shared and platform-specific Kotlin code is using Koin's DSL. It allows defining scoped components and managing lifecycle-aware injections, ensuring clean dependency boundaries within your multiplatform environment.

Can I use Koin for lifecycle-aware injection across Android and iOS?

Yes, you can use Koin for lifecycle-aware injection across Android and iOS. It supports multiplatform DI with expect/actual boundaries and provides specific platform integrations, ensuring dependencies are correctly scoped to the lifecycle in both environments.

Does Koin support expect/actual boundaries for multiplatform dependency injection?

Yes, Koin fully supports expect/actual boundaries for multiplatform dependency injection. It allows you to define shared DSL modules while satisfying platform-specific implementations, cleanly bridging dependencies across your Kotlin Multiplatform project.