Migrate Core Code to Submodules
tinyhumansai/openhuman
Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.
Mechanically replace static dependency call sites with wrapper or built-in abstraction calls across a bounded scope (file, project, or namespace).
$ npx skills add microsoft/testfx --skill migrate-static-to-wrapper -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install microsoft/testfx migrate-static-to-wrapper --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/microsoft/testfx.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/migrate-static-to-wrapper .claude/skills/migrate-static-to-wrapper && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "migrate-static-to-wrapper" agent skill from https://github.com/microsoft/testfx/tree/main/.agents/skills/migrate-static-to-wrapper into .claude/skills/migrate-static-to-wrapper/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "migrate-static-to-wrapper", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/microsoft/testfx/tree/main/.agents/skills/migrate-static-to-wrapperType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add microsoft/testfx --skill migrate-static-to-wrapper -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install microsoft/testfx migrate-static-to-wrapper --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/testfx.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/migrate-static-to-wrapper .agents/skills/migrate-static-to-wrapper && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "migrate-static-to-wrapper" agent skill from https://github.com/microsoft/testfx/tree/main/.agents/skills/migrate-static-to-wrapper into .agents/skills/migrate-static-to-wrapper/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "migrate-static-to-wrapper", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add microsoft/testfx --skill migrate-static-to-wrapper -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install microsoft/testfx migrate-static-to-wrapper --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/testfx.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/migrate-static-to-wrapper .cursor/skills/migrate-static-to-wrapper && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "migrate-static-to-wrapper" agent skill from https://github.com/microsoft/testfx/tree/main/.agents/skills/migrate-static-to-wrapper into .cursor/skills/migrate-static-to-wrapper/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "migrate-static-to-wrapper", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/microsoft/testfx.git --path .agents/skills/migrate-static-to-wrapper--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add microsoft/testfx --skill migrate-static-to-wrapper -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install microsoft/testfx migrate-static-to-wrapper --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/testfx.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/migrate-static-to-wrapper .gemini/skills/migrate-static-to-wrapper && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "migrate-static-to-wrapper" agent skill from https://github.com/microsoft/testfx/tree/main/.agents/skills/migrate-static-to-wrapper into .gemini/skills/migrate-static-to-wrapper/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "migrate-static-to-wrapper", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install microsoft/testfx migrate-static-to-wrapperInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add microsoft/testfx --skill migrate-static-to-wrapper -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/microsoft/testfx.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/migrate-static-to-wrapper .github/skills/migrate-static-to-wrapper && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "migrate-static-to-wrapper" agent skill from https://github.com/microsoft/testfx/tree/main/.agents/skills/migrate-static-to-wrapper into .github/skills/migrate-static-to-wrapper/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "migrate-static-to-wrapper", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add microsoft/testfx --skill migrate-static-to-wrapper -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install microsoft/testfx migrate-static-to-wrapper --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/testfx.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/migrate-static-to-wrapper .opencode/skills/migrate-static-to-wrapper && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "migrate-static-to-wrapper" agent skill from https://github.com/microsoft/testfx/tree/main/.agents/skills/migrate-static-to-wrapper into .opencode/skills/migrate-static-to-wrapper/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "migrate-static-to-wrapper", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
migrate-static-to-wrapperMechanically replace static dependency call sites with wrapper or built-in abstraction calls across a bounded scope (file, project, or namespace).
Migrate Static To Wrapper is an agent skill from microsoft/testfx, published by the product's own GitHub organization. Mechanically replace static dependency call sites with wrapper or built-in abstraction calls across a bounded scope (file, project, or namespace). Performs codemod-style bulk replacement of DateTime.UtcNow to TimeProvider.GetUtcNow(), File.ReadAllText to IFileSystem, and similar transformations. Adds constructor injection parameters and updates DI registration. USE FOR: replace DateTime.UtcNow with TimeProvider, replace DateTime.Now with TimeProvider, migrate static calls to wrapper, bulk replace File. with…
Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Development, covering Code migrations. The repository describes itself as: This repository holds the source code of Microsoft.Testing.Platform (MTP), a lightweight alternative to VSTest, as well as MSTest adapter and framework. The licence is MIT.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 7c7d590. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
dotnetFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Migrate Static To Wrapper loads about 2.1k tokens when it runs. Until then it costs about 258 tokens; SKILL.md has 711 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from microsoft/testfx at commit 7c7d590, republished under its MIT licence (© microsoft). 711 words, ~2,068 tokens.
.claude/skills/migrate-static-to-wrapper/SKILL.md (or your agent's skills folder).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.
generate-testability-wrappers) or built-in abstractions identifiedDateTime.UtcNow → TimeProvider.GetUtcNow() across a projectFile.* → IFileSystem.File.* across a namespacegenerate-testability-wrappers first)detect-static-dependencies)| Input | Required | Description |
|---|---|---|
| Static pattern | Yes | What to replace (e.g., DateTime.UtcNow, File.ReadAllText) |
| Replacement abstraction | Yes | What to use instead (e.g., TimeProvider, IFileSystem) |
| Scope | Yes | File path, project (.csproj), namespace, or directory to migrate |
| Injection strategy | No | constructor (default), primary-constructor, or ambient |
Before modifying any code:
Confirm the wrapper/abstraction exists: Check that the interface or built-in abstraction is available in the project. For TimeProvider, verify the target framework is .NET 8+ or Microsoft.Bcl.TimeProvider is referenced. For System.IO.Abstractions, verify the NuGet package is referenced.
Confirm DI registration exists: Check Program.cs or Startup.cs for the service registration. If missing, add it before proceeding.
Identify all files in scope: List the .cs files that will be modified. Exclude test projects, obj/, bin/, and generated code.
For each file containing the static pattern, determine:
TimeProvider, IFileSystem, etc. parameters| Category | Original | DI replacement |
|---|---|---|
| Time | DateTime.Now | _timeProvider.GetLocalNow().DateTime |
| Time | DateTime.UtcNow | _timeProvider.GetUtcNow().DateTime |
| Time | DateTime.Today | _timeProvider.GetLocalNow().Date |
| Time | DateTimeOffset.UtcNow | _timeProvider.GetUtcNow() |
| File | File.ReadAllText(path) | _fileSystem.File.ReadAllText(path) |
| File | File.WriteAllText(path, text) | _fileSystem.File.WriteAllText(path, text) |
| File | File.Exists(path) | _fileSystem.File.Exists(path) |
| File | Directory.Exists(path) | _fileSystem.Directory.Exists(path) |
| Env | Environment.GetEnvironmentVariable(name) | _env.GetEnvironmentVariable(name) |
| Console | Console.WriteLine(msg) | _console.WriteLine(msg) |
| Process | Process.Start(info) | _processRunner.Start(info) |
Apply the same pattern for other members in each category.
Add the new dependency following the class's existing pattern:
public class OrderProcessor(ILogger<OrderProcessor> logger, TimeProvider timeProvider)private readonly field + constructor parameter, matching the existing field naming convention (_camelCase or m_camelCase)Perform each replacement mechanically. For each call site:
using directives if not already present| Abstraction | Using directive |
|---|---|
TimeProvider | None (in System namespace) |
IFileSystem | using System.IO.Abstractions; |
IHttpClientFactory | using System.Net.Http; (usually already present) |
| Custom wrappers | using <wrapper namespace>; |
If test files exist for the migrated classes:
TimeProvider → new FakeTimeProvider() from Microsoft.Extensions.TimeProvider.TestingIFileSystem → new MockFileSystem() from System.IO.Abstractions.TestingHelpersnew Mock<IWrapperName>() or hand-rolled fakeAfter all changes in the current scope:
dotnet build <project.csproj>If the build fails:
using directivedotnet add package <name>Summarize what was done:
## Migration Summary
**Pattern**: DateTime.UtcNow → TimeProvider.GetUtcNow()
**Scope**: MyProject/Services/
### Files Modified (production)
| File | Call Sites Replaced | Injection Added |
|------|--------------------:|:----------------|
| OrderProcessor.cs | 3 | Yes (constructor) |
| NotificationService.cs | 1 | Yes (primary ctor) |
### Files Modified (tests)
| File | Change |
|------|--------|
| OrderProcessorTests.cs | Added FakeTimeProvider parameter |
### Remaining (out of scope)
- MyProject/Legacy/ — 8 call sites not migrated (different namespace)using directives added| Pitfall | Solution |
|---|---|
| Replacing statics in test code | Only replace in production code; tests should use fakes/mocks |
| Breaking static classes | Static classes can't have constructors — use ambient context for these |
Missing FakeTimeProvider NuGet | Add Microsoft.Extensions.TimeProvider.Testing to test project |
| Replacing in expression-bodied members without updating return type | DateTime → DateTimeOffset when using TimeProvider.GetUtcNow() — verify type compatibility |
| Migrating too much at once | Stick to the defined scope — one project or namespace per run |
| Forgetting DI registration | Always verify Program.cs/Startup.cs has the registration before replacing call sites |
© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/migrate-static-to-wrapper of microsoft/testfx.
Open the folder on GitHubat commit 7c7d590
Migrate Static To Wrapper next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Migrate Static To Wrapper this skillmicrosoft/testfx | 1k | — | ~2.1k | Automated safety check: Pass | MIT | |
| Migrate Core Code to Submodulestinyhumansai/openhuman | 42k | — | ~2.6k | Automated safety check: Pass | GPL-3.0 | |
| Migrate Internal Package into GhostTryGhost/Ghost | 55k | — | ~3.8k | Automated safety check: Pass | MIT | |
| Next Cache Components Adoptionvercel/next.js | 143k | 6 repos | ~8.3k | Automated safety check: Pass | MIT | |
| Deprecate R Functions and Argumentstidyverse/dplyr | 5.1k | 1 repos | ~1.2k | Automated safety check: Pass | Custom licence | |
| Rust Path Typesopeninterpreter/openinterpreter | 69k | 2 repos | ~605 | Automated safety check: Pass | Apache-2.0 |
tinyhumansai/openhuman
Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.
TryGhost/Ghost
Moves a package from another TryGhost repository into Ghost as an internal workspace package while keeping its Git history, with checkpoints for the steps that need an administrator.
vercel/next.js
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces.
tidyverse/dplyr
Walks through deprecating an R function or argument in a package: lifecycle warning, silenced tests, a new snapshot test, documentation badge and NEWS entry.
openinterpreter/openinterpreter
Rules for choosing Rust types for filesystem paths in new Codex code, covering protocol types, internal use and model tool arguments.
code-yeongyu/oh-my-openagent
Searches and rewrites code by syntax-tree shape across 25 languages with ast-grep, for codemods, structural queries and YAML lint rules, using a Python wrapper script.
microsoft/testfx
Guide for organizing MSBuild infrastructure with Directory.Build.props, Directory.Build.targets, Directory.Packages.props, and Directory.Build.rsp.
microsoft/testfx
Analyze MSBuild binary logs to diagnose build failures. An agent skill from microsoft/testfx.
microsoft/testfx
Project-wide code coverage and CRAP (Change Risk Anti-Patterns) score analysis for .NET projects.
microsoft/testfx
Guide for optimizing MSBuild incremental builds. An agent skill from microsoft/testfx.
microsoft/testfx
Guide for modernizing and migrating MSBuild project files to SDK-style format.
microsoft/testfx
Catalog of MSBuild anti-patterns with detection rules and fix recipes.
Categories
Mechanically replace static dependency call sites with wrapper or built-in abstraction calls across a bounded scope (file, project, or namespace). Migrate Static To Wrapper is an agent skill from microsoft/testfx, published by the product's own GitHub organization. Mechanically replace static dependency call sites with wrapper or built-in abstraction calls across a bounded scope (file, project, or namespace).
Migrate Static To Wrapper fits situations like: : replace DateTime.UtcNow with TimeProvider; replace DateTime.Now with TimeProvider; migrate static calls to wrapper; bulk replace File.
Run `npx skills add microsoft/testfx --skill migrate-static-to-wrapper -a claude-code`. Or copy the skill folder (.agents/skills/migrate-static-to-wrapper in microsoft/testfx) into .claude/skills/migrate-static-to-wrapper in your project. Claude Code loads it when a task matches its description.
Run `npx skills add microsoft/testfx --skill migrate-static-to-wrapper -a codex`. Or copy the skill folder (.agents/skills/migrate-static-to-wrapper in microsoft/testfx) into .agents/skills/migrate-static-to-wrapper in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/testfx --skill migrate-static-to-wrapper -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/migrate-static-to-wrapper, .gemini/skills/migrate-static-to-wrapper, .github/skills/migrate-static-to-wrapper and .opencode/skills/migrate-static-to-wrapper in your project.
Going by SKILL.md and its folder, Migrate Static To Wrapper needs the command-line tools its instructions call (dotnet).
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Migrate Static To Wrapper is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.1k tokens (SKILL.md is roughly 8.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Migrate Static To Wrapper: Migrate Core Code to Submodules (tinyhumansai/openhuman, 42k stars), Migrate Internal Package into Ghost (TryGhost/Ghost, 55k stars), Next Cache Components Adoption (vercel/next.js, 143k stars) and Deprecate R Functions and Arguments (tidyverse/dplyr, 5.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
microsoft (a GitHub organization, an official publisher) maintains it in microsoft/testfx, which has 1,047 GitHub stars. The repository holds 44 skills in this directory. The repository was last updated on October 8, 2026.
Source: microsoft/testfx on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.