migrate-static-to-wrapper

Community

Refactor static calls into injectable abstractions

Author1k-off
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Replacing hard-coded static dependency calls (like DateTime or File APIs) is difficult to test and reason about, so this Skill converts them into injected wrappers or built-in abstractions.

Core Features & Use Cases

  • Time abstraction migration: Convert DateTime.Now / UtcNow / Today / DateTimeOffset.UtcNow into TimeProvider calls suitable for deterministic testing.
  • I/O abstraction migration: Convert File.* and Directory.* calls to IFileSystem equivalents for safer, mockable filesystem access.
  • DI + call-site refactor: Add constructor injection for the new dependency, update DI registration expectations, and mechanically replace call sites within a bounded scope.

Quick Start

Ask the AI to migrate DateTime.UtcNow to TimeProvider.GetUtcNow() across the src/MyProject/Services/ namespace using constructor injection and update all affected tests so the solution builds.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: migrate-static-to-wrapper
Download link: https://github.com/1k-off/umbraco-observability-playground/archive/main.zip#migrate-static-to-wrapper

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.