migrate-static-to-wrapper SKILL.md skillA
migrate-static-to-wrapper from dotnet/skills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add dotnet/skills/migrate-static-to-wrapper@git:20261009.e191d40Pins git:20261009.e191d40 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- dotnet/skills
- Path
plugins/dotnet-test/skills/migrate-static-to-wrapper/SKILL.md- Versions recorded
- 6
- Latest version
- git:20261009.e191d40, committed Oct 9, 2026
- First version recorded
- Aug 28, 2026
- Size
- 20,922 bytes
- Repository stars
- 5,836
- License
- MIT
ALWAYS USE when asked to migrate, replace, or make testable existing C# static calls with a named wrapper or built-in abstraction: DateTime.UtcNow/Now or DateTimeOffset.UtcNow to TimeProvider/IClock, File.* to IFileSystem or an existing store such as ITextFileStore, and Environment.* to an existing reader such as IEnvironmentReader. Covers scoped files/projects, constructor injection, replacing temp-file or process-environment tests with fakes, "already registered" abstractions, and static…
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# 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.UtcNow` → `TimeProvider.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 - Updating affected tests with fakes when the requested migration names the replacement abstraction ## When Not to Use - No wrapper or abstraction exists yet and one must be designed from scratch (use `generate-testability-wrappers` first). A built-in abstraction such as `TimeProvider` or `IFileSystem` always counts as existing. …
Read the whole file at its exact version.
How to install
mdr add dotnet/skills/migrate-static-to-wrapper@sha256:0f4dcf5f3808d0edThe line at the top of this page pins the label git:20261009.e191d40, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_shfts7ifhus43b5x)
5 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 6 versions of this file, between Aug 28, 2026 and Oct 9, 2026, about one every 8 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20261009.e191d40 latest | 2026-10-09 | e191d40 | 20,922 B | A | view · diff |
| git:20260908.e8ed847 | 2026-09-08 | e8ed847 | 20,655 B | A | view · diff |
| git:20260904.ac8f412 | 2026-09-04 | ac8f412 | 18,878 B | A | view · diff |
| git:20260903.30b30ef | 2026-09-03 | 30b30ef | 17,933 B | A | view · diff |
| git:20260902.00b3bac | 2026-09-02 | 00b3bac | 17,247 B | A | view · diff |
| git:20260828.2b9056b | 2026-08-28 | 2b9056b | 16,908 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (20922 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
dotnet/skills · 5,836 stars · license MIT · pushed 2026-11-06 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_shfts7ifhus43b5x GET https://markdownregistry.com/api/v1/resolve?ref=dotnet/skills/migrate-static-to-wrapper GET https://markdownregistry.com/api/v1/blob/0f4dcf5f3808d0ed089f57916d64945a59769f55c65b6b30db7f17e119a974f7
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.