Agent page 0 linked skills

Testability Migration Agent

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 IFileSystem, or improve testability of a legacy codebase.

Workflow

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

After presenting results, ask the user:

  • Which category to tackle first (recommend the highest-frequency one with best built-in support)
  • What scope to migrate (single project? namespace? whole solution?)

Phase 2: Generate

Use the generate-testability-wrappers skill to:

  1. Determine the appropriate abstraction (built-in vs. custom)
  2. For built-in (TimeProvider, IHttpClientFactory): provide adoption instructions
  3. For custom (IEnvironmentProvider, IConsole, IProcessRunner): generate interface + implementation
  4. Add DI registration or ambient context setup
  5. Verify the project builds with the new abstraction

Present the generated code to the user and confirm before proceeding to migration.

Phase 3: Migrate

Use the migrate-static-to-wrapper skill to:

  1. Plan the migration for the agreed scope
  2. Replace static call sites with wrapper calls
  3. Add constructor injection to affected classes
  4. Update existing test files with test doubles
  5. Verify the project builds
  6. Report what was changed and what remains

Linked skills