SKILL Instructions
claude
cursor
chatgpt
#android
#hilt
#di
#architecture
About
How to structure Hilt modules, scopes, and entry points for Android apps.
Metadata (SKILL.md frontmatter)
- name
- android-hilt-di
- version
- 1.0.0
Instructions
Hilt DI
- Annotate app with
@HiltAndroidApp. - Use
@AndroidEntryPointon Activities/Fragments. - Provide bindings in
@Module @InstallIn(SingletonComponent::class). - Prefer constructor injection; avoid
@Inject lateinit varwhen possible. - Scope:
@Singletonfor repositories,@ViewModelScopedfor use cases tied to a screen.