Back to skills
SKILL.md
Android Dependency Injection Hilt
ASecurityStandards for Hilt Setup, Scoping, and Modules
- 2 stars
- 0 votes
- 0 copies
- 0 views
- Added September 27, 2026
Security analysis
100/100Pro scans all 2 files and shows the line behind each finding
npx -y skills add David-Li0406/meta-skill-evloving --skill android-dependency-injection-hilt --agent claude-codeAre you the author of Android Dependency Injection Hilt?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/david-li0406-android-dependency-injection-hilt)---
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.md
- references/files.md
Attribution
Comments
Loading comments…