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.
安装
npx skills add dotnet/skills --skill migrate-static-to-wrappernpx skills add dotnet/skills --skill migrate-static-to-wrapper -a claude-code -gnpx skills add dotnet/skills --skill migrate-static-to-wrapper -a codex -ggemini skills install https://github.com/dotnet/skills.git --path plugins/dotnet-test/skills/migrate-static-to-wrappergh skill install dotnet/skills migrate-static-to-wrappergit clone --depth 1 https://github.com/dotnet/skills /tmp/dotnet__skills
mkdir -p ~/.claude/skills ~/.agents/skills
cp -R /tmp/dotnet__skills/plugins/dotnet-test/skills/migrate-static-to-wrapper ~/.claude/skills/migrate-static-to-wrapper # Claude Code
cp -R /tmp/dotnet__skills/plugins/dotnet-test/skills/migrate-static-to-wrapper ~/.agents/skills/migrate-static-to-wrapper # Codex, Cursor, Gemini CLI, Copilot, OpenCode