Skip to content

migrate-static-to-wrapper

dotnet/skills ↗

From the author

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 classes whose callers/signatures must stay unchanged. Preserves DateTimeKind and call count. DO NOT USE for finding statics (detect-static-dependencies), choosing/designing a new wrapper (generate-testability-wrappers), behavior tests with no chosen seam (testability-obstacle), or test-framework migration.

Install

npx skills add dotnet/skills --skill migrate-static-to-wrapper -a claude-code

Installs to .claude/skills/migrate-static-to-wrapper/ · Each command fetches the skill straight from GitHub with the open skills CLI.

Download .zip

Byte-identical to the scanned commit, with the repository’s licence and a SOURCE.txt.

Want your agent to suggest skills while you type? See how to use skills from your IDE.

Safety checks on SKILL.md

No warnings.

Why 91

Security100
Provenance85
Maintenance100
Licence100
Adoption59

aiqbench computes the trust score from public signals. It is not a security audit, so read a skill before you install it.

Similar skills

Closest to this one by what they do and when they are used.

Ratings & reviews

—

no reviews

Tried this skill? Rate it to help others. Sign in

    Discussion

    Join the discussion. Sign in