Make C# ambient-dependent behavior testable and add deterministic tests. USE FOR: DateTime/Task.Delay/File/Environment/Guid/Random, constructor injection for instance classes, preserving static APIs, nested override restore, parallel isolation, or no real I/O. DO NOT USE FOR: audits, wrapper-only/bulk migration, or an existing injectable seam.
NewMaintained
Automatic
◆QA & Test Engineering pack
Last verified 9/9/2026
What it changes
3 of 22 test cases passed with the skill.
Pass-rate lift
—
Tokens
+43%
Agent turns
0%
Response time
-6%
Model gemini-3.6-flashMeasured 9/9/2026v33 of 22 cases passed with skill · 4 comparable
Tokens, turns and time describe resource use, not a dollar price.
Lift withheld: 4 comparable cases; this report requires 8.
See it in action
A test case the skill fixed. Same model, same prompt, with and without the skill.
Prompt
We have a static C# class `AppConfig` that reads configuration values directly via `Environment.GetEnvironmentVariable`. This causes flaky tests when run in parallel because changing environment variables mutates global process state. Please resolve this testability obstacle so parallel tests can isolate their config values safely without mutating the actual environment variables. Return the updated code, parallel-safe test suite, and a Requirement | Evidence summary table showing the production seam, default setup, test names, and command execution proof.
What was checked, without and with the skill
Checked
Without skill
With skill
The static seam uses AsyncLocal to scope environment variable overrides per async execution flow.
Passed
Passed
The test suite includes a test verifying nested scope restoration after an exception is thrown inside an inner scope.
Missed
Passed
case-03 · gemini-3.6-flash · 9/9/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md295 linessingle file
Resolve a Testability Obstacle
Introduce the smallest behavior-preserving seam needed to test a specific C#
behavior, then add deterministic tests that prove both the behavior and the seam.
The production edit is a means to the requested test, not an invitation to
redesign adjacent code.
When to Use
A requested test would otherwise read/write the real filesystem.
Behavior depends on the current time, delay, random value, environment, console,
process, or another ambient dependency.
The user explicitly permits or requests a safe production seam.
Existing tests cannot control a dependency without process-global mutation.
When Not to Use
The dependency is already injected or passed as an argument. Write tests with
a fake through the existing seam using code-testing-agent.
The user wants a repository-wide testability audit. Use
detect-static-dependencies.
The user wants wrappers generated but not call sites/tests changed. Use
generate-testability-wrappers.
The user requests a broad mechanical migration. Use
migrate-static-to-wrapper, then generate tests separately.
The user already selected an existing replacement such as TimeProvider or
IFileSystem and asks to migrate call sites to it. Use
migrate-static-to-wrapper, which also updates affected tests.
The code is not C#/.NET.
Inputs
Input
Required
Description
Behavior to test
Yes
The method/workflow and expected observable behavior
Target scope
No
Discover the narrowest relevant file/project when omitted
Performs pseudo-mutation analysis on production code in any language to find gaps in existing tests. Use when the user asks to find weak or shallow tests, discover untested edge cases, or check whether tests would catch a bug — e.g. "would my tests catch it if someone changed the code", "would a subtle logic or boundary change slip past the current tests", "are my tests strong enough to catch a subtle bug". Evaluates test effectiveness through mutation-style reasoning: analyzes mutation points (