hilt

Automate Android dependency injection setup with Hilt across app lifecycles.

1|1|Updated Nov 9, 2025
One-click install
npx skills add https://github.com/tianguzhe/zsh-config --skill hilt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hilt
Source: https://github.com/tianguzhe/zsh-config/tree/main/claude/skills/hilt
Command: npx skills add https://github.com/tianguzhe/zsh-config --skill hilt

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

Hilt dependency injection library for Android. Use for Android DI, Dagger integration, component hierarchy, ViewModel injection, testing with Hilt, and compile-time dependency injection.

Frequently Asked Questions about hilt

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up dependency injection with Hilt for Android ViewModels?

Use the @HiltViewModel annotation to set up Hilt dependency injection for Android ViewModels, enabling automated lifecycle-aware injection. This simplifies providing dependencies to ViewModels across Application, Activity, and Fragment scopes.

What is the best way to configure Dagger components for an Android app?

The best way to configure Dagger components is using Hilt's @InstallIn annotation to define modular bindings. This automates the component hierarchy for Application, Activity, Fragment, and ViewModel lifecycles without manual Dagger setup.

Does Hilt support testing scenarios for Android apps?

Yes, Hilt supports testing scenarios for Android apps by providing testing patterns and examples. It integrates with the component hierarchy to simplify testing across Application, Activity, Fragment, and ViewModel lifecycles.

How do I apply dependency injection across Android Activity and Fragment lifecycles?

Apply dependency injection across Android Activity and Fragment lifecycles using the @AndroidEntryPoint annotation. Hilt automates this setup, streamlining dependency provisioning and component management throughout these lifecycles.

Do I need Gradle to use Hilt for Android dependency injection?

Yes, you need Gradle to integrate Hilt for Android dependency injection, as it is an Android library built on Dagger. The Gradle setup facilitates compile-time dependency injection and component hierarchy generation.

Why use Hilt over standard Dagger for Android dependency injection?

Use Hilt over standard Dagger to simplify Android dependency injection setup and usage. Hilt automates the Dagger component hierarchy for Application, Activity, Fragment, and ViewModel lifecycles, reducing boilerplate while maintaining compile-time safety.