koin-di

Wire dependency injection for Kotlin Multiplatform projects using Koin.

1|Updated Apr 24, 2026
One-click install
npx skills add https://github.com/dimitriRemoiville/cc-mobile --skill koin-di
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: koin-di
Source: https://github.com/dimitriRemoiville/cc-mobile/tree/main/plugins/cc-mobile-kmm/skills/koin-di
Command: npx skills add https://github.com/dimitriRemoiville/cc-mobile --skill koin-di

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Koin is the DI framework here because Hilt is Android-only. Koin runs on every Kotlin Multiplatform target and has a clean DSL.

Core Features & Use Cases

Colocate modules with the code they bind. Platform-specific bindings are carried by per-target modules and the expect/actual platformModule. ViewModel binding is supported for Android and iOS, enabling seamless DI in both environments.

Quick Start

Initialize Koin in the shared module and call initKoin to bootstrap modules across Android and iOS.

Frequently Asked Questions about koin-di

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

FAQPage Schema
How do I set up dependency injection for a Kotlin Multiplatform app?

Wire ViewModel binding for Android and iOS in KMM by using per-target modules that carry platform-specific bindings. The expect/actual platformModule mechanism enables seamless dependency injection and ViewModel integration across both environments.

Can I use Koin for shared and platform-specific dependency bindings in KMM?

Yes, you can test DI graphs in your KMM project. The dependency injection setup supports testing the Koin modules that combine shared, network, and platform-specific bindings to validate your application's object graph.

Why use Koin instead of Hilt for Kotlin Multiplatform dependency injection?

Use Koin instead of Hilt for Kotlin Multiplatform dependency injection because Hilt is Android-only. Koin runs on every Kotlin Multiplatform target and provides a clean DSL for wiring shared and platform-specific modules across Android and iOS.

How do I wire ViewModels for Android and iOS in a KMM project?

Wire ViewModel binding for Android and iOS in KMM by using per-target modules that carry platform-specific bindings. The expect/actual platformModule mechanism enables seamless dependency injection and ViewModel integration across both environments.

Can I test DI graphs in a Kotlin Multiplatform project using Koin?

Yes, you can test DI graphs in your KMM project. The dependency injection setup supports testing the Koin modules that combine shared, network, and platform-specific bindings to validate your application's object graph.