dependency-injection
Skill2 starsChanged 5 months agoMITView on GitHub
Use for Hilt, Koin, DI modules, scopes, ViewModel injection, repository bindings and testing with dependency injection.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- jame581/GodotPromptertheir own version, first seen Oct 4, 2026
- gerivdb/SKILLStheir own version, first seen Aug 7, 2026
- codewithmukesh/dotnet-claude-kittheir own version, first seen Jul 22, 2026
- garrettw/php-arch-skillstheir own version, first seen Jul 17, 2026
- aubynsamuel/android-dev-skillstheir own version, first seen May 23, 2026
- ffsshhttiikk/opencode-agents-skillstheir own version, first seen Feb 28, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- jame581/GodotPrompter★ 785same name
- codewithmukesh/dotnet-claude-kit★ 750same name
- garrettw/php-arch-skills★ 13same name
- ffsshhttiikk/opencode-agents-skills★ 2same name
- aubynsamuel/android-dev-skills★ 1same name
- gerivdb/SKILLS★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository38 other files it gives its agents.
- AGENTS.mdAGENTS.md
- super-android-kotlin-firebaseSkill
- accessibilitySkill
- agp9-kotlin-migrationSkill
- android-architectureSkill
- android-coreSkill
- android-navigation-3Skill
- code-review-refactorSkill
- compose-contextual-design-systemSkill
- compose-performanceSkill
- context-aware-ui-designSkill
- debuggingSkill
- dependency-upgrade-safetySkill
- design-test-gateSkill
- edge-to-edge-adaptive-uiSkill
- firebase-ai-logicSkill
- firebase-authSkill
- firebase-cloud-functionsSkill
- firebase-coreSkill
- firebase-crashlytics-analyticsSkill
- firebase-emulator-ciSkill
- firebase-messagingSkill
- firestore-costs-quotasSkill
- firestoreSkill
- gradle-buildSkill
- jetpack-composeSkill
- kotlin-coreSkill
- macrobenchmark-baseline-profilesSkill
- networking-retrofit-ktorSkill
- play-store-releaseSkill
- r8-proguard-optimizationSkill
- room-datastoreSkill
- screen-ux-auditSkill
- security-privacySkill
- testingSkill
- ui-state-designSkill
- workmanager-background-syncSkill
- xml-to-compose-migrationSkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 10 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
Add the smallest binding/module needed.
- Distinctive: line 30
Add test fakes or replacement modules.
- Distinctive: line 34
Do not mix Hilt and Koin without strong reason.
- Distinctive: line 35
Avoid hidden service locators.
- Distinctive: line 36
Do not inject Context unless needed.
- Distinctive: line 37
Keep singletons immutable or thread-safe.
- Distinctive: line 38
Do not break Compose previews.
- Distinctive: line 51
Do not assume these companion skills are installed.
- Distinctive: line 88
Use $super-android-kotlin-firebase to add Hilt for repositories and ViewModels.
- Distinctive: line 89
Use $super-android-kotlin-firebase to fix this DI binding error.
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Purpose
Make dependencies explicit and replaceable without adding unnecessary framework weight.
When to use
- Adding Hilt or Koin.
- Injecting ViewModels, repositories or data sources.
- Fixing scope or binding problems.
- Replacing dependencies in tests.
Inputs to inspect
- Existing DI framework or manual DI.
- Object lifetimes and scopes.
- ViewModel and repository constructors.
- Test replacement needs.
Required workflow
- Detect current DI pattern.
- Add the smallest binding/module needed.
- Use scopes intentionally.
- Wire ViewModel and repository dependencies.
- Add test fakes or replacement modules.
Rules
- Do not mix Hilt and Koin without strong reason.
- Avoid hidden service locators.
- Do not inject Context unless needed.
- Keep singletons immutable or thread-safe.
- Do not break Compose previews.
Related existing skills
Local skills to invoke
- android-architecture
- kotlin-core
- testing
- room-datastore
External companion skills to use when installed
Do not assume these companion skills are installed. Prefer the local skills above first, then consult Companion Skills for install and verification commands.
- android/skills — use for official Android workflow alignment when a first-party companion skill exists for the task.
Files commonly touched
di modulesApplication classViewModelsrepositoriestest modules
Commands to validate
./gradlew test
./gradlew assembleDebug
./gradlew lintCommon mistakes to avoid
- Injecting everything by default.
- Creating circular dependencies.
- Using singletons for mutable state.
- Forgetting test replacements.
Checklist
- Bindings minimal.
- Scopes correct.
- Tests can replace dependencies.
- Previews still work.
- Build passes.
Example prompts
- Use $super-android-kotlin-firebase to add Hilt for repositories and ViewModels.
- Use $super-android-kotlin-firebase to fix this DI binding error.
Expected response style
Respond with: brief diagnosis, change plan, affected files, code or diff summary, validation commands, tests added or recommended, risks, and next step. For review tasks, lead with findings ordered by severity.
References
- ../../docs/audits/FUENTES_LOCALES.md
- references/di-scopes-and-tests.md
- templates/hilt-module-template.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

