[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79XAXNKVB95A61BGRH5FJHM":3,"skill-same:01M79XAXNKVB95A61BGRH5FJHM":53},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M79XAXNKVB95A61BGRH5FJHM","deniz-dotnet-general.dependency-injection-patterns",null,"Organize DI registrations using IServiceCollection extension methods. Group related services into composable Add* methods for clean Program.cs and reusable configuration in tests.","Blind-Striker\u002Fagent-skills-and-plugins","Blind-Striker","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1965259?v=4","01M79WFXTE5PH0C1VB7B54ANMN","Deniz İrgin","01M79WFXV5KZ5GST1K8G035DM5",1,"MIT","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fopencode\u002Fdeniz-dotnet-general\u002Fskills\u002Fdeniz-dotnet-general.dependency-injection-patterns\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: deniz-dotnet-general.dependency-injection-patterns\ndescription: Organize DI registrations using IServiceCollection extension\n  methods. Group related services into composable Add* methods for clean\n  Program.cs and reusable configuration in tests.\n---\n\n# Dependency Injection Patterns\n\n## When to Use This Skill\n\nUse this skill when:\n- Organizing service registrations in ASP.NET Core applications\n- Avoiding massive Program.cs\u002FStartup.cs files with hundreds of registrations\n- Making service configuration reusable between production and tests\n- Designing libraries that integrate with Microsoft.Extensions.DependencyInjection\n\n## Reference Files\n\n- [advanced-patterns.md](advanced-patterns.md): Testing with DI extensions, Akka.NET actor scope management, conditional\u002Ffactory\u002Fkeyed registration patterns\n\n---\n\n## The Problem\n\nWithout organization, Program.cs becomes unmanageable:\n\n```csharp\n\u002F\u002F BAD: 200+ lines of unorganized registrations\nvar builder = WebApplication.CreateBuilder(args);\n\nbuilder.Services.AddScoped\u003CIUserRepository, UserRepository>();\nbuilder.Services.AddScoped\u003CIOrderRepository, OrderRepository>();\nbuilder.Services.AddScoped\u003CIProductRepository, ProductRepository>();\nbuilder.Services.AddScoped\u003CIUserService, UserService>();\n\u002F\u002F ... 150 more lines ...\n```\n\nProblems: hard to find related registrations, no clear boundaries, can't reuse in tests, merge conflicts.\n\n---\n\n## The Solution: Extension Method Composition\n\nGroup related registrations into extension methods:\n\n```csharp\n\u002F\u002F GOOD: Clean, composable Program.cs\nvar builder = WebApplication.CreateBuilder(args);\n\nbuilder.Services\n    .AddUserServices()\n    .AddOrderServices()\n    .AddEmailServices()\n    .AddPaymentServices()\n    .AddValidators();\n\nvar app = builder.Build();\n```\n\n---\n\n## Extension Method Pattern\n\n### Basic Structure\n\n```csharp\nnamespace MyApp.Users;\n\npublic static class UserServiceCollectionExtensions\n{\n    public static IServiceCollection AddUserServices(this IServiceCollection services)\n    {\n        services.AddScoped\u003CIUserRepository, UserRepository>();\n        services.AddScoped\u003CIUserReadStore, UserReadStore>();\n        services.AddScoped\u003CIUserWriteStore, UserWriteStore>();\n        services.AddScoped\u003CIUserService, UserService>();\n        services.AddScoped\u003CIUserValidationService, UserValidationService>();\n\n        return services;\n    }\n}\n```\n\n### With Configuration\n\n```csharp\nnamespace MyApp.Email;\n\npublic static class EmailServiceCollectionExtensions\n{\n    public static IServiceCollection AddEmailServices(\n        this IServiceCollection services,\n        string configSectionName = \"EmailSettings\")\n    {\n        services.AddOptions\u003CEmailOptions>()\n            .BindConfiguration(configSectionName)\n            .ValidateDataAnnotations()\n            .ValidateOnStart();\n\n        services.AddSingleton\u003CIMjmlTemplateRenderer, MjmlTemplateRenderer>();\n        services.AddSingleton\u003CIEmailLinkGenerator, EmailLinkGenerator>();\n        services.AddScoped\u003CIUserEmailComposer, UserEmailComposer>();\n        services.AddScoped\u003CIEmailSender, SmtpEmailSender>();\n\n        return services;\n    }\n}\n```\n\n---\n\n## File Organization\n\nPlace extension methods near the services they register:\n\n```\nsrc\u002F\n  MyApp.Api\u002F\n    Program.cs                    # Composes all Add* methods\n  MyApp.Users\u002F\n    Services\u002F\n      UserService.cs\n    UserServiceCollectionExtensions.cs   # AddUserServices()\n  MyApp.Orders\u002F\n    OrderServiceCollectionExtensions.cs  # AddOrderServices()\n  MyApp.Email\u002F\n    EmailServiceCollectionExtensions.cs  # AddEmailServices()\n```\n\n**Convention**: `{Feature}ServiceCollectionExtensions.cs` next to the feature's services.\n\n---\n\n## Naming Conventions\n\n| Pattern | Use For |\n|---------|---------|\n| `Add{Feature}Services()` | General feature registration |\n| `Add{Feature}()` | Short form when unambiguous |\n| `Configure{Feature}()` | When primarily setting options |\n| `Use{Feature}()` | Middleware (on IApplicationBuilder) |\n\n---\n\n## Testing Benefits\n\nThe `Add*` pattern lets you **reuse production configuration in tests** and only override what's different. Works with WebApplicationFactory, Akka.Hosting.TestKit, and standalone ServiceCollection.\n\nSee [advanced-patterns.md](advanced-patterns.md) for complete testing examples.\n\n---\n\n## Layered Extensions\n\nFor larger applications, compose extensions hierarchically:\n\n```csharp\npublic static class AppServiceCollectionExtensions\n{\n    public static IServiceCollection AddAppServices(this IServiceCollection services)\n    {\n        return services\n            .AddDomainServices()\n            .AddInfrastructureServices()\n            .AddApiServices();\n    }\n}\n\npublic static class DomainServiceCollectionExtensions\n{\n    public static IServiceCollection AddDomainServices(this IServiceCollection services)\n    {\n        return services\n            .AddUserServices()\n            .AddOrderServices()\n            .AddProductServices();\n    }\n}\n```\n\n---\n\n## Akka.Hosting Integration\n\nThe same pattern works for Akka.NET actor configuration:\n\n```csharp\npublic static class OrderActorExtensions\n{\n    public static AkkaConfigurationBuilder AddOrderActors(\n        this AkkaConfigurationBuilder builder)\n    {\n        return builder\n            .WithActors((system, registry, resolver) =>\n            {\n                var orderProps = resolver.Props\u003COrderActor>();\n                var orderRef = system.ActorOf(orderProps, \"orders\");\n                registry.Register\u003COrderActor>(orderRef);\n            });\n    }\n}\n\n\u002F\u002F Usage in Program.cs\nbuilder.Services.AddAkka(\"MySystem\", (builder, sp) =>\n{\n    builder\n        .AddOrderActors()\n        .AddInventoryActors()\n        .AddNotificationActors();\n});\n```\n\nSee `akka-hosting-actor-patterns` skill for complete Akka.Hosting patterns.\n\n---\n\n## Anti-Patterns\n\n### Don't: Register Everything in Program.cs\n\n```csharp\n\u002F\u002F BAD: Massive Program.cs with 200+ lines of registrations\n```\n\n### Don't: Create Overly Generic Extensions\n\n```csharp\n\u002F\u002F BAD: Too vague, doesn't communicate what's registered\npublic static IServiceCollection AddServices(this IServiceCollection services) { ... }\n```\n\n### Don't: Hide Important Configuration\n\n```csharp\n\u002F\u002F BAD: Buried settings\npublic static IServiceCollection AddDatabase(this IServiceCollection services)\n{\n    services.AddDbContext\u003CAppDbContext>(options =>\n        options.UseSqlServer(\"hardcoded-connection-string\"));  \u002F\u002F Hidden!\n}\n\n\u002F\u002F GOOD: Accept configuration explicitly\npublic static IServiceCollection AddDatabase(\n    this IServiceCollection services,\n    string connectionString)\n{\n    services.AddDbContext\u003CAppDbContext>(options =>\n        options.UseSqlServer(connectionString));\n}\n```\n\n---\n\n## Best Practices Summary\n\n| Practice | Benefit |\n|----------|---------|\n| Group related services into `Add*` methods | Clean Program.cs, clear boundaries |\n| Place extensions near the services they register | Easy to find and maintain |\n| Return `IServiceCollection` for chaining | Fluent API |\n| Accept configuration parameters | Flexibility |\n| Use consistent naming (`Add{Feature}Services`) | Discoverability |\n| Test by reusing production extensions | Confidence, less duplication |\n\n---\n\n## Lifetime Management\n\n| Lifetime | Use When | Examples |\n|----------|----------|----------|\n| **Singleton** | Stateless, thread-safe, expensive to create | Configuration, HttpClient factories, caches |\n| **Scoped** | Stateful per-request, database contexts | DbContext, repositories, user context |\n| **Transient** | Lightweight, stateful, cheap to create | Validators, short-lived helpers |\n\n```csharp\n\u002F\u002F SINGLETON: Stateless services, shared safely\nservices.AddSingleton\u003CIMjmlTemplateRenderer, MjmlTemplateRenderer>();\n\n\u002F\u002F SCOPED: Database access, per-request state\nservices.AddScoped\u003CIUserRepository, UserRepository>();\n\n\u002F\u002F TRANSIENT: Cheap, short-lived\nservices.AddTransient\u003CCreateUserRequestValidator>();\n```\n\n**Scoped services require a scope.** ASP.NET Core creates one per HTTP request. In background services and actors, create scopes manually.\n\nSee [advanced-patterns.md](advanced-patterns.md) for actor scope management patterns.\n\n---\n\n## Common Mistakes\n\n### Injecting Scoped into Singleton\n\n```csharp\n\u002F\u002F BAD: Singleton captures scoped service - stale DbContext!\npublic class CacheService  \u002F\u002F Registered as Singleton\n{\n    private readonly IUserRepository _repo;  \u002F\u002F Scoped - captured at startup!\n}\n\n\u002F\u002F GOOD: Inject IServiceProvider, create scope per operation\npublic class CacheService\n{\n    private readonly IServiceProvider _serviceProvider;\n\n    public async Task\u003CUser> GetUserAsync(string id)\n    {\n        using var scope = _serviceProvider.CreateScope();\n        var repo = scope.ServiceProvider.GetRequiredService\u003CIUserRepository>();\n        return await repo.GetByIdAsync(id);\n    }\n}\n```\n\n### No Scope in Background Work\n\n```csharp\n\u002F\u002F BAD: No scope for scoped services\npublic class BadBackgroundService : BackgroundService\n{\n    private readonly IOrderService _orderService;  \u002F\u002F Scoped - will throw!\n}\n\n\u002F\u002F GOOD: Create scope for each unit of work\npublic class GoodBackgroundService : BackgroundService\n{\n    private readonly IServiceScopeFactory _scopeFactory;\n\n    protected override async Task ExecuteAsync(CancellationToken ct)\n    {\n        using var scope = _scopeFactory.CreateScope();\n        var orderService = scope.ServiceProvider.GetRequiredService\u003CIOrderService>();\n        \u002F\u002F ...\n    }\n}\n```\n\n---\n\n## Resources\n\n- **Microsoft.Extensions.DependencyInjection**: https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fdotnet\u002Fcore\u002Fextensions\u002Fdependency-injection\n- **Akka.Hosting**: https:\u002F\u002Fgithub.com\u002Fakkadotnet\u002FAkka.Hosting\n- **Akka.DependencyInjection**: https:\u002F\u002Fgetakka.net\u002Farticles\u002Factors\u002Fdependency-injection.html\n- **Options Pattern**: See `microsoft-extensions-configuration` skill\n","# Dependency Injection Patterns\n\n## When to Use This Skill\n\nUse this skill when:\n- Organizing service registrations in ASP.NET Core applications\n- Avoiding massive Program.cs\u002FStartup.cs files with hundreds of registrations\n- Making service configuration reusable between production and tests\n- Designing libraries that integrate with Microsoft.Extensions.DependencyInjection\n\n## Reference Files\n\n- [advanced-patterns.md](advanced-patterns.md): Testing with DI extensions, Akka.NET actor scope management, conditional\u002Ffactory\u002Fkeyed registration patterns\n\n---\n\n## The Problem\n\nWithout organization, Program.cs becomes unmanageable:\n\n```csharp\n\u002F\u002F BAD: 200+ lines of unorganized registrations\nvar builder = WebApplication.CreateBuilder(args);\n\nbuilder.Services.AddScoped\u003CIUserRepository, UserRepository>();\nbuilder.Services.AddScoped\u003CIOrderRepository, OrderRepository>();\nbuilder.Services.AddScoped\u003CIProductRepository, ProductRepository>();\nbuilder.Services.AddScoped\u003CIUserService, UserService>();\n\u002F\u002F ... 150 more lines ...\n```\n\nProblems: hard to find related registrations, no clear boundaries, can't reuse in tests, merge conflicts.\n\n---\n\n## The Solution: Extension Method Composition\n\nGroup related registrations into extension methods:\n\n```csharp\n\u002F\u002F GOOD: Clean, composable Program.cs\nvar builder = WebApplication.CreateBuilder(args);\n\nbuilder.Services\n    .AddUserServices()\n    .AddOrderServices()\n    .AddEmailServices()\n    .AddPaymentServices()\n    .AddValidators();\n\nvar app = builder.Build();\n```\n\n---\n\n## Extension Method Pattern\n\n### Basic Structure\n\n```csharp\nnamespace MyApp.Users;\n\npublic static class UserServiceCollectionExtensions\n{\n    public static IServiceCollection AddUserServices(this IServiceCollection services)\n    {\n        services.AddScoped\u003CIUserRepository, UserRepository>();\n        services.AddScoped\u003CIUserReadStore, UserReadStore>();\n        services.AddScoped\u003CIUserWriteStore, UserWriteStore>();\n        services.AddScoped\u003CIUserService, UserService>();\n        services.AddScoped\u003CIUserValidationService, UserValidationService>();\n\n        return services;\n    }\n}\n```\n\n### With Configuration\n\n```csharp\nnamespace MyApp.Email;\n\npublic static class EmailServiceCollectionExtensions\n{\n    public static IServiceCollection AddEmailServices(\n        this IServiceCollection services,\n        string configSectionName = \"EmailSettings\")\n    {\n        services.AddOptions\u003CEmailOptions>()\n            .BindConfiguration(configSectionName)\n            .ValidateDataAnnotations()\n            .ValidateOnStart();\n\n        services.AddSingleton\u003CIMjmlTemplateRenderer, MjmlTemplateRenderer>();\n        services.AddSingleton\u003CIEmailLinkGenerator, EmailLinkGenerator>();\n        services.AddScoped\u003CIUserEmailComposer, UserEmailComposer>();\n        services.AddScoped\u003CIEmailSender, SmtpEmailSender>();\n\n        return services;\n    }\n}\n```\n\n---\n\n## File Organization\n\nPlace extension methods near the services they register:\n\n```\nsrc\u002F\n  MyApp.Api\u002F\n    Program.cs                    # Composes all Add* methods\n  MyApp.Users\u002F\n    Services\u002F\n      UserService.cs\n    UserServiceCollectionExtensions.cs   # AddUserServices()\n  MyApp.Orders\u002F\n    OrderServiceCollectionExtensions.cs  # AddOrderServices()\n  MyApp.Email\u002F\n    EmailServiceCollectionExtensions.cs  # AddEmailServices()\n```\n\n**Convention**: `{Feature}ServiceCollectionExtensions.cs` next to the feature's services.\n\n---\n\n## Naming Conventions\n\n| Pattern | Use For |\n|---------|---------|\n| `Add{Feature}Services()` | General feature registration |\n| `Add{Feature}()` | Short form when unambiguous |\n| `Configure{Feature}()` | When primarily setting options |\n| `Use{Feature}()` | Middleware (on IApplicationBuilder) |\n\n---\n\n## Testing Benefits\n\nThe `Add*` pattern lets you **reuse production configuration in tests** and only override what's different. Works with WebApplicationFactory, Akka.Hosting.TestKit, and standalone ServiceCollection.\n\nSee [advanced-patterns.md](advanced-patterns.md) for complete testing examples.\n\n---\n\n## Layered Extensions\n\nFor larger applications, compose extensions hierarchically:\n\n```csharp\npublic static class AppServiceCollectionExtensions\n{\n    public static IServiceCollection AddAppServices(this IServiceCollection services)\n    {\n        return services\n            .AddDomainServices()\n            .AddInfrastructureServices()\n            .AddApiServices();\n    }\n}\n\npublic static class DomainServiceCollectionExtensions\n{\n    public static IServiceCollection AddDomainServices(this IServiceCollection services)\n    {\n        return services\n            .AddUserServices()\n            .AddOrderServices()\n            .AddProductServices();\n    }\n}\n```\n\n---\n\n## Akka.Hosting Integration\n\nThe same pattern works for Akka.NET actor configuration:\n\n```csharp\npublic static class OrderActorExtensions\n{\n    public static AkkaConfigurationBuilder AddOrderActors(\n        this AkkaConfigurationBuilder builder)\n    {\n        return builder\n            .WithActors((system, registry, resolver) =>\n            {\n                var orderProps = resolver.Props\u003COrderActor>();\n                var orderRef = system.ActorOf(orderProps, \"orders\");\n                registry.Register\u003COrderActor>(orderRef);\n            });\n    }\n}\n\n\u002F\u002F Usage in Program.cs\nbuilder.Services.AddAkka(\"MySystem\", (builder, sp) =>\n{\n    builder\n        .AddOrderActors()\n        .AddInventoryActors()\n        .AddNotificationActors();\n});\n```\n\nSee `akka-hosting-actor-patterns` skill for complete Akka.Hosting patterns.\n\n---\n\n## Anti-Patterns\n\n### Don't: Register Everything in Program.cs\n\n```csharp\n\u002F\u002F BAD: Massive Program.cs with 200+ lines of registrations\n```\n\n### Don't: Create Overly Generic Extensions\n\n```csharp\n\u002F\u002F BAD: Too vague, doesn't communicate what's registered\npublic static IServiceCollection AddServices(this IServiceCollection services) { ... }\n```\n\n### Don't: Hide Important Configuration\n\n```csharp\n\u002F\u002F BAD: Buried settings\npublic static IServiceCollection AddDatabase(this IServiceCollection services)\n{\n    services.AddDbContext\u003CAppDbContext>(options =>\n        options.UseSqlServer(\"hardcoded-connection-string\"));  \u002F\u002F Hidden!\n}\n\n\u002F\u002F GOOD: Accept configuration explicitly\npublic static IServiceCollection AddDatabase(\n    this IServiceCollection services,\n    string connectionString)\n{\n    services.AddDbContext\u003CAppDbContext>(options =>\n        options.UseSqlServer(connectionString));\n}\n```\n\n---\n\n## Best Practices Summary\n\n| Practice | Benefit |\n|----------|---------|\n| Group related services into `Add*` methods | Clean Program.cs, clear boundaries |\n| Place extensions near the services they register | Easy to find and maintain |\n| Return `IServiceCollection` for chaining | Fluent API |\n| Accept configuration parameters | Flexibility |\n| Use consistent naming (`Add{Feature}Services`) | Discoverability |\n| Test by reusing production extensions | Confidence, less duplication |\n\n---\n\n## Lifetime Management\n\n| Lifetime | Use When | Examples |\n|----------|----------|----------|\n| **Singleton** | Stateless, thread-safe, expensive to create | Configuration, HttpClient factories, caches |\n| **Scoped** | Stateful per-request, database contexts | DbContext, repositories, user context |\n| **Transient** | Lightweight, stateful, cheap to create | Validators, short-lived helpers |\n\n```csharp\n\u002F\u002F SINGLETON: Stateless services, shared safely\nservices.AddSingleton\u003CIMjmlTemplateRenderer, MjmlTemplateRenderer>();\n\n\u002F\u002F SCOPED: Database access, per-request state\nservices.AddScoped\u003CIUserRepository, UserRepository>();\n\n\u002F\u002F TRANSIENT: Cheap, short-lived\nservices.AddTransient\u003CCreateUserRequestValidator>();\n```\n\n**Scoped services require a scope.** ASP.NET Core creates one per HTTP request. In background services and actors, create scopes manually.\n\nSee [advanced-patterns.md](advanced-patterns.md) for actor scope management patterns.\n\n---\n\n## Common Mistakes\n\n### Injecting Scoped into Singleton\n\n```csharp\n\u002F\u002F BAD: Singleton captures scoped service - stale DbContext!\npublic class CacheService  \u002F\u002F Registered as Singleton\n{\n    private readonly IUserRepository _repo;  \u002F\u002F Scoped - captured at startup!\n}\n\n\u002F\u002F GOOD: Inject IServiceProvider, create scope per operation\npublic class CacheService\n{\n    private readonly IServiceProvider _serviceProvider;\n\n    public async Task\u003CUser> GetUserAsync(string id)\n    {\n        using var scope = _serviceProvider.CreateScope();\n        var repo = scope.ServiceProvider.GetRequiredService\u003CIUserRepository>();\n        return await repo.GetByIdAsync(id);\n    }\n}\n```\n\n### No Scope in Background Work\n\n```csharp\n\u002F\u002F BAD: No scope for scoped services\npublic class BadBackgroundService : BackgroundService\n{\n    private readonly IOrderService _orderService;  \u002F\u002F Scoped - will throw!\n}\n\n\u002F\u002F GOOD: Create scope for each unit of work\npublic class GoodBackgroundService : BackgroundService\n{\n    private readonly IServiceScopeFactory _scopeFactory;\n\n    protected override async Task ExecuteAsync(CancellationToken ct)\n    {\n        using var scope = _scopeFactory.CreateScope();\n        var orderService = scope.ServiceProvider.GetRequiredService\u003CIOrderService>();\n        \u002F\u002F ...\n    }\n}\n```\n\n---\n\n## Resources\n\n- **Microsoft.Extensions.DependencyInjection**: https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fdotnet\u002Fcore\u002Fextensions\u002Fdependency-injection\n- **Akka.Hosting**: https:\u002F\u002Fgithub.com\u002Fakkadotnet\u002FAkka.Hosting\n- **Akka.DependencyInjection**: https:\u002F\u002Fgetakka.net\u002Farticles\u002Factors\u002Fdependency-injection.html\n- **Options Pattern**: See `microsoft-extensions-configuration` skill\n",{"name":5,"description":7},"master","b30b1c1908dbc56a8184128f18803053d762ccb5","opencode\u002Fdeniz-dotnet-general\u002Fskills\u002Fdeniz-dotnet-general.dependency-injection-patterns",0,"https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins","https:\u002F\u002Fgithub.com\u002FBlind-Striker","denizirgin.com","VP of Engineering - \r\n@armutcom @homeruntech @prontopro\r\n |  Speaker \r\n@CodeFiction\r\n, http:\u002F\u002Fcodefiction.tech | Developer, gamer, blogger, maiden iron fan","2026-11-13 00:23:18",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add Blind-Striker\u002Fagent-skills-and-plugins --skill deniz-dotnet-general.dependency-injection-patterns",{"tool":39,"command":40},"bunx","bunx skills add Blind-Striker\u002Fagent-skills-and-plugins --skill deniz-dotnet-general.dependency-injection-patterns",{"tool":42,"command":43},"pnpm","pnpm dlx skills add Blind-Striker\u002Fagent-skills-and-plugins --skill deniz-dotnet-general.dependency-injection-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fopencode\u002Fdeniz-dotnet-general\u002Fskills\u002Fdeniz-dotnet-general.dependency-injection-patterns\u002FSKILL.md",true,[47],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"advanced-patterns.md","REFERENCE","参考文档",7332,"https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fopencode\u002Fdeniz-dotnet-general\u002Fskills\u002Fdeniz-dotnet-general.dependency-injection-patterns\u002Fadvanced-patterns.md",[54,61,68,75,82,89],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M79YGWBJ52PHMSTKJ3RJ3AWR","writing-tunit-tests","Write tests in TUnit — the attributes, the async assertion model, data-driven cases, lifecycle hooks, and the parallelism rules. USE FOR writing or fixing a test in a TUnit project, translating a test idea into TUnit syntax, or reviewing TUnit test code for API mistakes. DO NOT USE FOR deciding what to test, judging whether a test is any good, or running tests.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-dotnet-general\u002Fwriting-tunit-tests\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M79YGR3Y9RCRS6TD71D0KKP8","dotnet-walls","Walls for a .NET change in a repository without its own quality gates — pinned, ephemeral analyzer, format, clone and scanner commands for the verify step, their identity ratchet, and the build traps. Use during a walls preflight, or when a worker's verify step needs .NET quality gates.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-dotnet-general\u002Fdotnet-walls\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M79YGFNJBST7D803NQW3SBYM","csharp-15","Write, review and modernize C# 15 (.NET 11) code correctly. Covers every C# 15 feature - collection expression arguments (`[with(...), ...]`), union types (`union`, `[Union]`, `IUnion`, custom unions), closed class hierarchies (`closed`), extension indexers, labeled `break`\u002F`continue`, non-virtual static interface members on runtimes without default interface methods, and the preview memory-safety model (`unsafe(expr)`, `safe`, requires-unsafe members). Use when code targets net11.0 or LangVersion 15\u002Fpreview, when the user mentions any of these features, when replacing marker interfaces, OneOf-style results, `goto`\u002Fflag loop exits or capacity\u002Fcomparer boilerplate, or when the build reports CS8121, CS8509, CS8655, CS8510, CS0121\u002FCS0411 on a `with(...)` element, CS9370, CS9380 or CS9363.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-dotnet-general\u002Fcsharp-15\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M79YGAV031473HSX6FN87ENH","verified-waves","Run one task as verified multi-agent waves. Plans the fan-out, sends findings to fresh skeptics, keeps a ledger, and reports N of M done; small tasks stay solo.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-coordination\u002Fverified-waves\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M79YG6QXNND4WRPP3GATSY8J","harness","The bundled dispatch harness, which runs a task file on worker models through OpenCode or Codex, fences their writes, escalates their asks to the operator, settles each result from git and its verify commands, and records every step in a ledger. Its commands, task file, modes and write fence, configuration, runs and their recovery, ledger and exit codes.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-coordination\u002Fharness\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M79YG2P5S91SDTA5912XJ4FV","delegating-to-worker-models","Use when you hand off implementation, a plan, research a decision will rely on, or a review, and you brief the worker and check what comes back. A subagent that searches, reads in parallel, or keeps your context small is ordinary tool use. Covers what stays with you, the mechanism, assigning work by strength, the walls preflight, prompts without contradictions, the worker contract and model profiles, evidence from your own run, review, and the fix-up loop.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-coordination\u002Fdelegating-to-worker-models\u002FSKILL.md",[],[]]