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 targe
SkillScore95Maintained
Automatic
◆Coding pack
Last verified 8/19/2026
What it changes
Passed 21 of 22 test cases with the skill, and 19 of 22 without it.
Without skill86%
With skill95%
Checks it passed that the model alone missed
Includes startup configuration validation via ValidateOnStart or ValidateDataAnnotations.
Wires up resource monitoring using AddKubernetesResourceMonitoring on the IServiceCollection.
Recommends Microsoft.Extensions.Diagnostics.ResourceMonitoring.Kubernetes for pod quota monitoring.
2 fixed19 passed either way1 still failing0 broke
Pass-rate lift
+9 pp
Tokens
+1%
Agent turns
0%
Response time
-24%
Model gemini-3.6-flashMeasured 8/19/2026v321 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 2 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 2
Prompt
Our .NET microservices are deployed on Kubernetes, and we want CPU and memory telemetry to accurately reflect pod resource quotas and limits. Can you show me how to wire up resource monitoring telemetry in our startup host code so it integrates seamlessly with the .NET runtime infrastructure?
What was checked, without and with the skill
Checked
Without skill
With skill
Recommends Microsoft.Extensions.Diagnostics.ResourceMonitoring.Kubernetes for pod quota monitoring.
Missed
Passed
Wires up resource monitoring using AddKubernetesResourceMonitoring on the IServiceCollection.
Missed
Passed
case-01 · gemini-3.6-flash · 8/19/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md42 lines3 files
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
Prefer the Generic Host for apps that need configuration, DI, logging, hosted services, or coordinated startup.
Keep service registration predictable: composition at the edge, concrete implementations hidden behind interfaces only where that abstraction buys flexibility.
Use options binding for structured configuration and validate configuration at startup when bad settings would fail later at runtime.
Prefer IHttpClientFactory and typed or named clients for outbound HTTP instead of ad-hoc singleton or per-call HttpClient usage.
Use logging categories and config-driven log levels rather than scattered ad-hoc logging behavior.
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.
Avoid building mini-frameworks over Microsoft.Extensions unless the repo genuinely needs reusable composition primitives.
Current Upstream Notes
dotnet/extensionsv10.9.0 adds experimental AI routing and failover clients and includes HTTP diagnostics/source-logging fixes. Generic Host, dependency injection, configuration, logging, options, and IHttpClientFactory patterns remain unchanged; route AI-specific architecture to microsoft-extensions-ai.
The MCP server project template moved out of dotnet/extensions and into the ASP.NET Core/.NET SDK distribution. Update scaffolding automation to use the SDK-provided template instead of pinning the removed extensions template package.
If repository automation creates AI templates from the prior v10.8.4 change, pass --provider azureopenai, --provider ollama, or --provider openai explicitly and validate the selected provider's secrets and local-development path.
Keep Microsoft.Extensions package versions aligned within the repo's selected servicing line, then rerun host startup and options-validation tests after upgrading.
Deliver
clean host wiring and service registration
configuration and logging that are observable and testable
infrastructure code that fits naturally with the .NET stack
Validate
service lifetimes are correct
configuration is strongly typed where it matters
host setup remains easy to debug and reason about
Kubernetes resource monitoring uses the stable quota-provider APIs when pod request/limit dimensions matter
Fix build errors and breaking changes after upgrading MSTest from v3 to v4, or plan a complete MSTest v3-to-v4 migration. Use when user says "upgrade to MSTest v4", "MSTest 4 migration", "MSTest v4 breaking changes", "tests don't compile after upgrading MSTest", or has errors CS0507, CS0103, CS1061, CS1615 after updating MSTest packages from 3.x to 4.x. USE FOR: Execute to ExecuteAsync, CallerInfo constructor on TestMethodAttribute, sealed custom attributes, ClassCleanupBehavior removal, TestCon