migrate-static-to-wrapper

migrate-static-to-wrapper is a Refactoring & code quality skill for AI agents, published by dotnet in the skills repository on GitHub. Skillspace rates migrate-static-to-wrapper D (66/100) and it passed the safety scan; the rating is based on static analysis only.

Replace existing static dependency call sites with a wrapper or built-in abstraction that already exists or is registered in DI. Codemod-style bulk replacement of DateTime.Now/UtcNow to TimeProvider, File.ReadAllText to IFileSystem, and similar, across a bounded scope (file, project, namespace), adding constructor injection to affected classes and updating their unit tests to use a test double. USE FOR: replace DateTime.UtcNow/DateTime.Now with TimeProvider and add the constructor parameter, migrate static call sites to a wrapper already in DI, bulk replace File.* with IFileSystem, scoped migration of statics in only certain files, migrate a service to TimeProvider and update its unit tests to a controllable/fake time source, update test doubles when migrating off static DateTime/File calls. DO NOT USE FOR: detecting statics (use detect-static-dependencies), creating or registering the wrapper when it does not exist yet (use generate-testability-wrappers), migrating between test…

Grade
D
Quality
66 / 100
Safety
Passed
GitHub stars
4,628

Unproven: rated by static analysis only, not yet compared head-to-head.

This rating describes the version of the repository we crawled; it may have changed since, so go by its current files.

Our review

Architecture
84 / 100
Maturity
Basic: a single SKILL.md
Security scan
No issues found
License
MIT
Adoption
Adopted by 1 other repositories, in 1 collections
Scope
Portable: works in any project. General testability refactor: static calls to injected wrappers, no repo specifics.

Not checked yet

  • Not judged on the rubric yet (not a contender in its category)
  • No blind task eval yet
  • Sibling files (scripts, references) not fetched; security scan covers SKILL.md only

Skillspace indexes and rates this skill; it does not host or endorse it. Run third-party skills at your own risk.