kmp-di

Community

Seamless DI for Kotlin Multiplatform apps.

Authorahmed3elshaer
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Cross-platform Kotlin Multiplatform projects often struggle with consistent dependency injection across shared and platform-specific code. This Skill provides a Koin-based DI setup that unifies injection for common code and Android/iOS targets, reducing boilerplate and improving testability.

Core Features & Use Cases

  • Koin Multiplatform setup across commonMain, androidMain, and iosMain with shared modules.
  • Platform-specific modules for Android and iOS to provide context, platform services, and DI wiring.
  • Manual DI patterns for testing and flexible composition, enabling easy swapping of implementations.
  • Use Case: Build a shared Repository and ViewModel graph that seamlessly injects dependencies on both Android and iOS.

Quick Start

  1. Add the Koin dependencies to your shared and platform modules as shown in the examples.
  2. Define modules in commonMain and wire platform modules in androidMain/iosMain startup code; initialize Koin during app startup.
  3. Inject dependencies in UI components using koinViewModel() on Android or equivalent screen models in multiplatform code.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: kmp-di
Download link: https://github.com/ahmed3elshaer/everything-claude-code-mobile/archive/main.zip#kmp-di

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.