with one click
dependency-injection
Best practices for DI, inject() usage, and providers.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Best practices for DI, inject() usage, and providers.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Foundational "High-Density" standard for token-optimized agent instructions and CLI-based automated activation.
Universal principles for clean, maintainable, and robust code across all environments.
Standards for performing high-quality, readable code reviews.
Essential rules for code comments, READMEs, and technical documentation.
CRITICAL - Before ANY file write, audit loaded skills for violations. Auto-report via feedback command.
Universal standards for version control, branching, and team collaboration.
Based on SOC occupation classification
| name | Dependency Injection |
| description | Best practices for DI, inject() usage, and providers. |
| metadata | {"labels":["angular","di","injection","providers"],"triggers":{"files":["**/*.service.ts","**/*.ts"],"keywords":["angular inject","providedIn","injection token"]}} |
inject() over Constructor: Use the inject() function for cleaner injection updates and type inference.providedIn: 'root' for services unless specific scoping is required.InjectionToken<T> for configuration, primitives, or interface abstraction.provide* functions (e.g., provideHttpClient()) in app.config.ts over importing modules.useFactory strictly when dependencies need runtime configuration.providedIn: 'platform' unless absolutely necessary (share between Micro Frontends).forwardRef only as a last resort; refactor architecture instead.