Skip to content
M

migrate-static-to-wrapper

ALWAYS USE when asked to migrate, replace

by dotnetFree

#4338in AI Skills
0In stores

Description

Migrate Static to Wrapper is an agent skill for replacing static dependency calls in C# code with calls to injected wrapper interfaces or bu…

Highlights

  • Replaces DateTime and File calls with injected abstractions
  • Runs over one file, project or namespace at a time
  • Adds constructor injection to affected classes
  • Updates tests with fakes for the new abstraction

Ratings & Reviews

No ratings yet

Be the first to rate migrate-static-to-wrapper.

People also visit

T

testability-obstacle

MUST USE for C#/.NET deterministic tests

AI Skills
Get
C

csharp-refactoring

Safely refactors C#/.NET code without changing behavior

AI Skills
Get
M

modern-csharp-coding-standards

Write modern, high-performance C# code

AI Skills
Get
M

migrate-nullable-references

Enable nullable reference types in a C# project

AI Skills
Get
D

dotnet-best-practices

Validate .NET/C# code against comprehensive best practices for your solution

AI Skills
Get
S

safe-refactor

Restructure code while preserving behavior

AI Skills
Get

migrate-static-to-wrapper FAQ

What does this skill do?

It rewrites static calls such as DateTime.UtcNow or File.* into calls on an injected wrapper or a built-in abstraction, across a scope you choose.

How do I install it?

Run npx skills add https://github.com/dotnet/skills --skill migrate-static-to-wrapper in your project.

Is it free?

Yes. The skill page lists its pricing as Free.

Does it need other skills first?

It is meant to follow generate-testability-wrappers or come after built-in abstractions have been chosen for the calls.

What do the security audits say?

Gen Agent Trust Hub: Pass. Socket: Pass. Snyk: Pass.

What are the best migrate-static-to-wrapper alternatives?

Popular alternatives to migrate-static-to-wrapper include testability-obstacle, csharp-refactoring and modern-csharp-coding-standards. See all migrate-static-to-wrapper alternatives

Developer Stuff

Badges