Generate Testability Wrappers Generate wrapper interfaces, default implementations, and DI service registration code for untestable static dependencies. For statics that already have .NET built-in abstractions ( TimeProvider , IHttpClientFactory ), guide adoption of the built-in. For statics without built-in alternatives, generate custom minimal wrappers. When to Use After running detect-static-dependencies and identifying which statics to wrap When the user asks to make a class testable by replacing statics with injected abstractions When adopting TimeProvider (.NET 8+) or System.IO.Abstractions When creating a custom wrapper for Environment. , Console. , or Process.* When there is no DI container and the seam has to be ambient rather than injected When Not to Use The user wants to find statics first (use detect-static-dependencies ) The user wants to bulk-replace call sites (use migrate-static-to-wrapper ) The static is already behind an interface Show more Installs 818 Repository dotnet/skills GitHub Stars 5.1K First Seen Apr 13, 2026 Security Audits Gen Agent Trust Hub Pass Socket Pass Snyk Pass
generate-testability-wrappers
安装
npx skills add https://github.com/dotnet/skills --skill generate-testability-wrappers