> android-di
Standards for Hilt Setup, Scoping, and Modules. Use when setting up Hilt dependency injection, component scoping, or modules in Android. (triggers: **/*Module.kt, **/*Component.kt, @HiltAndroidApp, @Inject, @Provides, @Binds)
curl "https://skillshub.wtf/HoangNguyen0403/agent-skills-standard/android-di?format=md"Android Dependency Injection (Hilt)
Priority: P0
Implementation Guidelines
Setup
- App: Must annotate
Applicationclass with@HiltAndroidApp. - Entries: Annotate Activities/Fragments with
@AndroidEntryPoint.
Modules
- Binding: Use
@Binds(abstract class) over@Provideswhen 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
> related_skills --same-repo
> typescript-tooling
Development tools, linting, and build config for TypeScript. Use when configuring ESLint, Prettier, Jest, Vitest, tsconfig, or any TS build tooling. (triggers: tsconfig.json, .eslintrc.*, jest.config.*, package.json, eslint, prettier, jest, vitest, build, compile, lint)
> typescript-security
Secure coding practices for TypeScript. Use when validating input, handling auth tokens, sanitizing data, or managing secrets and sensitive configuration. (triggers: **/*.ts, **/*.tsx, validate, sanitize, xss, injection, auth, password, secret, token)
> typescript-language
Modern TypeScript standards for type safety and maintainability. Use when working with types, interfaces, generics, enums, unions, or tsconfig settings. (triggers: **/*.ts, **/*.tsx, tsconfig.json, type, interface, generic, enum, union, intersection, readonly, const, namespace)
> typescript-best-practices
Idiomatic TypeScript patterns for clean, maintainable code. Use when writing or refactoring TypeScript classes, functions, modules, or async logic. (triggers: **/*.ts, **/*.tsx, class, function, module, import, export, async, promise)