Skip to content
Back to skills

Android Di

ASecurity

Standards for Hilt Setup, Scoping, and Modules. Use when setting up Hilt dependency injection, component scoping, or modules in Android. (triggers: **/*Module.kt, **/*Component.kt, @HiltAndroidApp, @Inject, @Provides, @Binds)

  • 43 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 30, 2026
development

Security analysis

A100/100

Scanned May 30, 2026

npx -y skills add ComeOnOliver/skillshub --skill android-di --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Android Di?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Android Di
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/comeonoliver-android-di/badge)](https://www.skillsdirectory.com/skills/comeonoliver-android-di)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: android-di
description: "Standards for Hilt Setup, Scoping, and Modules. Use when setting up Hilt dependency injection, component scoping, or modules in Android. (triggers: **/*Module.kt, **/*Component.kt, @HiltAndroidApp, @Inject, @Provides, @Binds)"
---

# Android Dependency Injection (Hilt)

## **Priority: P0**

## Implementation Guidelines

### Setup

- **App**: Must annotate `Application` class with `@HiltAndroidApp`.
- **Entries**: Annotate Activities/Fragments with `@AndroidEntryPoint`.

### Modules

- **Binding**: Use `@Binds` (abstract class) over `@Provides` when possible (smaller generated code).
- **InstallIn**: Be explicit (`SingletonComponent`, `ViewModelComponent`).

### Construction

- **Constructor Injection**: Prefer over Field Injection (`@Inject constructor(...)`).
- **Assisted Injection**: Use for runtime parameters (`@AssistedInject`).

## Anti-Patterns

- **No Manual Dagger Components**: Use Hilt — it generates all the wiring.
- **No Field Injection in Logic**: Use constructor injection; field injection only in Android components.

## References

- [Module Templates](references/files.md)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…