dependency-injector

Generate diBootstrap.ts by wiring ApiDataSource, RepositoryImpl, and UseCase dependencies.

1|Updated Apr 27, 2026
One-click install
npx skills add https://github.com/Saurav-snapwork/NewAppTemplate --skill dependency-injector
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dependency-injector
Source: https://github.com/Saurav-snapwork/NewAppTemplate/tree/main/.github/skills/dependency-injector
Command: npx skills add https://github.com/Saurav-snapwork/NewAppTemplate --skill dependency-injector

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Dependency wiring across feature layers can become brittle without a single, well-defined bootstrap that wires interfaces to implementations and injects them into use cases. This Skill provides a deterministic di bootstrap to enforce loose coupling and testability by orchestrating ApiDataSource, RepositoryImpl, and UseCase wiring in a single entry point.

Core Features & Use Cases

  • Build and validate a complete dependency graph (ApiDataSource -> RepositoryImpl -> UseCase) to guarantee deterministic instantiation order.
  • Generate the composition root file diBootstrap.ts that constructs concrete classes using constructor injection and returns a typed ThunkExtra for Redux store wiring.
  • Audit existing code for tight coupling, circular dependencies, and improper imports, surfacing all issues before generation.
  • Produce an advisory store wiring snippet to guide integration with shared app infrastructure without overwriting shared files.

Quick Start

Run the Dependency Injector orchestrator after completing upstream skills (Data Layer Builder, Domain Extraction, and Redux State Generator) to produce diBootstrap.ts for the feature.

Frequently Asked Questions about dependency-injector

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

FAQPage Schema
How do I wire a dependency graph across data, domain, and Redux layers in TypeScript?

To wire a dependency graph in TypeScript, this Skill generates a single diBootstrap.ts composition root that orchestrates ApiDataSource, RepositoryImpl, and UseCase wiring with constructor injection. It enforces loose coupling by validating graph ordering and constructor signatures before generating the bootstrap file.

Why does circular dependency break my clean architecture wiring?

Circular dependency breaks clean architecture wiring because instantiation order becomes non-deterministic. This Skill audits the dependency graph to surface tight-coupling and circular dependency issues before code generation, ensuring deterministic instantiation from ApiDataSource through RepositoryImpl to UseCase artifacts.

How do I generate a composition root for constructor injection in a TypeScript feature?

You generate a composition root for constructor injection by running the orchestrator after upstream skills produce ApiDataSource, RepositoryImpl, and UseCase artifacts. It outputs a diBootstrap.ts file that constructs concrete classes and returns a typed ThunkExtra for Redux store wiring.

Can I use this dependency injection approach with my existing Redux store infrastructure?

Yes, this dependency injection approach integrates with existing Redux store infrastructure by producing an advisory store wiring snippet. This snippet guides ThunkExtra integration with shared app infrastructure without overwriting your existing shared files or store configuration.

What is the one-entrypoint rule for dependency injection bootstrapping?

The one-entrypoint rule for dependency injection bootstrapping requires all feature wiring to pass through a single diBootstrap.ts file. This Skill enforces the rule by validating that ApiDataSource, RepositoryImpl, and UseCase dependencies are exclusively resolved through this composition root.

Do I need to build my Data Layer and Domain artifacts before wiring dependencies?

Yes, you need to build Data Layer and Domain artifacts before wiring dependencies. The orchestrator runs after upstream Data Layer Builder, Domain Extraction, and Redux State Generator skills to ensure ApiDataSource, RepositoryImpl, and UseCase artifacts exist for deterministic graph construction.