cck-dependency-injection

Community

Prevent DI lifetime bugs in .NET apps

Authors205109
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Dependency injection misconfiguration causes subtle runtime failures, memory leaks, and stale data when service lifetimes and registrations are incorrect. This Skill helps teams diagnose lifetime mismatches, avoid captive dependencies, and choose correct registration and composition patterns so services behave reliably in production.

Core Features & Use Cases

  • Lifetime guidance: Match singleton, scoped, and transient lifetimes to avoid captured scoped services and memory leaks.
  • Composition patterns: Recommendations for keyed services, decorator pattern, factory delegates, and Scrutor convention-based registration to select implementations safely.
  • Configuration and options: Best practices for strongly-typed options, validate-on-start, and injecting configuration without leaking mutable state.
  • Use Case: Fix a bug where a singleton cache captures a scoped DbContext, implement multiple notification channels using keyed services, or refactor service registrations to follow convention-based scans.

Quick Start

Ask the AI to review your IServiceCollection registrations and identify lifetime mismatches, captive dependencies, and suggested refactorings.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: cck-dependency-injection
Download link: https://github.com/s205109/AHKFlowApp/archive/main.zip#cck-dependency-injection

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.