A skill your agent uses when setting up or working with Koin in Android or KMP projects — module declarations with Classic DSL or KSP annotations, ViewModel injection in Compose, scopes, Nav 3 entry…

MITAuto-check passedMobile

Install Koin

skills CLI
$ npx skills add rcosteira79/android-skills --skill koin -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install rcosteira79/android-skills koin --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/rcosteira79/android-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/android-skills/skills/koin .claude/skills/koin && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
koin
GitHub stars
153
Token cost
~1.4k tokens
SKILL.md length
380 words
Files
1
Skills in repo
21
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when setting up or working with Koin in Android or KMP projects — module declarations with Classic DSL or KSP annotations, ViewModel injection in Compose, scopes, Nav 3 entry…

  • Working with Koin in Android
  • SKILL.md covers KSP Annotations — the…, KMP source-set layout, Compose: the call-site failure and Scopes, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • KMP projects — module declarations with Classic DSL

What it does

Koin is an agent skill from rcosteira79/android-skills. Use when setting up or working with Koin in Android or KMP projects — module declarations with Classic DSL or KSP annotations, ViewModel injection in Compose, scopes, Nav 3 entry providers, application startup, and compile-time verification via verify(). Triggers on Koin, single, factory, koinViewModel, koinInject, parametersOf, startKoin, "KMP DI", "shared DI".

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Mobile. It works with Android. The repository describes itself as: Claude Code skills for Android & KMP development. The licence is MIT.

When your agent uses it

  • Working with Koin in Android
  • KMP projects — module declarations with Classic DSL
  • KSP annotations
  • ViewModel injection in Compose

Example prompts

  • “KMP DI”
  • “shared DI”
  • “/koin”

What it can do on your machine

Read from SKILL.md and the folder at commit 0f9af5a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are kotlin).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Koin loads about 1.4k tokens when it runs. Until then it costs about 96 tokens; SKILL.md has 380 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~96
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from rcosteira79/android-skills at commit 0f9af5a, republished under its MIT licence (© rcosteira79). 380 words, ~1,434 tokens.

