find-untested-sources

Identifies source files lacking test references via parse-only static analysis and emits prioritized JSON reports.

Updated Jul 12, 2026
One-click install
npx skills add https://github.com/Patrick-Rex/DotNetTechSamples --skill find-untested-sources-patrick-rex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: find-untested-sources
Source: https://github.com/Patrick-Rex/DotNetTechSamples/tree/main/.agents/plugins/dotnet-test/skills/find-untested-sources
Command: npx skills add https://github.com/Patrick-Rex/DotNetTechSamples --skill find-untested-sources-patrick-rex

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Microsoft.CodeAnalysis.CSharp, tree-sitter-language-pack, and includes scripts (resource) components.

What problem does it solve? Before writing new tests, developers need to know which source files have no test coverage, but running coverage tools requires a green build and a full test run that can take many minutes. This Skill answers that question statically in seconds by parsing source and test files to build a source-to-test pairing map, with no build, no dependency resolution, and no compilation. ## Core Features & Use Cases - Dual analysis engines: A Roslyn-based C# analyzer with strict namespace disambiguation for .NET-only repos, and a tree-sitter polyglot analyzer supporting Python, TypeScript/JavaScript, Go, Java, Rust, Ruby, and C#. - Prioritized JSON worklist: Emits untested files ordered by declaration count (API surface), each with a suggested_test_path derived from existing project references, plus source-to-test pairing maps and orphan test detection. - Use Case: An agent preparing to generate tests runs the analyzer on a large repository, receives a ranked list of untested files with suggested test paths, and picks the highest-API-surface file to test first without reading the entire codebase. ## Quick Start Run the find-untested-sources analyzer on this repository and show me the top untested source files with their suggested test paths.

Frequently Asked Questions about find-untested-sources

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

FAQPage Schema
How do I find untested source files in a C# repository?

Run the Roslyn-based analyzer with dotnet run scripts/Find-UntestedSources.cs -- <repo-root>. It parses all .cs files without compiling, classifies test projects by name suffixes and test SDK references, and emits JSON listing untested files ordered by declaration count.

How to detect which files have no tests in a polyglot repo?

Use the tree-sitter Python analyzer with python scripts/find_untested_sources.py <repo-root>. It supports Python, TypeScript, JavaScript, Go, Java, Rust, Ruby, and C#, pairing tests to sources via import resolution and identifier overlap.

Roslyn vs tree-sitter analyzer for C# test gap analysis?

For .NET-only repositories, prefer the Roslyn engine because its namespace-aware disambiguation avoids false pairings on common short names like Settings or Context. Use the tree-sitter engine when the repo mixes multiple languages.

Does static test pairing replace code coverage analysis?

No. This is a parse-only heuristic that answers which files have no referencing tests, not which lines or branches were executed. For line/branch coverage or CRAP risk scores, run an actual coverage tool on the triaged candidates.

Why are some tested files reported as untested?

Types referenced only through reflection, DI container resolution, or extension methods invoked as instance methods never appear by name in test source, so the static analysis cannot credit them. Short identifiers under four characters are also dropped to reduce noise.