GitVersion .NET Development
GitTools/GitVersion
Gives repository-specific .NET guidance for GitVersion: build and test commands, central package management, project layout and coding conventions.
Dependency injection patterns for .NET 10. An agent skill from codewithmukesh/dotnet-claude-kit.
$ npx skills add codewithmukesh/dotnet-claude-kit --skill dependency-injection -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install codewithmukesh/dotnet-claude-kit dependency-injection --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/dependency-injection .claude/skills/dependency-injection && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "dependency-injection" agent skill from https://github.com/codewithmukesh/dotnet-claude-kit/tree/main/skills/dependency-injection into .claude/skills/dependency-injection/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dependency-injection", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/codewithmukesh/dotnet-claude-kit/tree/main/skills/dependency-injectionType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add codewithmukesh/dotnet-claude-kit --skill dependency-injection -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install codewithmukesh/dotnet-claude-kit dependency-injection --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/dependency-injection .agents/skills/dependency-injection && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "dependency-injection" agent skill from https://github.com/codewithmukesh/dotnet-claude-kit/tree/main/skills/dependency-injection into .agents/skills/dependency-injection/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dependency-injection", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add codewithmukesh/dotnet-claude-kit --skill dependency-injection -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install codewithmukesh/dotnet-claude-kit dependency-injection --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/dependency-injection .cursor/skills/dependency-injection && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "dependency-injection" agent skill from https://github.com/codewithmukesh/dotnet-claude-kit/tree/main/skills/dependency-injection into .cursor/skills/dependency-injection/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dependency-injection", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/codewithmukesh/dotnet-claude-kit.git --path skills/dependency-injection--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add codewithmukesh/dotnet-claude-kit --skill dependency-injection -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install codewithmukesh/dotnet-claude-kit dependency-injection --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/dependency-injection .gemini/skills/dependency-injection && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "dependency-injection" agent skill from https://github.com/codewithmukesh/dotnet-claude-kit/tree/main/skills/dependency-injection into .gemini/skills/dependency-injection/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dependency-injection", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install codewithmukesh/dotnet-claude-kit dependency-injectionInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add codewithmukesh/dotnet-claude-kit --skill dependency-injection -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/dependency-injection .github/skills/dependency-injection && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "dependency-injection" agent skill from https://github.com/codewithmukesh/dotnet-claude-kit/tree/main/skills/dependency-injection into .github/skills/dependency-injection/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dependency-injection", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add codewithmukesh/dotnet-claude-kit --skill dependency-injection -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install codewithmukesh/dotnet-claude-kit dependency-injection --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/dependency-injection .opencode/skills/dependency-injection && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "dependency-injection" agent skill from https://github.com/codewithmukesh/dotnet-claude-kit/tree/main/skills/dependency-injection into .opencode/skills/dependency-injection/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "dependency-injection", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
dependency-injectionDependency injection patterns for .NET 10. An agent skill from codewithmukesh/dotnet-claude-kit.
Dependency Injection is an agent skill from codewithmukesh/dotnet-claude-kit. Dependency injection patterns for .NET 10. Covers service lifetimes, keyed services, the decorator pattern, factory pattern, and common DI pitfalls. Load this skill when registering services, resolving lifetime issues, designing service composition, or when the user mentions "DI", "dependency injection", "service registration", "AddScoped", "AddTransient", "AddSingleton", "keyed services", "decorator", "Scrutor", "IServiceCollection", or "captive dependency".
Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Development, covering Design patterns. It works with .NET. The repository describes itself as: Make Claude Code a .NET 10 Expert. The licence is MIT.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 2330089. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are csharp).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Dependency Injection loads about 1.5k tokens when it runs. Until then it costs about 121 tokens; SKILL.md has 179 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from codewithmukesh/dotnet-claude-kit at commit 2330089, republished under its MIT licence (© codewithmukesh). 179 words, ~1,549 tokens.
.claude/skills/dependency-injection/SKILL.md (or your agent's skills folder).services.AddScoped<IOrderService, OrderService>(), not the concrete type.Use keyed services to register and resolve multiple implementations of the same interface.
// Registration
builder.Services.AddKeyedScoped<INotificationService, EmailNotificationService>("email");
builder.Services.AddKeyedScoped<INotificationService, SmsNotificationService>("sms");
builder.Services.AddKeyedScoped<INotificationService, PushNotificationService>("push");
// Resolution via attribute
public class OrderHandler([FromKeyedServices("email")] INotificationService notifier)
{
public async Task Handle(CreateOrder.Command command, CancellationToken ct)
{
// ... create order
await notifier.SendAsync(notification, ct);
}
}
// Resolution via IServiceProvider
public class NotificationRouter(IServiceProvider provider)
{
public INotificationService GetService(string channel)
{
return provider.GetRequiredKeyedService<INotificationService>(channel);
}
}// Base service
public interface IOrderService
{
Task<Result<Order>> CreateAsync(CreateOrderRequest request, CancellationToken ct);
}
public class OrderService(AppDbContext db, TimeProvider clock) : IOrderService
{
public async Task<Result<Order>> CreateAsync(CreateOrderRequest request, CancellationToken ct)
{
var order = Order.Create(request, clock.GetUtcNow());
db.Orders.Add(order);
await db.SaveChangesAsync(ct);
return Result.Success(order);
}
}
// Decorator — adds logging
public class LoggingOrderService(IOrderService inner, ILogger<LoggingOrderService> logger) : IOrderService
{
public async Task<Result<Order>> CreateAsync(CreateOrderRequest request, CancellationToken ct)
{
logger.LogInformation("Creating order for customer {CustomerId}", request.CustomerId);
var result = await inner.CreateAsync(request, ct);
if (result.IsSuccess)
logger.LogInformation("Order {OrderId} created", result.Value.Id);
return result;
}
}
// Registration with Scrutor
builder.Services.AddScoped<IOrderService, OrderService>();
builder.Services.Decorate<IOrderService, LoggingOrderService>();// Auto-register all services matching a convention
builder.Services.Scan(scan => scan
.FromAssemblyOf<Program>()
.AddClasses(classes => classes.AssignableTo<ITransientService>())
.AsImplementedInterfaces()
.WithTransientLifetime()
.AddClasses(classes => classes.AssignableTo<IScopedService>())
.AsImplementedInterfaces()
.WithScopedLifetime());When you need runtime logic to select an implementation.
builder.Services.AddScoped<IPaymentProcessor>(sp =>
{
var config = sp.GetRequiredService<IOptions<PaymentOptions>>().Value;
return config.Provider switch
{
"stripe" => ActivatorUtilities.CreateInstance<StripeProcessor>(sp),
"paypal" => ActivatorUtilities.CreateInstance<PayPalProcessor>(sp),
_ => throw new InvalidOperationException($"Unknown payment provider: {config.Provider}")
};
});// Bind configuration section to a strongly-typed options class
builder.Services.AddOptions<JwtOptions>()
.BindConfiguration("Jwt")
.ValidateDataAnnotations()
.ValidateOnStart();
// Inject as IOptions<T>
public class TokenService(IOptions<JwtOptions> options)
{
private readonly JwtOptions _jwt = options.Value;
}// BAD — DbContext is scoped, captured by singleton = memory leak + stale data
builder.Services.AddSingleton<OrderCache>(); // depends on AppDbContext
// GOOD — use IServiceScopeFactory in singleton
public class OrderCache(IServiceScopeFactory scopeFactory)
{
public async Task<Order?> GetAsync(Guid id)
{
await using var scope = scopeFactory.CreateAsyncScope();
var db = scope.ServiceProvider.GetRequiredService<AppDbContext>();
return await db.Orders.FindAsync(id);
}
}// BAD — making a service singleton when it holds mutable state
builder.Services.AddSingleton<OrderService>(); // has DbContext dependency
// GOOD — match the lifetime to the service's needs
builder.Services.AddScoped<OrderService>();| Scenario | Recommendation |
|---|---|
| Stateless service | Scoped (default) or Transient |
| Configuration / cache | Singleton |
| DbContext | Scoped (registered by AddDbContext) |
| Multiple implementations | Keyed services (strategy pattern) |
| Cross-cutting behavior | Decorator pattern |
| Convention-based registration | Scrutor |
| Runtime implementation selection | Factory delegate |
| Audit existing registrations | get_di_registrations MCP tool — lifetimes, duplicates, captive-dependency risks in one call |
| Strongly-typed config | AddOptions<T>().BindConfiguration() |
© codewithmukesh, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/dependency-injection of codewithmukesh/dotnet-claude-kit.
Open the folder on GitHubat commit 2330089
We found 4 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in codewithmukesh/dotnet-claude-kit, which our catalogue first saw on October 7, 2026.
Dependency Injection next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Dependency Injection this skillcodewithmukesh/dotnet-claude-kit | 751 | 1 repos | ~1.5k | Automated safety check: Pass | MIT | |
| GitVersion .NET DevelopmentGitTools/GitVersion | 3.1k | — | ~1.7k | Automated safety check: Pass | MIT | |
| Akka.Hosting Actor PatternsAaronontheweb/dotnet-skills | 1.2k | 1 repos | ~5k | Automated safety check: Pass | MIT | |
| Clean Architecture DotnetSebastienDegodez/copilot-instructions | 197 | — | ~5.1k | Automated safety check: Pass | Apache-2.0 | |
| Dotnet Patternsaffaan-m/ECC | 274k | 1 repos | ~2.3k | Automated safety check: Pass | MIT | |
| Dotnet Best Practicesgithub/awesome-copilot | 40k | 3 repos | ~808 | Automated safety check: Pass | MIT |
GitTools/GitVersion
Gives repository-specific .NET guidance for GitVersion: build and test commands, central package management, project layout and coding conventions.
Aaronontheweb/dotnet-skills
Shows how to build entity actors with Akka.Hosting so the same code runs in local unit tests and in a sharded cluster in production.
SebastienDegodez/copilot-instructions
A skill your agent uses when domain logic leaks into API/Infrastructure, project references violate layer boundaries, or you need to decide between CQS (always), CQRS bus (complex domains), and DDD…
affaan-m/ECC
Idiomatic C and .NET patterns, conventions, dependency injection, async/await, and best practices for building robust, maintainable .NET applications.
github/awesome-copilot
Ensure .NET/C code meets best practices for the solution/project.
github/awesome-copilot
Review the C/.NET code for design pattern implementation and suggest improvements.
codewithmukesh/dotnet-claude-kit
API versioning strategies for ASP.NET Core. An agent skill from codewithmukesh/dotnet-claude-kit.
codewithmukesh/dotnet-claude-kit
Architecture-aware feature scaffolding for .NET 10 projects.
codewithmukesh/dotnet-claude-kit
Architecture selection advisor for .NET applications. An agent skill from codewithmukesh/dotnet-claude-kit.
codewithmukesh/dotnet-claude-kit
.NET Aspire for cloud-native orchestration. An agent skill from codewithmukesh/dotnet-claude-kit.
codewithmukesh/dotnet-claude-kit
Authentication and authorization for ASP.NET Core. An agent skill from codewithmukesh/dotnet-claude-kit.
codewithmukesh/dotnet-claude-kit
Caching strategies for .NET 10 applications. An agent skill from codewithmukesh/dotnet-claude-kit.
Works with
Categories
Dependency injection patterns for .NET 10. An agent skill from codewithmukesh/dotnet-claude-kit. Dependency Injection is an agent skill from codewithmukesh/dotnet-claude-kit.NET 10.
Dependency Injection fits situations like: dependency injection; service registration; IServiceCollection; captive dependency.
Run `npx skills add codewithmukesh/dotnet-claude-kit --skill dependency-injection -a claude-code`. Or copy the skill folder (skills/dependency-injection in codewithmukesh/dotnet-claude-kit) into .claude/skills/dependency-injection in your project. Claude Code loads it when a task matches its description.
Run `npx skills add codewithmukesh/dotnet-claude-kit --skill dependency-injection -a codex`. Or copy the skill folder (skills/dependency-injection in codewithmukesh/dotnet-claude-kit) into .agents/skills/dependency-injection in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add codewithmukesh/dotnet-claude-kit --skill dependency-injection -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dependency-injection, .gemini/skills/dependency-injection, .github/skills/dependency-injection and .opencode/skills/dependency-injection in your project.
SKILL.md names no scripts, command-line tools or credentials: Dependency Injection is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Dependency Injection is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.5k tokens (SKILL.md is roughly 6.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Dependency Injection: GitVersion .NET Development (GitTools/GitVersion, 3.1k stars), Akka.Hosting Actor Patterns (Aaronontheweb/dotnet-skills, 1.2k stars), Clean Architecture Dotnet (SebastienDegodez/copilot-instructions, 197 stars) and Dotnet Patterns (affaan-m/ECC, 274k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
codewithmukesh (a GitHub organization) maintains it in codewithmukesh/dotnet-claude-kit, which has 751 GitHub stars. The repository holds 47 skills in this directory. The repository was last updated on August 7, 2026.
Source: codewithmukesh/dotnet-claude-kit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.