generate-testability-wrappers

Community

Make static code mockable and test-friendly

Author1k-off
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This skill helps you test C# code that depends on hard-to-mock static calls (like DateTime.Now, File., Environment., Console., or Process.) by generating small wrapper interfaces, implementations, and DI registration.

Core Features & Use Cases

  • Wrap hard-to-test statics with minimal interfaces that cover only the detected members you actually use.
  • Prefer built-in abstractions when available, guiding adoption of TimeProvider and IHttpClientFactory instead of creating redundant wrappers.
  • Generate DI-ready registration code so the resulting abstractions are usable in modern ASP.NET Core-style apps.
  • Filesystem guidance favors System.IO.Abstractions for realistic and robust test doubles (e.g., MockFileSystem).

Quick Start

Ask the AI agent to generate testability wrappers for statics in your project by specifying the static category (e.g., time or filesystem), your target framework from the .csproj, and your preferred DI container (or default to Microsoft).

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: generate-testability-wrappers
Download link: https://github.com/1k-off/umbraco-observability-playground/archive/main.zip#generate-testability-wrappers

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.