metro-usage

Configure Metro dependency injection graphs for Kotlin Multiplatform projects.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Metro-based DI helps developers manage complex dependency graphs and lifecycles across Kotlin Multiplatform modules, reducing boilerplate and promoting consistency.

Core Features & Use Cases

  • Graph creation and wiring using @DependencyGraph and createGraph to assemble type-safe dependencies.
  • Bindings, scopes, and qualifiers with @Binds, @Provides, @SingleIn, and named qualifiers to control lifetimes and specialization.
  • Multibindings, assisted injection, and multi-module aggregation to compose features across modules.

Quick Start

Create a graph for your AppGraph and begin wiring dependencies with Metro annotations.

Frequently Asked Questions about metro-usage

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

FAQPage Schema
How do I configure dependency injection in a Kotlin Multiplatform project?

Configure dependency injection in Kotlin Multiplatform by applying Metro annotations like @DependencyGraph and createGraph to assemble type-safe dependencies across Android, iOS, and JVM targets, reducing boilerplate and managing complex lifecycles.

How does Metro handle scopes and qualifiers for Kotlin dependencies?

Metro handles scopes and qualifiers using annotations like @SingleIn and named qualifiers alongside @Binds and @Provides, allowing you to control dependency lifetimes and specialize bindings across multiplatform modules.

Can I use Metro to aggregate dependencies across multiple Kotlin modules?

Yes, you can aggregate dependencies across multiple Kotlin modules using Metro's multibindings and multi-module aggregation features, composing distinct features into a single type-safe dependency graph.

What is the best way to implement assisted injection in Kotlin Multiplatform?

Implement assisted injection in Kotlin Multiplatform by leveraging Metro's built-in support for assisted injection and multibindings, allowing you to pass runtime parameters while the graph supplies remaining dependencies.

How do I build a type-safe dependency graph for Android and iOS targets?

Build a type-safe dependency graph for Android and iOS targets by applying the @DependencyGraph annotation to your AppGraph, then use @Provides and @Binds to wire dependencies and generate the graph via createGraph.

Does Metro support graph factories for Kotlin Multiplatform apps?

Yes, Metro supports graph factory features for Kotlin Multiplatform apps, enabling you to programmatically construct and manage dependency graphs with specialized inputs and assisted injection parameters.