CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

migrate-static-to-wrapper

ALWAYS USE when asked to migrate, replace, or make testable existing C# static calls with a named wrapper or built-in abstraction: DateTime.UtcNow/Now or DateTimeOffset.UtcNow to TimeProvider/IClock, File.* to IFileSystem or an existing store such as ITextFileStore, and Environment.* to an existing reader such as IEnvironmentReader. Covers scoped files/projects, constructor injection, replacing temp-file or process-environment tests with fakes, "already registered" abstractions, and static classes whose callers/signatures must stay unchanged. Preserves DateTimeKind and call count. DO NOT USE for finding statics (detect-static-dependencies), choosing/designing a new wrapper (generate-testability-wrappers), behavior tests with no chosen seam (testability-obstacle), or test-framework migration.

Quality

92%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

81%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A strong, highly executable migration skill: exact replacement mappings, complete code, sequenced steps, and rigorous validation/feedback loops for a batch operation. Its weakness is token efficiency — a verbose boundaries section with harness-operational rules and repeated invariants across three sections inflate the body without adding proportional guidance.

Suggestions

Condense the 'Non-negotiable migration boundaries' section to its core invariants (stop on missing abstraction, one read stays one read, exhaustive-and-exclusive scope, report only proven work); move the shell-reader/editor fallback rules into a short 'Tool-failure fallbacks' subsection or drop the procedural detail, keeping only the stop conditions.

State each invariant (DateTimeKind preservation, call-count preservation) fully once — in Step 2 where it is acted on — and reduce its checklist/pitfalls mentions to one-line reminders instead of re-explaining the same .UtcDateTime/.LocalDateTime reasoning in three places.

Consider splitting the full ambient-seam code example and the extended pitfalls table into references/ (e.g., references/ambient-seam.md), keeping a summary inline; this would cut the main body's token load and improve its progressive-disclosure structure.

DimensionReasoningScore

Conciseness

Mostly efficient — tables, exact mappings, and no explanation of concepts Claude already knows — but noticeably tightened-able: the ~25-line 'Non-negotiable migration boundaries' section interleaves core invariants with verbose harness-fallback rules ('Use a host-native shell reader (sed/cat or Get-Content) only after a confirmed reader availability, transport, or path-normalization failure...'), and invariants like DateTimeKind and one-read-for-one-read are repeated at length in Step 2, the Validation checklist, and Common Pitfalls. Fits the 3 anchor ('includes some unnecessary explanation or could be tightened') better than 4 ('minor instances of over-explanation') because the trimming opportunity is a full section, not minor instances.

3 / 5

Actionability

Fully executable guidance: an exact replacement-mapping table ('DateTime.UtcNow → _timeProvider.GetUtcNow().UtcDateTime'), a complete copy-paste ambient-seam C# example, exact commands ('dotnet build <project.csproj>', 'dotnet test <affected-test-project.csproj>'), named test-double packages (Microsoft.Extensions.TimeProvider.Testing, System.IO.Abstractions.TestingHelpers), and a concrete report template. Not a 4 because the common cases are covered end-to-end with no meaningful gaps.

5 / 5

Workflow Clarity

Seven clearly sequenced steps with prerequisites verification, member-set locking before editing, post-edit re-search requiring 'zero occurrences in every in-scope production file', an explicit build-failure remediation table, and instructions to report actual exit codes — a full validate→fix→retry feedback loop for a batch operation. Not a 4 because validation checkpoints are explicit at every phase (before, during, after) rather than mostly present.

5 / 5

Progressive Disclosure

No bundle files exist; the entire skill is inline in SKILL.md (~330 lines) but is well-sectioned with clear headers (When to Use/Not, Inputs, Steps 1–7, Validation, Pitfalls) making it navigable. Fits the 4 anchor ('good structure; most content appropriately placed; minor organization gaps') — the 5 anchor is not reached because the in-a-single-file layout at this length means content that could plausibly live in a reference (e.g., the full ambient-seam example or the extended pitfalls table) is inline; the 3 anchor is not reached because organization is consistently clear and nothing is buried.

4 / 5

Total

17

/

20

Passed

Description

100%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

An exemplary description: concrete API-level mappings, an explicit 'ALWAYS USE' trigger with natural phrasing, stated invariants (DateTimeKind, call count), and explicit DO-NOT-USE boundaries against named sibling skills. It answers what, when, and when-not with minimal fluff.

DimensionReasoningScore

Specificity

The description lists multiple concrete actions with exact API-to-abstraction mappings: 'DateTime.UtcNow/Now or DateTimeOffset.UtcNow to TimeProvider/IClock, File.* to IFileSystem... and Environment.* to an existing reader such as IEnvironmentReader', plus 'Preserves DateTimeKind and call count' — comprehensive, not generic. It is not below the 4 anchor ('minor gaps in coverage') because every migration category the skill handles is named with its concrete replacement.

5 / 5

Completeness

It explicitly answers both: what — mechanical replacement of static call sites with injected wrappers/built-in abstractions, covering 'scoped files/projects, constructor injection, replacing temp-file or process-environment tests with fakes... and static classes whose callers/signatures must stay unchanged'; and when — 'ALWAYS USE when asked to migrate, replace, or make testable existing C# static calls'. Matches the top anchor with concrete trigger phrases; not a 4 since the 'when' is explicit rather than merely adequate.

5 / 5

Trigger Term Quality

Natural user phrasings are covered with synonyms: 'migrate, replace, or make testable existing C# static calls with a named wrapper or built-in abstraction', including the specific member names users would actually cite (DateTime.UtcNow, File.*, Environment.*) and their target abstractions. Not a 4 ('a few natural terms missing') because both the verbs and the exact API identifiers users would type are present as trigger vocabulary.

5 / 5

Distinctiveness Conflict Risk

A clear niche (call-site migration to an already-named abstraction) with an explicit negative boundary: 'DO NOT USE for finding statics (detect-static-dependencies), choosing/designing a new wrapper (generate-testability-wrappers), behavior tests with no chosen seam (testability-obstacle), or test-framework migration' — naming the sibling skills directly minimizes wrong-skill triggering. Not a 4 because the disambiguation against closely related skills is explicit rather than leaving minor overlap risk.

5 / 5

Total

20

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository

dotnet/skills

Path

plugins/dotnet-test/skills/migrate-static-to-wrapper/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.