Sign in Get 3 free credits

Try a job or a niche: tiktok captions, study notes, excel formulas. Press Esc to close.

C# Testability Fixer

Adds the smallest safe change to C# code so time, file or random behaviour can be tested reliably.

Claude's review

7/10 Sound minimal seam workflow for deterministic C# tests (fake time, nested AsyncLocal scopes); overlaps its sibling skills.

We asked Claude the question you would ask: would I be glad I installed this? We only sell skills it rates 7 or higher.

In detail

MUST USE for C#/.NET deterministic tests that require the smallest production seam for DateTime/Task.Delay/File/Environment/Guid/Random, static API preservation, nested/parallel overrides, or no real I/O. USE ONLY when the target workspace contains C# source plus a .csproj or .sln. DO NOT USE for audits, bulk migration, code that already has an injectable seam, or an explicit migration to a user-named existing abstraction (migrate-static-to-wrapper). Use instead of general test generation when the requested test is impossible without a production edit and seam selection is still open.

How you use it

  1. Add it to your pack, then download your pack (1 credit).
  2. In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
  3. Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide

Safety check

Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.

An automated scan lowers risk but cannot promise zero risk. How we check skills

Preview

The first lines of SKILL.md
---
name: testability-obstacle
description: >-
  MUST USE for C#/.NET deterministic tests that require the smallest production seam for
  DateTime/Task.Delay/File/Environment/Guid/Random, static API preservation,
  nested/parallel overrides, or no real I/O. USE ONLY when the target workspace
  contains C# source plus a .csproj or .sln. DO NOT USE for audits, bulk
  migration, code that already has an injectable seam, or an explicit migration
  to a user-named existing abstraction (migrate-static-to-wrapper). Use instead
  of general test generation when the requested test is impossible without a
  production edit and seam selection is still open.
license: MIT
---

# 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`.
- 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
...

From dotnet's repository, MIT licence.

Related skills

  • Checked

    React Native tests

    Writes and fixes React Native component tests with Testing Library v13 and v14, using the right API for each.

    by callstackincubator 1.7k
    7/101 credit
  • Checked

    JUnit and Mockito tests

    Writes and fixes Java tests with JUnit, AssertJ and Mockito that are deterministic and keep failures visible.

    by github 42k
    8/101 credit
  • Checked

    Test code review

    Reviews new or changed tests in pytest, Jest, Go and more, so weak tests are caught before merge.

    by amElnagdy 1.3k
    8/101 credit
  • Checked

    Test scope decisions

    Decides which tests a change needs and how to judge their quality, for unit, integration and UI tests.

    by shinpr 725
    8/101 credit
  • Checked

    Playwright accessibility tests

    Writes Playwright and axe tests for WCAG, focus and ARIA, so accessibility bugs fail the build early.

    by fugazi 273
    7/101 credit
  • Checked

    Go table driven tests

    Writes Go tests with table cases, fakes, fuzzing, benchmarks and golden files that stay fast and reliable.

    by ericrisco 691
    8/101 credit

Secure checkout

Credits

AUD

  1. 1Choose
  2. 2Pay on Square
  3. 3Credits added