Guides .NET dependency injection wiring with correct lifetimes, options pattern, constructor injection, and debugging captive-dependency/disposal bugs.
The container's job is assembling object graphs with declared lifetimes. The three bugs that matter are all lifetime bugs: captive dependencies, disposed-too-early services, and state accidentally shared across requests.
ValidateScopes and ValidateOnBuild on).
Where a singleton legitimately needs per-operation dependencies,
inject IServiceScopeFactory and create a scope per operation:
the pattern for hosted/background services processing items
(see background-jobs).GetService calls sprinkled through business logic hide the
graph and defeat compile-time reasoning; tolerate the provider
only at composition roots, factories, and scope-creating
boundaries. If a constructor takes eight services, the class has
eight jobs (see function-size instincts at class scale,
coupling-analysis).IOptions<T>
for static config, IOptionsMonitor<T> where reload matters;
validated at startup
(ValidateDataAnnotations().ValidateOnStart()) so a bad setting
fails deploy, not the 3am request (see config-management,
spring-boot-discipline's typed-properties twin). Inject the
options type, not IConfiguration, so consumers state what they
need.IDisposables are disposed with their scope: do not
dispose injected services yourself. Anything you create manually
(via factory or ActivatorUtilities) you dispose. HttpClient
goes through IHttpClientFactory (typed clients), which manages
handler lifetimes and socket exhaustion for you (see
connection-pooling).services.AddBilling(config)); prefer explicit registrations
over assembly-scanning magic for anything with a lifetime
subtlety. Integration tests swap edges (fakes for external
APIs) via the test host's ConfigureTestServices, not by
re-architecting for the container (see test-doubles,
integration-testing).ServiceLocator.Current, static singletons)
beside a container gives the worst of both worlds; migrate it or
quarantine it behind an injected abstraction.What SKILL.md sets; muted values are Claude Code's defaults
Not loaded · from ai-skills-commands
Claude Code won't load this skill
It ships in ai-skills-commands at skills/, but Claude Code only loads skills/<name>/SKILL.md and folders listed under skills in plugin.json. Installing the plugin doesn't add it.
npx claudepluginhub amey-thakur/ai-skills --plugin ai-skills-commands1,000 skills in this plugin
/ab-test-designDesign product experiments with real hypotheses, honest sample-size math, guardrails, and peeking discipline. Use when validating a change by experiment or reviewing a test before believing its result./accessibility-reviewAudit a UI for real accessibility, keyboard-first, with concrete failures and fixes rather than checkbox compliance. Use when reviewing or building any user interface./accessibility-specialist-roleOperate as an accessibility specialist who audits against WCAG, trains teams to stop shipping the same defects, and owns the compliance sign-off. Use when a product needs to be usable with a keyboard, a screen reader, or magnification and someone must certify it before launch.Other plugins' skills for the same job