testability-migration

testability-migration is an agent for Claude Code from dotnet/skills. It costs 66 tokens per session (2,522 once invoked), scanned A, original, MIT.

A .NET-focused agent that replaces hard-to-test static dependencies with injectable interfaces or other smaller seams, then updates the relevant code and tests when requested.

In plain words
What is it for?
Use it to find ambient dependencies, introduce testable abstractions, migrate bounded call sites, and add tests for the changed behavior when asked.
Why use it?
It makes code that depends directly on fixed system behavior easier to test with controlled or in-memory replacements.

Agent for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: mentions subagents.

Part of the dotnet-test plugin — 24 skills, 10 agents shipped together

Good fit Use it to find ambient dependencies, introduce testable abstractions, migrate bounded call sites, and add tests for the changed behavior when asked.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/dotnet/skills/testability-migration
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,696 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.

Clone the repo
git clone --depth 1 https://github.com/dotnet/skills

Made for: Claude Code.

Or install dotnet-test, the plugin that ships this one along with the rest of its 24 skills, 10 agents.

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 testability-migration

README.md
[![agentmods](https://agentmods.dev/badge/agents/dotnet/skills/testability-migration/github.svg)](https://agentmods.dev/agents/dotnet/skills/testability-migration)
Your own site
<a href="https://agentmods.dev/agents/dotnet/skills/testability-migration"><img src="https://agentmods.dev/badge/agents/dotnet/skills/testability-migration/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for testability-migration

Your own site · 80×15
<a href="https://agentmods.dev/agents/dotnet/skills/testability-migration"><img src="https://agentmods.dev/badge/agents/dotnet/skills/testability-migration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 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,522 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00066 $0.02522
Opus 5.5 $0.00026 $0.01009
Sonnet 5.5 $0.00013 $0.00504
Haiku 4.5 $0.00007 $0.00252

Measured 12d ago against content hash 7d52574c23ed, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

testability-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 12d ago.

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/agents/testability-migration.agent.md · 251 lines

How it starts

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

Testability Migration Agent

You are a testability migration agent for .NET codebases. Your mission is to help developers incrementally replace hard-to-test static dependencies with injectable abstractions, making their code unit-testable without requiring a risky big-bang rewrite.

Pipeline Overview

For a focused TimeProvider migration in an application, keep two deliverables on the checklist before editing: the injected class and its production construction/DI path. If the project has an existing WebApplication builder, the ordinary missing-clock registration is:

builder.Services.AddSingleton<TimeProvider>(TimeProvider.System);

Preserve an existing registration instead of duplicating it. A provider field and constructor alone do not finish the migration. Include the composition file in the changed-file review before running validation.

Choose one of three paths:

  • A named available seam wins routing. A request explicitly naming TimeProvider, IFileSystem, or an existing wrapper follows Focused migration, even when it also requests tests. Complete its production wiring and write tests inline; do not switch to testability-obstacle after choosing the seam.
  • Migration pipeline: Detect → Generate → Migrate → Test for a broad or multi-call-site migration. After migration, the seam exists; write the deterministic tests inline. Do not invoke code-testing or test-engineer from this internal specialist.
  • Focused migration: for an inventory-only request, invoke detect-static-dependencies and stop. For one named dependency, invoke migrate-static-to-wrapper; stop after migration only when tests were not requested, otherwise continue to the Test phase.
  • Targeted obstacle: use testability-obstacle directly when one bounded behavior needs a missing seam and deterministic tests. This path skips Detect/Generate/Migrate rather than running after them.

If the request maps to one specialist skill, invoke it once and return its focused result unless the request also requires deterministic tests. In that case, reuse the migrated seam and continue directly to the Test phase without running unrelated detection or generation phases. For broader work, invoke each applicable skill once for its phase and do not ask subagents to rescan the same scope.

Read the full file on GitHub · 251 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. 12d ago Changed · +56 lines 7d52574c23ed
  2. 13d ago Changed · -8 lines · -36 tokens per session 13c9f6db08d2
  3. 26d ago Changed · +25 lines · +12 tokens per session 499acf3253b3
  4. 1mo ago Changed · +2 lines e31c61615f4c
  5. 1mo ago First seen · 176 lines · 90 tokens per session scan A d1a5d3686e3c

Subscribe to this mod's changes

testability-migration is an agent published in the GitHub repository dotnet/skills (5,696 stars, last pushed today), licensed MIT. It adds 66 tokens to every session and 2,522 once invoked, about $0.0003 per session on Opus 5.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.

Related

Other agents, from other repositories

Expert .NET software engineer mode instructions

Provide expert .NET software engineering guidance using modern software design patterns.

github/awesome-copilot · 21 tokens

dnp-tdd-developer-hard

🔬 Deep TDD for complex .NET tasks: architectural decisions, ambiguous edge cases, high-risk refactoring. Writes both tests and production code with rigorous RED-GREEN-REFACTOR.

zdanovichnick/dotnet-pilot · 47 tokens

dnp-tdd-developer-easy

⚡ Fast TDD for routine .NET tasks: clear requirements, low-risk changes, well-defined scope. Writes both tests and production code following RED-GREEN-REFACTOR.

zdanovichnick/dotnet-pilot · 46 tokens

testability-migration

Orchestrates end-to-end testability migration for .NET codebases: detects untestable static dependencies, generates wrapper abstractions or guides built-in adoption, and performs mechanical bulk migration of call sites. Use when asked to make code testable, remove static coupling, migrate to TimeProvider, adopt…

F-U-S-E-E/FuseDevelopmentGroup · 79 tokens

test-engineer

.NET/C# QA engineer specialized in test strategy, test writing, and coverage analysis — xUnit v3 (or v2) or MSTest with native Assert.X, WebApplicationFactory, Testcontainers, Microsoft.Playwright, and Avalonia.Headless. Use for designing test suites, writing tests for existing code, or evaluating test quality.

peterblazejewicz/claude-plugins · 73 tokens

test-writer

Generates xUnit test suites for .NET code. Use for mechanical test generation, filling coverage gaps, or writing tests for a newly implemented feature. Runs on Haiku for cost efficiency.

cwoodruff/dotnet-claude-workshop-content · 42 tokens