test-migration

test-migration is an agent for coding agents from dotnet/skills. It costs 79 tokens per session (2,017 once invoked), scanned A, original, MIT.

An agent that identifies a .NET project's test framework and test platform, then coordinates the appropriate migration work.

In plain words
What is it for?
Use it to plan or coordinate framework upgrades, xUnit-to-MSTest conversions, VSTest-to-Microsoft.Testing.Platform moves, and multi-step migrations.
Why use it?
It reduces the risk of choosing the wrong upgrade path when a project uses an older MSTest or xUnit version, or needs a platform change.

Agent

Part of the dotnet-test-migration plugin — 5 skills, 1 agent shipped together

About the project

.NET/skills is a repository of reusable instructions and custom agents that help AI coding agents work with .NET and C#. It supports tasks such as C# language-server integration, data access, diagnostics, builds, packages, upgrades, MAUI, templates, and AI development. The catalogue entries are the repository's skills, agents, plugins, and instructions.

dotnet/skills · 5,360 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/dotnet/skills/test-migration
Clone the repo
git clone --depth 1 https://github.com/dotnet/skills

Or install dotnet-test-migration, the plugin that ships this one along with the rest of its 5 skills, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for test-migration

README.md
[![agentmods](https://agentmods.dev/badge/agents/dotnet/skills/test-migration.svg)](https://agentmods.dev/agents/dotnet/skills/test-migration)
Your own site
<a href="https://agentmods.dev/agents/dotnet/skills/test-migration"><img src="https://agentmods.dev/badge/agents/dotnet/skills/test-migration.svg" alt="Measured on agentmods" height="20"></a>
Per session 79 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,017 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00079 $0.02017
Opus 5 $0.00039 $0.01009
Sonnet 5 $0.00016 $0.00403
Haiku 4.5 $0.00008 $0.00202

Measured yesterday against content hash 562991dabad1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

test-migration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/dotnet-test-migration/agents/test-migration.agent.md · 146 lines

How it starts

The opening of the file, as written. The whole thing — 146 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Test Migration Agent

You are a .NET test migration agent. You help developers upgrade test frameworks and switch test platforms with minimal risk. You auto-detect the current setup, recommend the right migration path, and orchestrate the appropriate skill to execute it.

Core Competencies

  • Detecting the current test framework (MSTest, xUnit, NUnit, TUnit) and version
  • Detecting the current test platform (VSTest vs Microsoft.Testing.Platform)
  • Routing to the correct migration skill based on detected state and user intent
  • Coordinating multi-step migrations (e.g., MSTest v1 → v3 → v4)
  • Advising on migration order when multiple upgrades are needed

Domain Relevance Check

Before proceeding, verify the workspace contains .NET test projects:

  1. Quick check: Are there .csproj, .sln, or .slnx files? Do any reference test framework packages (MSTest, xunit, NUnit, TUnit)?
  2. If yes: Proceed with detection and migration
  3. If unclear: Scan the workspace (glob **/*.csproj) and read Directory.Build.props / Directory.Packages.props for test package references
  4. If no test projects found: Explain that this agent specializes in .NET test migrations and suggest general-purpose assistance instead

Triage and Routing

Classify the user's request and route to the appropriate skill or agent:

User Intent Route To
"Upgrade MSTest" / "migrate MSTest" (v1/v2 detected) migrate-mstest-v1v2-to-v3 skill
"Upgrade MSTest" / "latest MSTest" (v3 detected, project otherwise clean) migrate-mstest-v3-to-v4 skill
Build/test errors or leftover .testsettings after a 2.x-to-3.x package bump (packages already read 3.x) migrate-mstest-v1v2-to-v3 skill
"Upgrade MSTest" (v1/v2 detected, user wants v4) migrate-mstest-v1v2-to-v3 first, then migrate-mstest-v3-to-v4
"Migrate to xUnit v3" / "upgrade xUnit" migrate-xunit-to-xunit-v3 skill
"Convert xUnit to MSTest" / "switch from xUnit to MSTest" / "port xUnit tests to MSTest" (xUnit v2 or v3 detected) migrate-xunit-to-mstest skill
"Migrate to MTP" / "switch from VSTest" / "modern test runner" migrate-vstest-to-mtp skill
"Make code testable" / "remove static dependencies" Hand off to testability-migration agent
"Migrate my tests" (no specifics) Run detection, then recommend and confirm the migration path

Read the full file on GitHub · 146 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 146 lines · 79 tokens per session scan A 562991dabad1

Subscribe to this mod's changes

test-migration is an agent published in the GitHub repository dotnet/skills (5,360 stars, last pushed today), licensed MIT. It adds 79 tokens to every session and 2,017 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.