dotnet:di-patterns

Community

Master dependency injection patterns in .NET

Authordimsour
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill helps developers understand and implement best practices for dependency injection in .NET applications, ensuring better maintainability and performance.

Core Features & Use Cases

  • Dependency Injection Patterns: Learn about various patterns such as Singleton, Scoped, Transient, and their appropriate use cases.
  • Iron Laws: Follow established guidelines like using Scoped for DbContext and leveraging IHttpClientFactory for HttpClient.
  • Quick Reference: Access quick references for different lifetimes and understanding captive dependencies.
  • Anti-patterns: Identify and avoid common pitfalls such as Singleton capturing Scoped instances and using IServiceProvider as a service locator.

Quick Start

Use the dotnet:di-patterns skill to review the best practices for dependency injection in your application.

Dependency Matrix

Required Modules

None required

Components

scriptsreferences

💻 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: dotnet:di-patterns
Download link: https://github.com/dimsour/dotnet-ai-toolkit/archive/main.zip#dotnet-di-patterns

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 620,000+ vetted skills library on demand.