Android di hilt

From krutikJain/android-agent-skills · View interactive version

Android di hilt is an AI agent skill from the GitHub repository krutikJain/android-agent-skills. Wire Android dependency injection with Hilt, scopes, testing overrides, and module ownership boundaries.

How to use this skill

Skill file

Android DI Hilt

When To Use

Workflow

  1. Identify the injection boundary first: app-wide singleton, activity-retained, ViewModel, worker, service, or entry point from unsupported framework code.
  2. Decide what should be bound: constructor injection, @Binds, @Provides, qualifiers, multibindings, or assisted injection.
  3. Match lifetime to scope explicitly so dependencies do not outlive their owner or rebuild too often.
  4. Verify replacement strategy for tests with Hilt test modules, uninstall modules, or fakes at the right component boundary.
  5. Hand off API-specific or architectural questions only after the DI graph ownership is correct.

Guardrails

Anti-Patterns

Review Focus

Examples

Happy path

Edge case

Failure recovery

Done Checklist

Official References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.