Download SKILL.mdSave it as .claude/skills/koin/SKILL.md (or your agent's skills folder).
name
koin
description
Use when setting up or working with Koin in Android or KMP projects — module declarations with Classic DSL or KSP annotations, ViewModel injection in Compose, scopes, Nav 3 entry providers, application startup, and compile-time verification via `verify()`. Triggers on Koin, `single`, `factory`, `koinViewModel`, `koinInject`, `parametersOf`, `startKoin`, "KMP DI", "shared DI".

Koin Dependency Injection (Android and KMP)

Pragmatic Kotlin DI. Koin vs Hilt: Koin runs in commonMain (Hilt doesn't) and verifies the graph via verify() instead of codegen; Hilt is Android-only with codegen + deep Jetpack integration (@HiltViewModel / hiltViewModel()). This reference covers the traps and boundaries, not the Classic DSL basics (single / factory / scoped / viewModel { } with get() resolution and runtime params, koinViewModel / koinInject, startKoin { androidLogger(); androidContext(this@MyApp); modules(...) }). Related: android-skills:kmp-ktor, android-skills:android-data-layer. Deps via koin-bom: koin-core, koin-android, koin-androidx-compose, koin-compose-viewmodel (KMP), koin-compose-viewmodel-navigation (Nav 3), koin-test, + optional koin-annotations / koin-ksp-compiler.

KSP Annotations — the generated-module accessor

@Module @ComponentScan discovers annotated classes and emits a module you pass to startKoin as UserModule().module — the generated .module extension on the annotated class is the part most often missed. Pick one style per module (don't mix Classic DSL + annotations inside a single module; switching between modules is fine).

kotlin
@Single class UserRepositoryImpl(private val service: UserService) : UserRepository
@Factory class UserFormValidator
@KoinViewModel class UserDetailViewModel(
    @InjectedParam private val userId: String,
    private val repository: UserRepository,
) : ViewModel()
@Module @ComponentScan("com.example.feature.user") class UserModule
// startKoin { modules(UserModule().module) }

KMP source-set layout

Most bindings live in commonMain; platform-typed ones (HTTP engine, Context, Keychain) go behind expect val platformModule: Module with an actual per platform (mirrors android-skills:kmp-ktor's engine pattern). iOS startup: call InitKoinKt.doInitKoin(config: nil) from iOSApp.init() — Swift reserves init, hence the do prefix.

kotlin
// commonMain
expect val platformModule: Module
// androidMain: actual = module { single<HttpClientEngine> { OkHttp.create() }; single<TokenStorage> { DataStoreTokenStorage(get()) } }
// iosMain:     actual = module { single<HttpClientEngine> { Darwin.create() }; single<TokenStorage> { KeychainTokenStorage() } }

Compose: the call-site failure

koinViewModel / koinInject require koin-androidx-compose (Android) or koin-compose-viewmodel (KMP). Without that artifact the call compiles but fails at the call site — koin-core knows nothing about ViewModel or the Compose runtime. For testability, default composable params to koinInject(): fun Screen(service: AnalyticsService = koinInject()).

kotlin
val vm: UserDetailViewModel = koinViewModel { parametersOf(userId) }
// keyed per entity: koinViewModel(key = "detail_$userId", parameters = { parametersOf(userId) })
Show full SKILL.md (157 more words)Show less

Scopes

Survives configuration changes (the common case) → activityRetainedScope — backed by the Activity's retained ViewModel, so it lives across rotation and closes on real finish. Declare with activityRetainedScope { } (or @ActivityRetainedScope) and access via AndroidScopeComponent; do not hand-roll createScope / close for this case.

kotlin
val checkoutModule = module {
    activityRetainedScope {                 // retained across config changes
        scoped { CheckoutCart() }
        scoped { CheckoutPricing(get()) }
    }
}
class CheckoutActivity : AppCompatActivity(), AndroidScopeComponent {
    override val scope: Scope by activityRetainedScope()
    private val cart: CheckoutCart by inject()
}

Custom lifetime not tied to an Activity (e.g. a multi-step flow keyed by an order id) → declare a scope<T> and own its lifecycle: getKoin().createScope<CheckoutFlow>("checkout-$orderId"), resolve with scope.get(), and scope.close() when the flow ends.

Nav 3

koinEntryProvider() resolves ViewModels per destination; register destinations inside modules, not inline at the NavDisplay site.

kotlin
val navigationModule = module {
    navigation<HomeRoute> { HomeScreen(viewModel = koinViewModel()) }
    navigation<DetailRoute> { route -> DetailScreen(viewModel = koinViewModel { parametersOf(route.id) }) }
}
NavDisplay(backStack = backStack, onBack = { backStack.removeLastOrNull() }, entryProvider = koinEntryProvider())

Testing — verify() / checkModules()

Walks each declaration's constructor and confirms every dependency is declared — missing bindings become test failures instead of a runtime NoDefinitionFoundException (recovering one of Hilt's advantages). Run it in CI. For constructor params resolved at runtime (e.g. SavedStateHandle), pass extraTypes or verify() false-fails. Override real bindings with fakes (e.g. Ktor MockEngine — see android-skills:kmp-ktor). KoinTestRule (JUnit 4) / KoinTestExtension (JUnit 5) installs a context per test.

kotlin
class ModuleVerificationTest : KoinTest {
    @Test fun `all modules resolve cleanly`() {
        koinApplication { modules(appModule, networkModule, platformModule) }.checkModules()
    }
    // Per-module with runtime-resolved types:
    // featureModule.verify(extraTypes = listOf(SavedStateHandle::class))
}

© rcosteira79, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/android-skills/skills/koin of rcosteira79/android-skills.

Open the folder on GitHubat commit 0f9af5a

Compare with similar skills

Koin next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Koin compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Koin this skillrcosteira79/android-skills153—~1.4kAutomated safety check: PassMIT
Compose Multiplatform Patternsmonta-app/ocpp-emulator1805 repos~2kAutomated safety check: PassApache-2.0
Phone HarnessShawnPana/phone-harness3.2k—~4.3kAutomated safety check: PassMIT
Stylesarindamxd/camerax-android1324 repos~2.3kAutomated safety check: PassApache-2.0
Verified Emailarindamxd/camerax-android1324 repos~4.7kAutomated safety check: PassApache-2.0
Argent Metro Debuggerbbplayer-app/BBPlayer1.2k—~3.4kAutomated safety check: PassMIT

Similar skills

  • Compose Multiplatform Patterns

    monta-app/ocpp-emulator

    Compose Multiplatform and Jetpack Compose patterns for KMP projects — state management, navigation, theming, performance, and platform-specific UI.

    180 GitHub starsUsed in 5 repos~2k tokens
    MobileAuto-check passed
  • Phone Harness

    ShawnPana/phone-harness

    Control the user's phone — an iPhone through the Mac's iPhone Mirroring window, an Android over adb, or a rented cloud Android: open apps, tap, type, swipe, read the screen.

    3.2k GitHub stars~4.3k tokensUpdated yesterday
    MobileAuto-check passed
  • Styles

    arindamxd/camerax-android

    A skill your agent uses to integrate the Jetpack Compose Styles API into an Android project.

    132 GitHub starsUsed in 4 repos~2.3k tokens
    MobileAuto-check passed
  • Verified Email

    arindamxd/camerax-android

    Provides a complete workflow for implementing verified email retrieval on Android Credential Manager API.

    132 GitHub starsUsed in 4 repos~4.7k tokens
    MobileAuto-check passed
  • Argent Metro Debugger

    bbplayer-app/BBPlayer

    Debug a JS runtime via CDP using argent debugger tools. An agent skill from bbplayer-app/BBPlayer.

    1.2k GitHub stars~3.4k tokensUpdated yesterday
    MobileAuto-check passed
  • 统一 Android XML 资源命名:layout、drawable、mipmap、color、values、id 的前缀与 snakecase 规则;把颜色/圆角/描边/状态编码进文件名(bg、border、textcolor…selector)。

    1.6k GitHub stars~1.3k tokensUpdated 1 mo ago
    MobileAuto-check passed

More from rcosteira79/android-skills

All 21 skills in this repo
  • Guides writing correct, performant Compose and Compose Multiplatform UI across Android, desktop, iOS and web, from state and animation to design-to-code and crash fixes.

    153 GitHub stars~2.6k tokensUpdated 20 days ago
    Auto-check passed
  • Kotlin Multiplatform Boundaries

    rcosteira79/android-skills

    Helps choose how common Kotlin Multiplatform code reaches platform APIs: expect/actual, a common interface with platform bindings, or separate platform screens.

    153 GitHub stars~1.5k tokensUpdated 20 days ago
    Auto-check passed
  • Android Data Layer and Room in KMP

    rcosteira79/android-skills

    Sets out the repository pattern's error-propagation model for Android and Kotlin Multiplatform, plus the Room setup for commonMain.

    153 GitHub stars~1.2k tokensUpdated 20 days ago
    Auto-check passed
  • Android Debugging

    rcosteira79/android-skills

    Android and KMP debugging techniques for crashes, ANRs, memory leaks, R8 traces, Gradle failures and Compose recomposition, built on finding the root cause first.

    153 GitHub stars~2.6k tokensUpdated 20 days ago
    Auto-check passed
  • Android and KMP Baseline

    rcosteira79/android-skills

    Sets house defaults for Android and Kotlin Multiplatform work and routes to the right specialized skill for Compose, networking, testing or build tooling.

    153 GitHub stars~3k tokensUpdated 20 days ago
    Auto-check passed
  • Android Gradle Build Logic

    rcosteira79/android-skills

    Sets up Android Gradle convention plugins in a build-logic composite build, including the version catalog wiring and shared configuration that are easy to get wrong.

    153 GitHub stars~959 tokensUpdated 20 days ago
    Auto-check passed

Works with

Categories

Questions about Koin

What does Koin do?

A skill your agent uses when setting up or working with Koin in Android or KMP projects — module declarations with Classic DSL or KSP annotations, ViewModel injection in Compose, scopes, Nav 3 entry…. Koin is an agent skill from rcosteira79/android-skills. Use when setting up or working with Koin in Android or KMP projects — module declarations with Classic DSL or KSP annotations, ViewModel injection in Compose, scopes, Nav 3 entry providers, application startup, and compile-time verification via verify().

When should I use Koin?

Koin fits situations like: working with Koin in Android; KMP projects — module declarations with Classic DSL; KSP annotations; viewModel injection in Compose.

How do I install Koin in Claude Code?

Run `npx skills add rcosteira79/android-skills --skill koin -a claude-code`. Or copy the skill folder (plugins/android-skills/skills/koin in rcosteira79/android-skills) into .claude/skills/koin in your project. Claude Code loads it when a task matches its description.

How do I install Koin in Codex?

Run `npx skills add rcosteira79/android-skills --skill koin -a codex`. Or copy the skill folder (plugins/android-skills/skills/koin in rcosteira79/android-skills) into .agents/skills/koin in your project. Codex loads it when a task matches its description.

Can I use Koin in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rcosteira79/android-skills --skill koin -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/koin, .gemini/skills/koin, .github/skills/koin and .opencode/skills/koin in your project.

What does Koin need to run?

SKILL.md names no scripts, command-line tools or credentials: Koin is instructions for the agent only.

Does Koin access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Koin safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Koin use?

Koin is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Koin use?

About 1.4k tokens (SKILL.md is roughly 5.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Koin?

Skills that share tags, products or a category with Koin: Compose Multiplatform Patterns (monta-app/ocpp-emulator, 180 stars), Phone Harness (ShawnPana/phone-harness, 3.2k stars), Styles (arindamxd/camerax-android, 132 stars) and Verified Email (arindamxd/camerax-android, 132 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Koin?

rcosteira79 (a GitHub user) maintains it in rcosteira79/android-skills, which has 153 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on September 19, 2026.

Source: rcosteira79/android-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.