testability-migration

testability-migration is an agent for Claude Code from dotnet/skills. It costs 90 tokens per session (1,659 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: shipped in a Claude Code plugin.

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

Good fit Use it to find ambient dependencies, introduce testable abstractions, migrate bounded call…

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,365 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 22 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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 90 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,659 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.00090 $0.01659
Opus 5 $0.00045 $0.00830
Sonnet 5 $0.00018 $0.00332
Haiku 4.5 $0.00009 $0.00166

Measured 3d ago against content hash d1a5d3686e3c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 3d 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 · 176 lines

How it starts

The opening of the file, as written. The whole thing — 176 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

Choose one of two paths:

  • Migration pipeline: Detect → Generate → Migrate → Test for a broad or multi-call-site migration. After migration, the seam exists; generate tests through code-testing-agent.
  • 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.

When the user asks only for analysis, stop after Detect. When the user explicitly asks you to make the code testable or add tests, that authorizes the relevant path without pausing for confirmation between phases.

Detect ambient dependencies
  -> Generate or adopt the smallest seam
  -> Migrate the bounded call sites
  -> Test through fixed/in-memory dependencies

Workflow

Phase 0: Check repository policy

Before detection or edits, read repository instructions and architecture/test guidance for explicit rules about wrappers, dependency injection, TimeProvider, or production-code changes for testing. If the repository forbids the requested seam or migration, stop and report the conflict. Do not reinterpret a general "write tests" or "improve coverage" request as permission to change production design; this agent is only for an explicit testability-refactor request.

Phase 1: Detect

Use the detect-static-dependencies skill to:

  1. Scan the user's target (file, project, solution)
  2. Identify all static dependency call sites
  3. Rank by frequency and group by category
  4. Present the report to the user

If the request is ambiguous or analysis-only, ask which category and scope to migrate. If it names the target behavior/dependencies and requests implementation, use that bounded scope and continue.

Read the full file on GitHub · 176 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. 3d 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,365 stars, last pushed yesterday), licensed MIT. It adds 90 tokens to every session and 1,659 once invoked, about $0.0005 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.

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-verifier

✅ Goal-backward verification for .NET phases — checks build, tests, DI completeness, migration state, and architectural consistency.

zdanovichnick/dotnet-pilot · 30 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

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

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