kotlin-inject

Configure kotlin-inject dependency injection for Kotlin Multiplatform projects with KSP.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Zeyden/claude-skills --skill kotlin-inject
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-inject
Source: https://github.com/Zeyden/claude-skills/tree/main/skills/kotlin-inject
Command: npx skills add https://github.com/Zeyden/claude-skills --skill kotlin-inject

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies dependency injection in Kotlin and Kotlin Multiplatform (KMP) projects by leveraging compile-time code generation (KSP), eliminating runtime reflection and its associated costs.

Core Features & Use Cases

  • Compile-Time Safety: Catches dependency errors at compile time, not runtime.
  • KMP Support: Seamlessly works across JVM, Android, iOS, and other KMP targets.
  • Dagger Alternative: Provides a modern, reflection-free approach to DI for Kotlin developers.
  • Use Case: Integrate kotlin-inject into your KMP project to manage dependencies for network clients, databases, and UI components across all your platforms efficiently.

Quick Start

Invoke the kotlin-inject skill to get the Gradle setup for a Kotlin Multiplatform project.

Frequently Asked Questions about kotlin-inject

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

FAQPage Schema
What is compile-time dependency injection for Kotlin and why use it?

Compile-time dependency injection for Kotlin generates code via KSP to wire dependencies, catching errors during compilation rather than runtime. This approach eliminates reflection overhead and ensures graph safety before deployment.

How do I set up dependency injection in a Kotlin Multiplatform project?

To set up dependency injection in a Kotlin Multiplatform project, configure the KSP Gradle plugin and define Components using annotations like @Inject and @Provides. This generates platform-specific code for JVM, Android, and iOS targets.

Does kotlin-inject work as a Dagger alternative for Android and KMP?

kotlin-inject works as a Dagger alternative by providing a reflection-free dependency injection approach tailored for Kotlin and KMP. It supports Android patterns and handles multiplatform targets seamlessly without runtime overhead.

What dependency injection features are supported for Kotlin Multiplatform?

Supported dependency injection features for Kotlin Multiplatform include Components, @Inject, @Provides, Qualifiers, Scoping, Multi-bindings, and Assisted Injection. These cover graph construction and object lifecycle management across platforms.

How does kotlin-inject compare to other compile-time DI frameworks for Kotlin?

Compared to other compile-time DI frameworks, kotlin-inject focuses on native Kotlin support and KMP compatibility. It leverages KSP for code generation, ensuring no runtime reflection while offering modern alternatives to Dagger patterns.