{
  "markdown": "# Koin Migration\n\n[![Version](https://img.shields.io/badge/version-1.0.0-blue)](./CHANGELOG.md)\n[![License](https://img.shields.io/badge/license-Apache--2.0-green)](./LICENSE)\n[![Koin](https://img.shields.io/badge/Koin-4.x-orange)](https://insert-koin.io)\n[![Kotlin](https://img.shields.io/badge/Kotlin-2.3.20%2B-purple)](https://kotlinlang.org)\n\nMigration guide and AI-assisted tooling for moving Kotlin / Android / KMP projects to **Koin 4.x with the Koin Compiler Plugin**.\n\nThis repository is two things in one:\n\n- **Reference documentation** — per-framework migration guides under [`skills/di-migration/references/`](./skills/di-migration/references) covering Hilt, Dagger, Toothpick, Kodein, and Koin DSL / KSP upgrades\n- **Claude Code plugin** — the same content packaged as an AI skill (`koin-migration`) that Claude can use to automate migrations directly in your codebase\n\n## Installation\n\n### From Claude Code (recommended)\n\nIn a Claude Code session, run:\n\n```\n/plugin marketplace add InsertKoinIO/koin-migration\n/plugin install koin-migration@koin-migration\n```\n\nThe first command registers this repo as a plugin marketplace; the second\ninstalls the `koin-migration` plugin from it. Updates: re-run\n`/plugin install koin-migration@koin-migration` after a new release.\n\n### Manual install\n\n```bash\ngit clone https://github.com/InsertKoinIO/koin-migration.git\n```\n\nRun Claude Code pointing at the cloned directory:\n\n```bash\nclaude --plugin-dir /path/to/koin-migration\n```\n\nOr copy only the skill into your Claude Code skills directory (no plugin manifest, skill only):\n\n```bash\n# Project-level (shared with your team via git)\nmkdir -p .claude/skills/di-migration\ncp -r koin-migration/skills/di-migration/* .claude/skills/di-migration/\n\n# Or personal (available across all your projects)\nmkdir -p ~/.claude/skills/di-migration\ncp -r koin-migration/skills/di-migration/* ~/.claude/skills/di-migration/\n```\n\nUpdate with `git pull`.\n\n## Supported Migration Paths\n\n| Source | Target |\n|--------|--------|\n| Hilt (+ Dagger) | Koin 4.x + Compiler Plugin (annotations) |\n| Dagger 2 (no Hilt) | Koin 4.x + Compiler Plugin (annotations) |\n| Toothpick | Koin 4.x + Compiler Plugin (annotations) |\n| Kodein | Koin 4.x + Compiler Plugin (Safe DSL) |\n| Koin 3.x | Koin 4.x Safe DSL + Compiler Plugin |\n| Koin DSL | Koin 4.x Safe DSL + Compiler Plugin |\n| Koin KSP Annotations | Koin 4.x Annotations + Compiler Plugin |\n\n> For **greenfield projects** or **manual DI / service locator** code, there's\n> nothing to migrate *from* — use Koin directly per the official docs at\n> [insert-koin.io](https://insert-koin.io) and apply the same Safe DSL + Compiler\n> Plugin conventions this skill uses.\n\n## Usage\n\nAsk Claude to migrate your DI code. Examples:\n\n- \"Migrate this Hilt module to Koin\"\n- \"Convert my Dagger components to Koin\"\n- \"Upgrade my Koin 3.x project to Koin 4.x\"\n- \"Move from Koin KSP annotations to the Compiler Plugin\"\n- \"Convert this Toothpick scope tree to Koin\"\n- \"Migrate this Kodein DI container to Koin\"\n\nThe skill follows an **8-step workflow**: Inventory → Plan → Gradle Setup → Generate Code → Wire Up → Update Injection Sites → Test Configuration → Verify & Cleanup.\n\n**Progressive migration by default**: the skill recommends creating a new Koin module and moving definitions into it step by step — never rewriting your existing DI modules in place. For Hilt/Dagger projects it also surfaces the `koin-android-dagger` bridge so Koin and Hilt can coexist during the migration.\n\n## Key Features\n\n- **Koin Compiler Plugin** (`io.insert-koin.compiler.plugin`) — compile-time dependency verification, zero generated files\n- **Auto parameter resolution** — `T`, `T?`, `Lazy<T>`, `List<T>` handled automatically by the compiler\n- **Auto-bind** — single interface implementations detected automatically, no explicit `binds` needed\n- **JSR-330 support** — `javax.inject.*` and `jakarta.inject.*` annotations reusable as-is\n- **Custom qualifiers** — existing `@Qualifier` annotations from Dagger/Hilt work directly\n- **Scope archetypes** — `@ActivityScope`, `@FragmentScope`, `@ViewModelScope`, `@ActivityRetainedScope`\n- **Safe DSL** — `single<T>()`, `factory<T>()`, `viewModel<T>()` with reified type parameters\n\n## Kotzilla MCP Server\n\nDuring and after migration, use the **Kotzilla MCP Server** for AI-assisted help with Koin configuration fixes, best practices, and debugging.\n\nRegister a free account at https://kotzilla.io.\n\nMCP Server endpoint: `https://mcp.kotzilla.io/mcp` (HTTP transport, requires authentication).\n\nExample with Claude Code:\n```bash\nclaude mcp add kotzilla --transport http https://mcp.kotzilla.io/mcp\n```\n\n## Requirements\n\n- Kotlin ≥ 2.3.20 (K2 compiler)\n- Koin 4.2.1+\n\n## Contributing\n\nIssues and pull requests are welcome.\n\n- **Bug reports / migration path gaps** → open an issue with the source framework, a minimal snippet, and the expected Koin output\n- **New migration paths** → add a `references/<source>-to-koin.md` guide following the existing structure, register it in `skills/di-migration/SKILL.md`, then run `./build.sh`\n- **Build** the plugin locally: `./build.sh` (produces `koin-migration-plugin.zip` and `di-migration-skill.skill`)\n- **Release** (maintainers): see [RELEASING.md](./RELEASING.md) for the full checklist\n\n## Repository Layout\n\n```\n.claude-plugin/\n  plugin.json                       # plugin manifest (name, version, metadata)\n  marketplace.json                  # makes this repo installable via /plugin marketplace add\nskills/di-migration/\n  SKILL.md                          # skill entry point\n  references/*.md                   # per-path migration guides\n  evals/evals.json                  # evaluation cases\nbuild.sh                            # validates + packages the plugin\n```\n\n## License\n\nApache 2.0 — see [LICENSE](./LICENSE).\n",
  "bytes": 5811,
  "sha": "92f9bab91ea2b313aa8a308f6c3a9f24f1a923db317c9202dd0c3a5d46cce4cf",
  "repo_slug": "insertkoinio/koin-migration",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_insertkoinio_koin_migration_koin_migrati_15eda7de/readme"
}