migrate-static-to-wrapper - Migrate C# static calls to injected wrappers
Mechanically replaces scoped C# static dependency calls with existing injected wrappers or built-in abstractions while preserving call behavior.
Tags
Updated: 2026-10-07Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Verify existing abstractions
- Discover in-scope C# files
- Replace static dependency calls
- Add constructor injection
- Add ambient seams
- Update affected tests
- Preserve DateTimeKind
- Preserve call counts
- Inspect and validate diffs
Inputs
- C# workspace
- Migration request
- Static dependency pattern
- Replacement abstraction
- Migration scope
- Injection strategy
Outputs
- Modified C# source files
- Updated affected tests
- Validation results
- Prerequisite or scope reports
Requirements
- Accessible C# workspace
- Existing wrapper or built-in abstraction
- Production composition or registration
- .NET 8+ or Microsoft.Bcl.TimeProvider for TimeProvider
- System.IO.Abstractions package for file abstractions
