detect-static-dependencies

Detect untestable static dependencies in C# code and generate a ranked report.

Updated May 28, 2026
One-click install
npx skills add https://github.com/ojrojas/AgentsInstructions --skill detect-static-dependencies-ojrojas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: detect-static-dependencies
Source: https://github.com/ojrojas/AgentsInstructions/tree/main/.claude/skills/dotnet-test/skills/detect-static-dependencies
Command: npx skills add https://github.com/ojrojas/AgentsInstructions --skill detect-static-dependencies-ojrojas

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Detects static dependencies in C# source files that are difficult to test, providing a ranked report to improve testability and code quality.

Core Features & Use Cases

  • Static Dependency Detection: Scans for calls to untestable static APIs such as DateTime.Now and File.*.
  • Ranked Report: Generates a report that ranks static call sites by frequency.
  • Use Case: Ideal for auditing codebase testability, identifying hard-to-mock code, and improving overall code quality.

Quick Start

Run the skill with the target path: detect-static-dependencies /path/to/project

Frequently Asked Questions about detect-static-dependencies

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find hard-to-test static dependencies in C# code?

This skill identifies hard-to-test static dependencies in C# code by scanning for calls to untestable static APIs such as DateTime.Now and File.*. It generates a ranked report by frequency to help prioritize which statics to wrap for better testability.

How do I audit my C# project for untestable static method calls?

Run a directory, project, or solution scan to audit C# code for untestable static method calls. The tool excludes obj and bin directories by default and outputs a frequency-ranked report of static call sites to improve testability.

What is a static dependency in C# and why does it affect testability?

A static dependency in C# is a call to a static API like DateTime.Now or File.* that is difficult to mock in unit tests. Identifying and wrapping these static dependencies improves code testability by allowing you to inject mock values during testing.

Can I scan an entire Visual Studio solution for static dependencies?

Yes, you can scan an entire Visual Studio solution. The skill supports file, directory, project, and solution scans for static dependencies, automatically excluding obj and bin directories by default to focus on actual source code.

How do I get started detecting static dependencies in my codebase?

Run the skill with your target path, for example: detect-static-dependencies /path/to/project. This initiates the scan and generates a ranked report of static call sites to help you prioritize wrapping untestable static APIs.

Does the static dependency scan exclude build output directories?

Yes, the static dependency scan automatically skips obj and bin directories by default during file, directory, project, and solution scans. This ensures only your actual source code is analyzed for untestable static API calls.