Install any skill in seconds. Free to start, no credit card required.
Get Started Free →dotnet/exp-mock-usage-analysis
Audits .NET test mock usage by tracing each mock setup through the production code's execution path to find dead, unreachable, redundant, or replaceable mocks.
Passed 22 of 23 test cases with the skill, and 20 of 23 without it.
and 1 more in the full report
3 fixed19 passed either way0 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 3 test cases the skill fixed. Same model, same prompt, with and without the skill.
Audit `AsyncTestClass.cs` to check for C# unit testing anti-patterns such as `async void` test methods or `Thread.Sleep` calls, without analyzing mock setups.
| Checked | Without skill | With skill |
|---|---|---|
| Identify C# test anti-patterns such as async void or Thread.Sleep. | Missed | Passed |
| Refrain from auditing mock reachability. | Missed | Passed |
The instructions your model reads when the skill loads.
Trace each mock setup through the production code's execution path to determine which setups are actually exercised at runtime and which are dead, unreachable, redundant, or replaceable with real implementations.
test-anti-patterns)| Input | Required | Description |
|---|---|---|
| Test code | Yes | Test files to analyze |
| Production code | Yes | Code under test — essential for tracing execution paths |
Read the test files and always read the production code. You cannot determine whether a mock setup is necessary without understanding the production method's control flow.
Identify the mock framework by scanning for its patterns:
new Mock<T>(), .Setup(...), .Verify(...)Substitute.For<T>(), .Returns(...), .Received(...)A.Fake<T>(), A.CallTo(...), .MustHaveHappened()Use the correct framework's terminology throughout your analysis.
For each test method, do the following:
test cases passed, vs 20 / 23 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.