Skip to content
Back to skills

Android Dependency Injection Hilt

ASecurity

Standards for Hilt Setup, Scoping, and Modules

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
development

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill android-dependency-injection-hilt --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Android Dependency Injection Hilt?

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

Security grade badge for Android Dependency Injection Hilt
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-android-dependency-injection-hilt/badge)](https://www.skillsdirectory.com/skills/david-li0406-android-dependency-injection-hilt)

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 Dependency Injection (Hilt)
description: Standards for Hilt Setup, Scoping, and Modules
metadata:
  labels: [android, di, hilt, dagger]
  triggers:
    files: ['**/*Module.kt', '**/*Component.kt']
    keywords: ['@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

- **Component Manual Creation**: `**No Manual Dagger**: Use Hilt Standard.`
- **Field Inject in Logic**: `**No Field Inject**: Only in Android Components.`

## References

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

Files in this skill

  • SKILL.md1.1 KB
  • references/files.md1.1 KB

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…