migrate-static-to-wrapper

Installation
SKILL.md

Migrate Static to Wrapper

Perform mechanical, codemod-style replacement of static dependency call sites with calls to injected wrapper interfaces or built-in abstractions. Operates on a bounded scope (single file, project, or namespace) so migrations can be done incrementally.

When to Use

  • After wrappers have been generated (via generate-testability-wrappers) or built-in abstractions identified
  • Migrating DateTime.UtcNowTimeProvider.GetUtcNow() across a project
  • Migrating File.*IFileSystem.File.* across a namespace
  • Adding constructor injection for the new abstraction to affected classes
  • Making a static utility class testable by adding an ambient seam (Step 3) while its existing call sites keep compiling unchanged
  • Incremental migration: one project or namespace at a time

When Not to Use

Installs
810
Repository
dotnet/skills
GitHub Stars
5.1K
First Seen
Apr 13, 2026
migrate-static-to-wrapper — dotnet/skills