microsoft-extensions

Featured

Use the Microsoft.Extensions stack correctly across Generic Host, dependency injection, configuration, logging, options, HttpClientFactory, and other shared infrastructure patterns. USE FOR: wiring dependency injection, configuration, logging, or options; introducing Generic Host patterns into non-web .NET apps; cleaning up service registration, typed HTTP. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.

DevOps & Infrastructure 463 stars 35 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 94/100

Stars 20%
89
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Microsoft.Extensions for .NET ## Trigger On - wiring dependency injection, configuration, logging, or options - introducing Generic Host patterns into non-web .NET apps - cleaning up service registration, typed HTTP clients, or shared infrastructure code ## Workflow 1. Prefer the Generic Host for apps that need configuration, DI, logging, hosted services, or coordinated startup. 2. Keep service registration predictable: composition at the edge, concrete implementations hidden behind interfaces only where that abstraction buys flexibility. 3. Use options binding for structured configuration and validate configuration at startup when bad settings would fail later at runtime. 4. Prefer `IHttpClientFactory` and typed or named clients for outbound HTTP instead of ad-hoc singleton or per-call `HttpClient` usage. 5. Use logging categories and config-driven log levels rather than scattered ad-hoc logging behavior. 6. For Kubernetes-hosted services, prefer the stable `Microsoft.Extensions.Diagnostics.ResourceMonitoring.Kubernetes` package from the 10.7+ line when CPU/memory request and limit metrics should come from pod resource quotas. 7. Avoid building mini-frameworks over Microsoft.Extensions unless the repo genuinely needs reusable composition primitives. ## Current Upstream Notes - `dotnet/extensions` `v10.8.1` is an AI-library servicing release for approval-resume ordering and stateless reasoning state; it does not change the Generic Host, dependency injection, configura...

Details

Author
managedcode
Repository
managedcode/dotnet-skills
Created
4 months ago
Last Updated
2 days ago
Language
C#
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

microsoft-extensions-ai

Build provider-agnostic .NET AI integrations with `Microsoft.Extensions.AI`, `IChatClient`, embeddings, middleware, structured output, vector search, and evaluation. USE FOR: building or reviewing .NET code that uses Microsoft.Extensions.AI, Microsoft.Extensions.AI.Abstractions, IChatClient, IEmbeddingGenerator, ChatOptions, or AIFunction;. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.

463 Updated 2 days ago
managedcode
AI & Automation Listed

csharp-dotnet-expert

Use when writing, reviewing, or upgrading a C# / .NET application on .NET 8 or .NET 9 (with awareness of .NET 10 LTS). Covers ASP.NET Core minimal APIs and MVC, EF Core 9, dependency injection, `IOptions<T>` configuration, structured logging with `ILogger<T>` and Serilog, OpenTelemetry, Polly resilience, MediatR, FluentValidation, xUnit plus WebApplicationFactory plus Testcontainers, source generators, Native AOT, and modern C# (records, primary constructors, pattern matching, collection expressions, `IAsyncEnumerable`, `Span<T>`). Triggers: C#, csharp, .NET, dotnet, ASP.NET Core, minimal API, record, primary constructor, pattern match, EF Core, Entity Framework, NuGet, Serilog, OpenTelemetry, AOT, xUnit, NUnit, Moq, Polly, MediatR, `Memory`. Produces minimal API endpoints, EF Core DbContexts, migrations, hosted services. Not for language agnostic API contract design across services, see senior-backend-engineer.

0 Updated 1 weeks ago
iamdemetris
Code & Development Featured

aspnet-core

Build, debug, modernize, or review ASP.NET Core applications with correct hosting, middleware, security, configuration, logging, and deployment patterns on current .NET. USE FOR: working on ASP.NET Core apps, services, or middleware; changing auth, routing, configuration, hosting, or deployment behavior; deciding between ASP.NET Core sub-stacks. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.

463 Updated 2 days ago
managedcode