Skip to main content
Version: 4.2

AI Agents and Koin Skills

The Koin skills teach a coding agent how to work with Koin 4.x and the Koin Compiler Plugin: which style to use, how to declare and wire definitions, how to migrate from another DI framework and how to diagnose a Koin error. They are maintained by the Koin team in the koin-skills repository on GitHub, and published as the koin plugin for Claude Code and as standard agent skills for other agents. This page shows how to install them and what each one does.

Install in Claude Code​

/plugin marketplace add InsertKoinIO/koin-skills
/plugin install koin@koin-skills

The first command adds the Koin skills repository as a plugin marketplace, the second installs the koin plugin from it. Update later with /plugin marketplace update koin-skills.

The skills load on their own when a task touches dependency injection in a Kotlin, Android, Compose, KMP or Ktor project. You don't need to call them by name.

Install in other agents​

For Cursor, Codex, Copilot, Windsurf, Gemini and other agents that read agent skills, use the skills CLI (Node.js 22 or later):

npx skills add InsertKoinIO/koin-skills

It reads the skills from the koin-skills repository (the full URL https://github.com/InsertKoinIO/koin-skills works too), lists the four skills and installs the ones you pick, for the agents you pick. To install all of them without prompts: npx skills add InsertKoinIO/koin-skills --skill '*' -y. Each GitHub release also attaches one .skill archive per skill and the full plugin as koin-plugin.zip.

What the skills do​

SkillUse it to
koin-setupAdd Koin to a new or existing project, or next to a DI container you keep
koinWrite Koin code in the project's style: definitions, modules, entry points, scopes, tests
di-migrationMigrate from Hilt, Dagger, Toothpick, Kodein, Metro, Koin 3.x, Koin DSL or Koin KSP, module by module
koin-diagnoseFix Koin errors and crashes, and check how the app behaves at runtime

The skills follow the rules of these docs. They use constructor injection, the Compiler Plugin DSL or Koin Annotations, and never Koin KSP for new code. A migration is progressive: the old container keeps running until the last binding has moved.

Kotzilla MCP Server​

The skills can use the Kotzilla MCP Server to diagnose Koin errors and to measure how definitions behave at runtime (lifetime, scopes, startup cost). It needs a free Kotzilla account. The skills propose it when it helps and never require it.

In Claude Code, the koin plugin includes the server. It stays inactive until you sign in: run /mcp, select plugin:koin:kotzilla and sign in. In other agents, add the endpoint https://mcp.kotzilla.io/mcp (HTTP transport, OAuth) to the agent's MCP configuration.

Limits​

  • The skills target Koin 4.2.2 or later with Kotlin 2.3.20 or later. On an older Koin, they work in the current setup and propose the upgrade once.
  • The skills guide the agent, they don't replace review. Read the changes before you merge them.
  • Runtime checks (startup, memory, instances created twice) need the Kotzilla SDK in the app. Without it, the skills point out likely causes from the code, not measurements.