Roslynator
managedcode/dotnet-skills
Use the open-source free Roslynator analyzer packages and optional CLI for .NET.
Scan C source files for hard-to-test static dependencies — DateTime.Now/UtcNow, File., Directory., Environment., HttpClient, Console., Process., and other untestable statics.
$ npx skills add microsoft/testfx --skill detect-static-dependencies -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install microsoft/testfx detect-static-dependencies --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/microsoft/testfx.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/detect-static-dependencies .claude/skills/detect-static-dependencies && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "detect-static-dependencies" agent skill from https://github.com/microsoft/testfx/tree/main/.agents/skills/detect-static-dependencies into .claude/skills/detect-static-dependencies/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "detect-static-dependencies", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/microsoft/testfx/tree/main/.agents/skills/detect-static-dependenciesType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add microsoft/testfx --skill detect-static-dependencies -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install microsoft/testfx detect-static-dependencies --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/testfx.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/detect-static-dependencies .agents/skills/detect-static-dependencies && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "detect-static-dependencies" agent skill from https://github.com/microsoft/testfx/tree/main/.agents/skills/detect-static-dependencies into .agents/skills/detect-static-dependencies/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "detect-static-dependencies", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add microsoft/testfx --skill detect-static-dependencies -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install microsoft/testfx detect-static-dependencies --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/testfx.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/detect-static-dependencies .cursor/skills/detect-static-dependencies && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "detect-static-dependencies" agent skill from https://github.com/microsoft/testfx/tree/main/.agents/skills/detect-static-dependencies into .cursor/skills/detect-static-dependencies/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "detect-static-dependencies", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/microsoft/testfx.git --path .agents/skills/detect-static-dependencies--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add microsoft/testfx --skill detect-static-dependencies -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install microsoft/testfx detect-static-dependencies --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/testfx.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/detect-static-dependencies .gemini/skills/detect-static-dependencies && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "detect-static-dependencies" agent skill from https://github.com/microsoft/testfx/tree/main/.agents/skills/detect-static-dependencies into .gemini/skills/detect-static-dependencies/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "detect-static-dependencies", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install microsoft/testfx detect-static-dependenciesInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add microsoft/testfx --skill detect-static-dependencies -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/microsoft/testfx.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/detect-static-dependencies .github/skills/detect-static-dependencies && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "detect-static-dependencies" agent skill from https://github.com/microsoft/testfx/tree/main/.agents/skills/detect-static-dependencies into .github/skills/detect-static-dependencies/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "detect-static-dependencies", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add microsoft/testfx --skill detect-static-dependencies -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install microsoft/testfx detect-static-dependencies --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft/testfx.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/detect-static-dependencies .opencode/skills/detect-static-dependencies && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "detect-static-dependencies" agent skill from https://github.com/microsoft/testfx/tree/main/.agents/skills/detect-static-dependencies into .opencode/skills/detect-static-dependencies/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "detect-static-dependencies", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
detect-static-dependenciesScan C source files for hard-to-test static dependencies — DateTime.Now/UtcNow, File., Directory., Environment., HttpClient, Console., Process., and other untestable statics.
Detect Static Dependencies is an agent skill from microsoft/testfx, published by the product's own GitHub organization. Scan C source files for hard-to-test static dependencies — DateTime.Now/UtcNow, File., Directory., Environment., HttpClient, Console., Process., and other untestable statics. Produces a ranked report of static call sites by frequency. USE FOR: find untestable statics, scan for static dependencies, testability audit, identify hard-to-mock code, find DateTime.Now usage, detect static coupling, testability report, static analysis for testability. DO NOT USE FOR: generating wrappers (use…
Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Development, covering Static analysis and SAST. It works with C#. The repository describes itself as: This repository holds the source code of Microsoft.Testing.Platform (MTP), a lightweight alternative to VSTest, as well as MSTest adapter and framework. The licence is MIT.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 44b9dcc. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Detect Static Dependencies loads about 1.9k tokens when it runs. Until then it costs about 170 tokens; SKILL.md has 657 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from microsoft/testfx at commit 44b9dcc, republished under its MIT licence (© microsoft). 657 words, ~1,920 tokens.
.claude/skills/detect-static-dependencies/SKILL.md (or your agent's skills folder).Scan a C# codebase for calls to hard-to-test static APIs and produce a ranked report showing which statics appear most frequently, which files are most affected, and which abstractions already exist in the .NET ecosystem to replace them.
generate-testability-wrappers)migrate-static-to-wrapper)TimeProvider| Input | Required | Description |
|---|---|---|
| Target path | Yes | A file, directory, project (.csproj), or solution (.sln) to scan |
| Exclusion patterns | No | Glob patterns to skip (e.g., **/obj/**, **/Migrations/**) |
| Category filter | No | Limit to specific categories: time, filesystem, environment, network, console, process |
Resolve the target to a set of .cs files:
.cs file, scan that single file..cs files recursively (excluding obj/, bin/)..csproj, find its directory and scan .cs files within..sln, parse it, find all project directories, and scan .cs files across all projects.Always exclude obj/, bin/, and any user-specified exclusion patterns.
Scan each file for calls matching these categories:
| Category | Patterns to search for | Recommended replacement |
|---|---|---|
| Time | DateTime.Now, DateTime.UtcNow, DateTime.Today, DateTimeOffset.Now, DateTimeOffset.UtcNow, Task.Delay(, new CancellationTokenSource(TimeSpan | TimeProvider (.NET 8+) |
| File System | File.ReadAllText(, File.WriteAllText(, File.Exists(, File.Delete(, File.Copy(, File.Move(, Directory.Exists(, Directory.CreateDirectory(, Directory.GetFiles(, Directory.Delete(, Path.Combine(, Path.GetTempPath( | IFileSystem (System.IO.Abstractions NuGet) |
| Environment | Environment.GetEnvironmentVariable(, Environment.SetEnvironmentVariable(, Environment.MachineName, Environment.UserName, Environment.CurrentDirectory, Environment.Exit( | Custom IEnvironmentProvider |
| Network | new HttpClient(, HttpClient.GetAsync(, HttpClient.PostAsync(, HttpClient.SendAsync( | IHttpClientFactory (built-in) |
| Console | Console.WriteLine(, Console.ReadLine(, Console.Write(, Console.ReadKey( | IConsole wrapper or ILogger |
| Process | Process.Start(, Process.GetCurrentProcess(, Process.GetProcessesByName( | Custom IProcessRunner |
Count each static call pattern across the entire scan scope. Produce a summary with:
TimeProvider (built-in since .NET 8)System.IO.Abstractions (NuGet package)IHttpClientFactory (built-in)IEnvironmentProviderIConsole or ILoggerIProcessRunnerFormat the output as a structured report:
## Static Dependency Report
**Scope**: <project/solution name>
**Files scanned**: <count>
**Total static call sites**: <count>
### Category Summary
| Category | Call Sites | Recommended Abstraction |
|-------------|-----------|------------------------|
| Time | 42 | TimeProvider (.NET 8+) |
| File System | 31 | System.IO.Abstractions |
| Environment | 12 | IEnvironmentProvider |
| ... | ... | ... |
### Top 10 Patterns
| # | Pattern | Count | Files |
|---|---------------------|-------|-------|
| 1 | DateTime.UtcNow | 28 | 14 |
| 2 | File.ReadAllText | 18 | 9 |
| ... |
### Most Affected Files
| File | Static Calls | Categories |
|-------------------------------|-------------|---------------------|
| Services/OrderProcessor.cs | 12 | Time, FileSystem |
| ... |
### Migration Priority
1. **Time** (42 sites) — Use `TimeProvider`, zero NuGet dependencies on .NET 8+
2. **File System** (31 sites) — Use `System.IO.Abstractions` NuGet package
3. ...Based on the report, recommend:
generate-testability-wrappers for custom wrapper generationmigrate-static-to-wrapper for mechanical bulk migration.cs files in scope were scanned (check count)obj/ and bin/ directories were excluded| Pitfall | Solution |
|---|---|
Scanning obj/ or generated code | Always exclude obj/, bin/, and *.Designer.cs |
| Counting wrapped calls as statics | Check if the call is behind an interface or injected service before counting |
| Missing statics inside lambdas/LINQ | Search covers all code within .cs files, including lambdas |
Recommending TimeProvider on < .NET 8 | Check TargetFramework in .csproj — if < net8.0, recommend NodaTime.IClock or custom ISystemClock |
| Ignoring test projects | Only scan production code — exclude *.Tests.csproj projects from the scan |
© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/detect-static-dependencies of microsoft/testfx.
Open the folder on GitHubat commit 44b9dcc
Detect Static Dependencies next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Detect Static Dependencies this skillmicrosoft/testfx | 1k | — | ~1.9k | Automated safety check: Pass | MIT | |
| Roslynatormanagedcode/dotnet-skills | 486 | — | ~1.3k | Automated safety check: Pass | MIT | |
| Mcaf Dotnet Roslynatormanagedcode/Storage | 138 | — | ~1.2k | Automated safety check: Pass | MIT | |
| Find Untested Sourcesdotnet/skills | 5.6k | 1 repos | ~3.3k | Automated safety check: Pass | MIT | |
| New Rule for sonar-javaSonarSource/sonar-java | 1.2k | — | ~833 | Automated safety check: Pass | Custom licence | |
| Golang Continuous Integrationsamber/cc-skills-golang | 3.4k | — | ~3.7k | Automated safety check: Pass | MIT |
managedcode/dotnet-skills
Use the open-source free Roslynator analyzer packages and optional CLI for .NET.
managedcode/Storage
Use the open-source free Roslynator analyzer packages and optional CLI for .NET.
dotnet/skills
Statically pairs source files with test files to list code that no test references, using Roslyn for C# or tree-sitter for many languages, with no build.
SonarSource/sonar-java
Sets the sonar-java conventions for adding an analyzer rule: metadata from rule-api, test locations, MethodMatchers and what not to commit or change.
samber/cc-skills-golang
GitHub Actions CI/CD pipeline configuration for Golang projects — workflow files for test, lint, SAST, coverage and vulnerability-scan jobs, Dependabot and Renovate config files, GoReleaser release…
arandu-io/arandu
Explains what each aru doctor architecture-check finding means in the Arandu Go framework, why it is never suppressed, and how to fix the line it points to.
microsoft/testfx
Guide for organizing MSBuild infrastructure with Directory.Build.props, Directory.Build.targets, Directory.Packages.props, and Directory.Build.rsp.
microsoft/testfx
Analyze MSBuild binary logs to diagnose build failures. An agent skill from microsoft/testfx.
microsoft/testfx
Project-wide code coverage and CRAP (Change Risk Anti-Patterns) score analysis for .NET projects.
microsoft/testfx
Guide for optimizing MSBuild incremental builds. An agent skill from microsoft/testfx.
microsoft/testfx
Guide for modernizing and migrating MSBuild project files to SDK-style format.
microsoft/testfx
Catalog of MSBuild anti-patterns with detection rules and fix recipes.
Works with
Categories
Scan C source files for hard-to-test static dependencies — DateTime.Now/UtcNow, File., Directory., Environment., HttpClient, Console., Process., and other untestable statics. Detect Static Dependencies is an agent skill from microsoft/testfx, published by the product's own GitHub organization., and other untestable statics.
Detect Static Dependencies fits situations like: : find untestable statics; scan for static dependencies; testability audit; identify hard-to-mock code.
Run `npx skills add microsoft/testfx --skill detect-static-dependencies -a claude-code`. Or copy the skill folder (.agents/skills/detect-static-dependencies in microsoft/testfx) into .claude/skills/detect-static-dependencies in your project. Claude Code loads it when a task matches its description.
Run `npx skills add microsoft/testfx --skill detect-static-dependencies -a codex`. Or copy the skill folder (.agents/skills/detect-static-dependencies in microsoft/testfx) into .agents/skills/detect-static-dependencies in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/testfx --skill detect-static-dependencies -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/detect-static-dependencies, .gemini/skills/detect-static-dependencies, .github/skills/detect-static-dependencies and .opencode/skills/detect-static-dependencies in your project.
SKILL.md names no scripts, command-line tools or credentials: Detect Static Dependencies is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Detect Static Dependencies is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.9k tokens (SKILL.md is roughly 7.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Detect Static Dependencies: Roslynator (managedcode/dotnet-skills, 486 stars), Mcaf Dotnet Roslynator (managedcode/Storage, 138 stars), Find Untested Sources (dotnet/skills, 5.6k stars) and New Rule for sonar-java (SonarSource/sonar-java, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
microsoft (a GitHub organization, an official publisher) maintains it in microsoft/testfx, which has 1,047 GitHub stars. The repository holds 44 skills in this directory. The repository was last updated on October 7, 2026.
Source: microsoft/testfx on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.