
Description
testability-obstacle is an agent skill for C# and .NET projects that helps write deterministic tests when the code under test depends on something the test cannot control. Examples include the current time, a delay, a random value, an environment variable, the console, a process, a GUID, or the real filesystem. The skill adds the smallest production seam that keeps the behaviour the same, then writes tests that prove both the behaviour and the seam. It treats the production edit as a means to the requested test, not a reason to redesign nearby code. The skill applies when a requested test would otherwise read or write the real filesystem, when behaviour depends on ambient state such as time or delays, when the user has allowed or asked for a safe production seam, or when existing tests would need process-global mutation to control a dependency.…
Highlights
- Adds the smallest behaviour-preserving seam for a dependency
- Covers time, delays, randomness, environment, filesystem and console
- Writes deterministic tests that prove the seam works
- Avoids process-global mutation in tests
Ratings & Reviews
No ratings yet
Be the first to rate testability-obstacle.
People also visit
testability-obstacle FAQ
What problem does it solve?
Tests that depend on the real clock, the filesystem, randomness or other ambient state, which makes them flaky. The skill adds a small seam so the test can control that dependency.
Does it rewrite my code?
It makes the smallest production edit needed for the requested test and keeps the behaviour the same. It does not redesign adjacent code.
When should I not use it?
When you have not allowed a small production change. The skill adds a seam when you permit it or ask for one.
How do I install it?
Run npx skills add https://github.com/dotnet/skills --skill testability-obstacle in a terminal.
Which security audits has it passed?
Gen Agent Trust Hub Pass, Socket Pass, Snyk Pass.
What are the best testability-obstacle alternatives?
Popular alternatives to testability-obstacle include run-tests, dotnet-best-practices and modern-csharp-coding-standards. See all testability-obstacle alternatives









