What problem does it solve?
Testing C# code that depends on ambient resources like DateTime, Task.Delay, the filesystem, environment variables, or randomness is impossible without modifying production code. This Skill introduces the smallest behavior-preserving seam (constructor injection, TimeProvider, or scoped AsyncLocal overrides) so deterministic tests can be written without redesigning adjacent code.
Core Features & Use Cases
- Seam Selection Guidance: Chooses the narrowest safe seam per dependency type, such as TimeProvider for time, injected delegates for single file operations, or minimal interfaces for environment and process access.
- Static API Preservation: Provides a scoped AsyncLocal<T> override pattern for public static APIs that must retain their shape, with nested restoration and async-flow isolation guarantees.
- Deterministic Test Authoring: Writes tests using FakeTimeProvider, in-memory fakes, and controlled dependencies with no real I/O, wall-clock waits, or environment mutation.
- Use Case: A method calls DateTime.UtcNow and File.WriteAllText, making it untestable. The Skill injects TimeProvider and a file-write delegate with production defaults, then adds tests that advance fake time and assert against an in-memory fake.
Quick Start
Ask the agent to make a specific C# method testable by introducing the smallest production seam and writing deterministic tests for it.