managedcode/dotnet-skills/migrate-static-to-wrapper
ALWAYS USE when asked to migrate, replace, or make testable existing C# static calls with a named wrapper or built-in abstraction: DateTime.UtcNow/Now or DateTimeOffset.UtcNow to TimeProvider/IClock, File.* to IFileSystem or an existing store such as ITextFileStore, and Environment.* to an existing reader such as IEnvironmentReader. Covers scoped files/projects, constructor injection, replacing temp-file or process-environment tests with fakes, "already registered" abstractions, and static class
Agent skill · version 0.0.0-main.1794330590.g268856b · from managedcode/dotnet-skills
Install
npx yarkr-cli add skill:managedcode/dotnet-skills/migrate-static-to-wrapperWithout Node.js, on macOS and Linux (curl or wget):
curl -fsSL https://yarkr.com/install.sh | sh -s -- add skill:managedcode/dotnet-skills/migrate-static-to-wrapper
wget -qO- https://yarkr.com/install.sh | sh -s -- add skill:managedcode/dotnet-skills/migrate-static-to-wrapperOn Windows, in PowerShell:
irm https://yarkr.com/install.ps1 | iex; yarkr add skill:managedcode/dotnet-skills/migrate-static-to-wrapperWorks with Claude Code, Codex, opencode, Cursor, any harness over MCP.