[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DYX0EGXDC4W4D98Y9NHVH2":3,"skill-same:01M6DYX0EGXDC4W4D98Y9NHVH2":99},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":49,"linkOnly":50,"markdownContent":51,"markdownBody":52,"frontMatter":53,"refName":55,"commitSha":56,"skillDirectory":57,"forksCount":58,"repositoryHtmlUrl":59,"repositoryHomepageUrl":60,"ownerHtmlUrl":61,"ownerBlogUrl":62,"ownerDescription":63,"updatedAt":64,"install":65,"resources":78},"01M6DYX0EGXDC4W4D98Y9NHVH2","find-untested-sources",null,"MANDATORY for static source-to-test pairing: find or list source files\u002Fmodules without corresponding tests, or suggest test locations from repository structure. Invoke even for a tiny package; do not substitute manual globbing. Uses Roslyn for C#\u002F.NET and tree-sitter for Python, TS\u002FJS, Go, Java, Rust, Ruby, Kotlin, Swift, PowerShell, and C++. DO NOT USE FOR: real line\u002Fbranch\u002FCobertura data, coverage-backed test priorities, CRAP risk, or grading existing tests.","managedcode\u002Fdotnet-skills","managedcode","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F78253589?v=4","01M6DYDJR3EG8KB5G4PC65XCTT","Managed Code","01M6DYDJX0ZT432N04NYJW89DN",515,"MIT","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FTesting\u002FOfficial-DotNet-Test\u002Fskills\u002Ffind-untested-sources\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],"sources","find untested sources","find","list","invoke","static","line","tests","grading","c++","structure","priorities","do","files","modules","use","coverage","go","branch","kotlin","ruby","risk","powershell","data","repository","java","package","test","rust","python","2026-11-10 10:12:30",false,"---\nname: find-untested-sources\ndescription: >\n  MANDATORY for static source-to-test pairing: find or list source files\u002Fmodules\n  without corresponding tests, or suggest test locations from repository\n  structure. Invoke even for a tiny package; do not substitute manual globbing.\n  Uses Roslyn for C#\u002F.NET and tree-sitter for Python, TS\u002FJS, Go, Java, Rust,\n  Ruby, Kotlin, Swift, PowerShell, and C++. DO NOT USE FOR: real\n  line\u002Fbranch\u002FCobertura data, coverage-backed test priorities, CRAP risk, or\n  grading existing tests.\nlicense: MIT\n---\n\n# Find Untested Sources\n\n## Purpose\n\nCoverage tools answer \"which lines were executed?\" — they require a green build\nand a passing test run, which is minutes-to-tens-of-minutes on a real repo. The\nquestion this skill answers is different and much cheaper:\n\n> _Which source files have no test file referencing any of their declared\n> types\u002Fsymbols?_\n\nThat's the question an agent asks **before** writing a new test — and it can be\nanswered statically in a few seconds by parsing source files, with **no build,\nno dependency resolution, and no compilation**. The output is a deterministic\ntest-pairing map that lets the agent pick the next file to test without reading\nthe entire codebase first.\n\n## Two engines — pick one\n\nThis skill ships two interchangeable analyzers with a compatible JSON contract:\n\n| Engine | Script | Use when |\n|--------|--------|----------|\n| **Roslyn (C#)** | `scripts\u002FFind-UntestedSources.cs` | The repo is **.NET-only**. Parses every `.cs` file with the Roslyn syntax API and does strict **namespace disambiguation**, so it is materially more accurate on duplicated short names like `Settings` or `Context`. |\n| **tree-sitter (polyglot)** | `scripts\u002Ffind_untested_sources.py` | The repo is **not exclusively C#**, or you want one tool across C#, Python, TypeScript\u002FJavaScript, Go, Java, Rust, Ruby, Kotlin, Swift, PowerShell, and C++. |\n\nFor a .NET-only repository, **prefer the Roslyn engine** — its namespace-aware\npairing beats the polyglot engine's identifier overlap.\n\n## Required workflow\n\n1. Use the narrowest repository or package root named by the caller. Do not scan\n   a parent workspace when the request identifies a subdirectory.\n2. Execute the appropriate analyzer once. Do not replace analyzer execution with\n   manual globbing, filename matching, or visual inspection.\n   For polyglot analysis, pass `--include-tested` when the answer must distinguish\n   paired sources from unpaired sources.\n   \"Static pairing only\" prohibits compiling the target repository and running\n   its tests; it does not prohibit launching this skill's parse-only analyzer.\n   State that distinction briefly when the caller also says \"do not build.\"\n   Treat analyzer dependencies as environment prerequisites: do not install\n   packages, try the wrong engine, build the repository, or fall back to a manual\n   scan when an analyzer invocation fails. Report the prerequisite failure instead.\n3. Base the result on the analyzer's JSON. Preserve its paired\u002Funpaired\n   classification and suggested relative path; do not guess a different path.\n4. When the caller named a subdirectory, prefix analyzer-relative paths with\n   that subdirectory so reported paths are workspace-relative.\n5. Report the requested result plus the static-pairing coverage caveat. Do not\n   append build, package-install, test-run, or coverage commands. When paired\n   sources exist, name their covering test files so the unpaired classification\n   is auditable.\n\n## When to Use\n\n- User asks \"where should I add tests based on source pairing?\", \"which files\n  have no tests?\", \"find unpaired source files\", or \"give me a static test gap\n  list\".\n- Before invoking a test-generation agent, to produce a source-pairing worklist.\n- After generating tests, to verify each new test file pairs to a source file.\n- To enumerate \"weakly paired\" source files (only one referring test) for\n  follow-up depth checks.\n\n## When Not to Use\n\n- **Line\u002Fbranch coverage** — use `coverage-analysis`.\n- **Priorities derived from real coverage data** — use `coverage-analysis`.\n- **CRAP-score \u002F risk hotspots** — use `coverage-analysis`.\n- **Are existing tests strong?** — use `test-gap-analysis` (mutation reasoning)\n  or `assertion-quality`.\n\n## Roslyn engine (C#)\n\n### Prerequisites\n\n- .NET SDK that supports file-based apps (`dotnet run script.cs`). Pinned in the\n  repo's `global.json` (SDK 11 preview or later).\n- No internet access required beyond the initial NuGet restore of\n  `Microsoft.CodeAnalysis.CSharp` on first run.\n\n### Usage\n\n```powershell\n# From the skill folder\ndotnet run scripts\u002FFind-UntestedSources.cs -- \u003Crepo-root> [--top N]\n\n# Save the report\ndotnet run scripts\u002FFind-UntestedSources.cs -- \u003Crepo-root> > pairing.json\n\n# Iterate the untested list, highest-API-surface first\n$report = Get-Content pairing.json | ConvertFrom-Json\n$report.untested | Select-Object -First 10 source, decl_count, suggested_test_path\n```\n\nDiagnostics go to stderr; JSON goes to stdout.\n\n### Output schema\n\n```jsonc\n{\n  \"repo\": \"\u003Cabsolute path>\",\n  \"elapsed_ms\": 8883,\n  \"counts\": {\n    \"source_files\": 3036,\n    \"test_files\": 867,\n    \"untested_files\": 1852,\n    \"paired_files\": 1184\n  },\n  \"untested\": [\n    {\n      \"source\": \"src\u002FFoo\u002FBar.cs\",\n      \"decl_count\": 8,            \u002F\u002F # of type declarations in the file\n      \"suggested_test_path\":      \u002F\u002F mirror of source under a discovered test project\n        \"tests\u002FFoo.Tests\u002FBar\u002FBarTests.cs\"\n    }\n  ],\n  \"source_to_tests\": {\n    \"src\u002FFoo\u002FBaz.cs\": [\n      \"tests\u002FFoo.Tests\u002FBazTests.cs\",\n      \"tests\u002FFoo.IntegrationTests\u002FScenarios\u002FBazScenarios.cs\"\n    ]\n  }\n}\n```\n\n### How it works\n\n1. **File discovery** — recursive walk pruning `bin\u002F`, `obj\u002F`, `node_modules\u002F`,\n   `.git\u002F`, `.vs\u002F`, `packages\u002F`, and any dotted subdir. Skips generated files\n   (`.g.cs`, `.Designer.cs`, `.AssemblyInfo.cs`).\n2. **Test vs source classification** — walks up to the nearest `.csproj` and\n   marks it a test project if the project name ends in `.Tests`, `.Test`,\n   `.UnitTests`, `.IntegrationTests`, `.E2E`, `.EndToEnd`, `.Spec`, `.Specs`, or\n   the content references `Microsoft.NET.Test.Sdk`, `MSTest.Sdk`,\n   `Microsoft.Testing.Platform`, `xunit`, `NUnit`, `TUnit`, or\n   `\u003CIsTestProject>true\u003C\u002FIsTestProject>`.\n3. **Source index (parallel)** — parse each source file with\n   `CSharpSyntaxTree.ParseText` (syntax only, no compilation); record every\n   `BaseTypeDeclarationSyntax` \u002F `DelegateDeclarationSyntax` as\n   `(ShortName, EnclosingNamespace, FilePath)`.\n4. **Test scan (parallel)** — parse each test file, collect `using` directives +\n   enclosing namespace, walk every `IdentifierToken`, look it up in the\n   short-name index, and **disambiguate strictly**: an identifier is attributed\n   only if the declaration's namespace matches one of the test file's `using`\n   directives, the enclosing namespace, or a prefix of them. This avoids noise\n   where common names like `Settings` or `Context` match every project.\n5. **Pairing & suggestion** — invert into `source → [tests]`. Build a\n   production-to-test project map from `\u003CProjectReference>` entries; for each\n   untested source, mirror its in-project relative path under the referencing\n   test project to suggest a path.\n6. **JSON emit** — ordered by declaration count desc, then alphabetical.\n\n## Polyglot engine (tree-sitter)\n\n### Prerequisites\n\n- Python 3.10+.\n- `pip install tree-sitter-language-pack` (single self-contained wheel that\n  bundles parsers for 300+ languages and the high-level `process()` API). No\n  native build, no per-language grammar install.\n\n### Usage\n\n```powershell\n# From the skill folder\npython scripts\u002Ffind_untested_sources.py \u003Crepo-root>\n\n# Restrict to a language (repeatable)\npython scripts\u002Ffind_untested_sources.py \u003Crepo-root> --lang python --lang typescript\n\n# Truncate the report (top 20 by declared API surface)\npython scripts\u002Ffind_untested_sources.py \u003Crepo-root> --limit-untested 20 > pairing.json\n\n# Iterate, highest-API-surface first\n$report = Get-Content pairing.json | ConvertFrom-Json\n$report.untested_sources | Select-Object -First 10 path, declaration_count, suggested_test_path\n```\n\nPass `--include-tested` to additionally emit `tested_sources` (omitted by\ndefault to keep the payload small for LLM consumption). Diagnostics go to\nstderr; JSON goes to stdout.\n\n### Output schema\n\n```jsonc\n{\n  \"repo_root\": \"\u003Cabsolute path>\",\n  \"summary\": {\n    \"source_files\": 3138,\n    \"test_files\": 761,\n    \"tested_source_files\": 1419,\n    \"untested_source_files\": 1719,\n    \"orphan_test_files\": 15,\n    \"languages\": [\"csharp\"]\n  },\n  \"untested_sources\": [\n    {\n      \"path\": \"src\u002FFoo\u002FBar.cs\",\n      \"language\": \"csharp\",\n      \"declaration_count\": 8,\n      \"declarations\": [\"Bar\", \"BarOptions\", \"IBar\", \"...\"],\n      \"suggested_test_path\": \"src\u002FFoo\u002FBarTests.cs\"\n    }\n  ],\n  \"orphan_tests\": [\n    { \"path\": \"tests\u002FSomeIntegrationTest.cs\", \"language\": \"csharp\" }\n  ]\n}\n```\n\n### How it works\n\n1. **File discovery** — recursive walk pruning common build\u002Fvendor dirs (`bin`,\n   `obj`, `node_modules`, `target`, `dist`, `build`, `vendor`, `__pycache__`,\n   `.venv`, `.git`, …) and generated files (`.d.ts`, `.g.cs`, `.Designer.cs`,\n   `_pb2.py`, `*.min.js`, `AssemblyInfo.cs`, …).\n2. **Language detection** — `detect_language_from_path` maps the extension to a\n   supported language; unknown extensions are skipped.\n3. **Test-vs-source classification** — per-language path heuristics:\n\n   | Language | Test rule |\n   |---|---|\n   | Python | path contains `tests\u002F`\u002F`test\u002F`; or filename starts with `test_` or ends `_test.py`; or `conftest.py`. |\n   | JS\u002FTS\u002FTSX | path contains `__tests__`, `tests`, `test`, `spec`, `e2e`; or filename contains `.test.`\u002F`.spec.`. |\n   | Go | filename ends `_test.go`. |\n   | Java | path contains `test`\u002F`tests`; or filename ends `Test.java`\u002F`Tests.java`. |\n   | Rust | path contains `tests\u002F`\u002F`benches\u002F`. |\n   | C# | path contains `tests\u002F`; or project segment ends `.Tests`\u002F`.Test`\u002F`.UnitTests`\u002F`.IntegrationTests`; or filename ends `Tests`\u002F`Test`. |\n   | Ruby | path contains `spec\u002F`\u002F`test\u002F`; or filename ends `_spec.rb`\u002F`_test.rb`. |\n   | Kotlin | path contains `test\u002F`\u002F`tests\u002F`\u002F`spec\u002F`; or filename ends `Test.kt`\u002F`Tests.kt`\u002F`Spec.kt`. |\n   | Swift | path contains `test\u002F`\u002F`tests\u002F`\u002F`uitests\u002F`\u002F`integrationtests\u002F` (case-insensitive); or filename ends `Test.swift`\u002F`Tests.swift`. |\n   | PowerShell | path contains `test\u002F`\u002F`tests\u002F`\u002F`pester\u002F`; or filename ends `.Tests.ps1`\u002F`.Test.ps1`. |\n   | C++ | path contains `test\u002F`\u002F`tests\u002F`\u002F`testing\u002F`; or filename starts `test_` or ends `_test.cpp`\u002F`_tests.cpp`. |\n\n4. **Per-file extraction** — `process(text, ProcessConfig(structure, imports,\n   symbols))` returns declared items, raw import statements, and a flat declared\n   -name list.\n5. **Pairing** — for each test file, union **import resolution** (per language,\n   e.g. Python `from pkg.mod import x` → `pkg\u002Fmod.py`; Java `import a.b.C;` →\n   `a\u002Fb\u002FC.java`; C# `using` is namespace-not-file, so a no-op) with **identifier\n   overlap** (word-like tokens, length ≥ 4, matched against declared names).\n6. **JSON emit** — `untested_sources` ordered by declaration count descending.\n\n## Limitations (be honest with the agent)\n\nBoth engines are static, parse-only heuristics that trade a little accuracy for\norders-of-magnitude lower cost than coverage. Known gaps:\n\n- **Reflection \u002F DI-resolved types** referenced only via a string name or\n  container resolution won't be detected — the type's short name never appears\n  in the test source.\n- **Extension methods** invoked as instance methods (C#): the declaring static\n  class is not named, so its file is not credited.\n- **`var`, target-typed `new()`, pattern matching** lose the type token; the\n  file-level union usually still catches it through other references.\n- **Short identifier names** (polyglot, \u003C 4 chars) are dropped to avoid noisy\n  pairings on names like `id`, `db`, `Tag`.\n- **Monorepo path aliases** (TS path mapping, Java module-info) are not\n  resolved; a suffix-match fallback may pick the wrong source if two files share\n  a trailing path segment.\n\nFor these cases, run actual coverage (`coverage-analysis`) on the unpaired\ncandidates the agent has already triaged.\n\nAlways label the final result as a static pairing heuristic, not evidence of\nline or branch coverage. Include that caveat even when every requested source\nfile has an obvious matching or missing test.\n\n## Outputs the agent should consume\n\n- `untested[*].source` \u002F `untested_sources[*].path` — pick the next source file\n  to test (highest declaration count first).\n- `*.suggested_test_path` — drop-in target for the new test file; the Roslyn\n  engine honors the test project that already `\u003CProjectReference>`s the source's\n  project, so `dotnet sln add` is not needed. The polyglot engine may suggest a\n  co-located test when no test root is discoverable. When a source sibling is\n  already paired, its test directory is the established convention and must be\n  reused for the missing sibling rather than falling back to source co-location.\n- `source_to_tests` (Roslyn) \u002F `--include-tested` `tested_sources` (polyglot) —\n  verify a newly written test file lands in the list for the intended source.\n- `orphan_tests` (polyglot) — tests that don't reference any same-language\n  source file; useful for triaging stale or integration-only tests.\n","# Find Untested Sources\n\n## Purpose\n\nCoverage tools answer \"which lines were executed?\" — they require a green build\nand a passing test run, which is minutes-to-tens-of-minutes on a real repo. The\nquestion this skill answers is different and much cheaper:\n\n> _Which source files have no test file referencing any of their declared\n> types\u002Fsymbols?_\n\nThat's the question an agent asks **before** writing a new test — and it can be\nanswered statically in a few seconds by parsing source files, with **no build,\nno dependency resolution, and no compilation**. The output is a deterministic\ntest-pairing map that lets the agent pick the next file to test without reading\nthe entire codebase first.\n\n## Two engines — pick one\n\nThis skill ships two interchangeable analyzers with a compatible JSON contract:\n\n| Engine | Script | Use when |\n|--------|--------|----------|\n| **Roslyn (C#)** | `scripts\u002FFind-UntestedSources.cs` | The repo is **.NET-only**. Parses every `.cs` file with the Roslyn syntax API and does strict **namespace disambiguation**, so it is materially more accurate on duplicated short names like `Settings` or `Context`. |\n| **tree-sitter (polyglot)** | `scripts\u002Ffind_untested_sources.py` | The repo is **not exclusively C#**, or you want one tool across C#, Python, TypeScript\u002FJavaScript, Go, Java, Rust, Ruby, Kotlin, Swift, PowerShell, and C++. |\n\nFor a .NET-only repository, **prefer the Roslyn engine** — its namespace-aware\npairing beats the polyglot engine's identifier overlap.\n\n## Required workflow\n\n1. Use the narrowest repository or package root named by the caller. Do not scan\n   a parent workspace when the request identifies a subdirectory.\n2. Execute the appropriate analyzer once. Do not replace analyzer execution with\n   manual globbing, filename matching, or visual inspection.\n   For polyglot analysis, pass `--include-tested` when the answer must distinguish\n   paired sources from unpaired sources.\n   \"Static pairing only\" prohibits compiling the target repository and running\n   its tests; it does not prohibit launching this skill's parse-only analyzer.\n   State that distinction briefly when the caller also says \"do not build.\"\n   Treat analyzer dependencies as environment prerequisites: do not install\n   packages, try the wrong engine, build the repository, or fall back to a manual\n   scan when an analyzer invocation fails. Report the prerequisite failure instead.\n3. Base the result on the analyzer's JSON. Preserve its paired\u002Funpaired\n   classification and suggested relative path; do not guess a different path.\n4. When the caller named a subdirectory, prefix analyzer-relative paths with\n   that subdirectory so reported paths are workspace-relative.\n5. Report the requested result plus the static-pairing coverage caveat. Do not\n   append build, package-install, test-run, or coverage commands. When paired\n   sources exist, name their covering test files so the unpaired classification\n   is auditable.\n\n## When to Use\n\n- User asks \"where should I add tests based on source pairing?\", \"which files\n  have no tests?\", \"find unpaired source files\", or \"give me a static test gap\n  list\".\n- Before invoking a test-generation agent, to produce a source-pairing worklist.\n- After generating tests, to verify each new test file pairs to a source file.\n- To enumerate \"weakly paired\" source files (only one referring test) for\n  follow-up depth checks.\n\n## When Not to Use\n\n- **Line\u002Fbranch coverage** — use `coverage-analysis`.\n- **Priorities derived from real coverage data** — use `coverage-analysis`.\n- **CRAP-score \u002F risk hotspots** — use `coverage-analysis`.\n- **Are existing tests strong?** — use `test-gap-analysis` (mutation reasoning)\n  or `assertion-quality`.\n\n## Roslyn engine (C#)\n\n### Prerequisites\n\n- .NET SDK that supports file-based apps (`dotnet run script.cs`). Pinned in the\n  repo's `global.json` (SDK 11 preview or later).\n- No internet access required beyond the initial NuGet restore of\n  `Microsoft.CodeAnalysis.CSharp` on first run.\n\n### Usage\n\n```powershell\n# From the skill folder\ndotnet run scripts\u002FFind-UntestedSources.cs -- \u003Crepo-root> [--top N]\n\n# Save the report\ndotnet run scripts\u002FFind-UntestedSources.cs -- \u003Crepo-root> > pairing.json\n\n# Iterate the untested list, highest-API-surface first\n$report = Get-Content pairing.json | ConvertFrom-Json\n$report.untested | Select-Object -First 10 source, decl_count, suggested_test_path\n```\n\nDiagnostics go to stderr; JSON goes to stdout.\n\n### Output schema\n\n```jsonc\n{\n  \"repo\": \"\u003Cabsolute path>\",\n  \"elapsed_ms\": 8883,\n  \"counts\": {\n    \"source_files\": 3036,\n    \"test_files\": 867,\n    \"untested_files\": 1852,\n    \"paired_files\": 1184\n  },\n  \"untested\": [\n    {\n      \"source\": \"src\u002FFoo\u002FBar.cs\",\n      \"decl_count\": 8,            \u002F\u002F # of type declarations in the file\n      \"suggested_test_path\":      \u002F\u002F mirror of source under a discovered test project\n        \"tests\u002FFoo.Tests\u002FBar\u002FBarTests.cs\"\n    }\n  ],\n  \"source_to_tests\": {\n    \"src\u002FFoo\u002FBaz.cs\": [\n      \"tests\u002FFoo.Tests\u002FBazTests.cs\",\n      \"tests\u002FFoo.IntegrationTests\u002FScenarios\u002FBazScenarios.cs\"\n    ]\n  }\n}\n```\n\n### How it works\n\n1. **File discovery** — recursive walk pruning `bin\u002F`, `obj\u002F`, `node_modules\u002F`,\n   `.git\u002F`, `.vs\u002F`, `packages\u002F`, and any dotted subdir. Skips generated files\n   (`.g.cs`, `.Designer.cs`, `.AssemblyInfo.cs`).\n2. **Test vs source classification** — walks up to the nearest `.csproj` and\n   marks it a test project if the project name ends in `.Tests`, `.Test`,\n   `.UnitTests`, `.IntegrationTests`, `.E2E`, `.EndToEnd`, `.Spec`, `.Specs`, or\n   the content references `Microsoft.NET.Test.Sdk`, `MSTest.Sdk`,\n   `Microsoft.Testing.Platform`, `xunit`, `NUnit`, `TUnit`, or\n   `\u003CIsTestProject>true\u003C\u002FIsTestProject>`.\n3. **Source index (parallel)** — parse each source file with\n   `CSharpSyntaxTree.ParseText` (syntax only, no compilation); record every\n   `BaseTypeDeclarationSyntax` \u002F `DelegateDeclarationSyntax` as\n   `(ShortName, EnclosingNamespace, FilePath)`.\n4. **Test scan (parallel)** — parse each test file, collect `using` directives +\n   enclosing namespace, walk every `IdentifierToken`, look it up in the\n   short-name index, and **disambiguate strictly**: an identifier is attributed\n   only if the declaration's namespace matches one of the test file's `using`\n   directives, the enclosing namespace, or a prefix of them. This avoids noise\n   where common names like `Settings` or `Context` match every project.\n5. **Pairing & suggestion** — invert into `source → [tests]`. Build a\n   production-to-test project map from `\u003CProjectReference>` entries; for each\n   untested source, mirror its in-project relative path under the referencing\n   test project to suggest a path.\n6. **JSON emit** — ordered by declaration count desc, then alphabetical.\n\n## Polyglot engine (tree-sitter)\n\n### Prerequisites\n\n- Python 3.10+.\n- `pip install tree-sitter-language-pack` (single self-contained wheel that\n  bundles parsers for 300+ languages and the high-level `process()` API). No\n  native build, no per-language grammar install.\n\n### Usage\n\n```powershell\n# From the skill folder\npython scripts\u002Ffind_untested_sources.py \u003Crepo-root>\n\n# Restrict to a language (repeatable)\npython scripts\u002Ffind_untested_sources.py \u003Crepo-root> --lang python --lang typescript\n\n# Truncate the report (top 20 by declared API surface)\npython scripts\u002Ffind_untested_sources.py \u003Crepo-root> --limit-untested 20 > pairing.json\n\n# Iterate, highest-API-surface first\n$report = Get-Content pairing.json | ConvertFrom-Json\n$report.untested_sources | Select-Object -First 10 path, declaration_count, suggested_test_path\n```\n\nPass `--include-tested` to additionally emit `tested_sources` (omitted by\ndefault to keep the payload small for LLM consumption). Diagnostics go to\nstderr; JSON goes to stdout.\n\n### Output schema\n\n```jsonc\n{\n  \"repo_root\": \"\u003Cabsolute path>\",\n  \"summary\": {\n    \"source_files\": 3138,\n    \"test_files\": 761,\n    \"tested_source_files\": 1419,\n    \"untested_source_files\": 1719,\n    \"orphan_test_files\": 15,\n    \"languages\": [\"csharp\"]\n  },\n  \"untested_sources\": [\n    {\n      \"path\": \"src\u002FFoo\u002FBar.cs\",\n      \"language\": \"csharp\",\n      \"declaration_count\": 8,\n      \"declarations\": [\"Bar\", \"BarOptions\", \"IBar\", \"...\"],\n      \"suggested_test_path\": \"src\u002FFoo\u002FBarTests.cs\"\n    }\n  ],\n  \"orphan_tests\": [\n    { \"path\": \"tests\u002FSomeIntegrationTest.cs\", \"language\": \"csharp\" }\n  ]\n}\n```\n\n### How it works\n\n1. **File discovery** — recursive walk pruning common build\u002Fvendor dirs (`bin`,\n   `obj`, `node_modules`, `target`, `dist`, `build`, `vendor`, `__pycache__`,\n   `.venv`, `.git`, …) and generated files (`.d.ts`, `.g.cs`, `.Designer.cs`,\n   `_pb2.py`, `*.min.js`, `AssemblyInfo.cs`, …).\n2. **Language detection** — `detect_language_from_path` maps the extension to a\n   supported language; unknown extensions are skipped.\n3. **Test-vs-source classification** — per-language path heuristics:\n\n   | Language | Test rule |\n   |---|---|\n   | Python | path contains `tests\u002F`\u002F`test\u002F`; or filename starts with `test_` or ends `_test.py`; or `conftest.py`. |\n   | JS\u002FTS\u002FTSX | path contains `__tests__`, `tests`, `test`, `spec`, `e2e`; or filename contains `.test.`\u002F`.spec.`. |\n   | Go | filename ends `_test.go`. |\n   | Java | path contains `test`\u002F`tests`; or filename ends `Test.java`\u002F`Tests.java`. |\n   | Rust | path contains `tests\u002F`\u002F`benches\u002F`. |\n   | C# | path contains `tests\u002F`; or project segment ends `.Tests`\u002F`.Test`\u002F`.UnitTests`\u002F`.IntegrationTests`; or filename ends `Tests`\u002F`Test`. |\n   | Ruby | path contains `spec\u002F`\u002F`test\u002F`; or filename ends `_spec.rb`\u002F`_test.rb`. |\n   | Kotlin | path contains `test\u002F`\u002F`tests\u002F`\u002F`spec\u002F`; or filename ends `Test.kt`\u002F`Tests.kt`\u002F`Spec.kt`. |\n   | Swift | path contains `test\u002F`\u002F`tests\u002F`\u002F`uitests\u002F`\u002F`integrationtests\u002F` (case-insensitive); or filename ends `Test.swift`\u002F`Tests.swift`. |\n   | PowerShell | path contains `test\u002F`\u002F`tests\u002F`\u002F`pester\u002F`; or filename ends `.Tests.ps1`\u002F`.Test.ps1`. |\n   | C++ | path contains `test\u002F`\u002F`tests\u002F`\u002F`testing\u002F`; or filename starts `test_` or ends `_test.cpp`\u002F`_tests.cpp`. |\n\n4. **Per-file extraction** — `process(text, ProcessConfig(structure, imports,\n   symbols))` returns declared items, raw import statements, and a flat declared\n   -name list.\n5. **Pairing** — for each test file, union **import resolution** (per language,\n   e.g. Python `from pkg.mod import x` → `pkg\u002Fmod.py`; Java `import a.b.C;` →\n   `a\u002Fb\u002FC.java`; C# `using` is namespace-not-file, so a no-op) with **identifier\n   overlap** (word-like tokens, length ≥ 4, matched against declared names).\n6. **JSON emit** — `untested_sources` ordered by declaration count descending.\n\n## Limitations (be honest with the agent)\n\nBoth engines are static, parse-only heuristics that trade a little accuracy for\norders-of-magnitude lower cost than coverage. Known gaps:\n\n- **Reflection \u002F DI-resolved types** referenced only via a string name or\n  container resolution won't be detected — the type's short name never appears\n  in the test source.\n- **Extension methods** invoked as instance methods (C#): the declaring static\n  class is not named, so its file is not credited.\n- **`var`, target-typed `new()`, pattern matching** lose the type token; the\n  file-level union usually still catches it through other references.\n- **Short identifier names** (polyglot, \u003C 4 chars) are dropped to avoid noisy\n  pairings on names like `id`, `db`, `Tag`.\n- **Monorepo path aliases** (TS path mapping, Java module-info) are not\n  resolved; a suffix-match fallback may pick the wrong source if two files share\n  a trailing path segment.\n\nFor these cases, run actual coverage (`coverage-analysis`) on the unpaired\ncandidates the agent has already triaged.\n\nAlways label the final result as a static pairing heuristic, not evidence of\nline or branch coverage. Include that caveat even when every requested source\nfile has an obvious matching or missing test.\n\n## Outputs the agent should consume\n\n- `untested[*].source` \u002F `untested_sources[*].path` — pick the next source file\n  to test (highest declaration count first).\n- `*.suggested_test_path` — drop-in target for the new test file; the Roslyn\n  engine honors the test project that already `\u003CProjectReference>`s the source's\n  project, so `dotnet sln add` is not needed. The polyglot engine may suggest a\n  co-located test when no test root is discoverable. When a source sibling is\n  already paired, its test directory is the established convention and must be\n  reused for the missing sibling rather than falling back to source co-location.\n- `source_to_tests` (Roslyn) \u002F `--include-tested` `tested_sources` (polyglot) —\n  verify a newly written test file lands in the list for the intended source.\n- `orphan_tests` (polyglot) — tests that don't reference any same-language\n  source file; useful for triaging stale or integration-only tests.\n",{"name":5,"license":15,"description":54},"MANDATORY for static source-to-test pairing: find or list source files\u002Fmodules without corresponding tests, or suggest test locations from repository structure. Invoke even for a tiny package; do not substitute manual globbing. Uses Roslyn for C#\u002F.NET and tree-sitter for Python, TS\u002FJS, Go, Java, Rust, Ruby, Kotlin, Swift, PowerShell, and C++. DO NOT USE FOR: real line\u002Fbranch\u002FCobertura data, coverage-backed test priorities, CRAP risk, or grading existing tests.\n","main","497cc9aba79a931ac6fb8d36a48cc22fe3d6d74b","catalog\u002FTesting\u002FOfficial-DotNet-Test\u002Fskills\u002Ffind-untested-sources",41,"https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills","https:\u002F\u002Fskills.managed-code.com","https:\u002F\u002Fgithub.com\u002Fmanagedcode","https:\u002F\u002Fwww.managed-code.com","Open Source Community for .NET Developers: Reliable, Actively Maintained, and Community-Driven. Made in Ukraine 🇺🇦 with ❤️","2026-11-14 19:05:44",{"source":8,"skillName":5,"commands":66,"prompt":76,"zipAvailable":77},[67,70,73],{"tool":68,"command":69},"npx","npx skills add managedcode\u002Fdotnet-skills --skill find-untested-sources",{"tool":71,"command":72},"bunx","bunx skills add managedcode\u002Fdotnet-skills --skill find-untested-sources",{"tool":74,"command":75},"pnpm","pnpm dlx skills add managedcode\u002Fdotnet-skills --skill find-untested-sources","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FTesting\u002FOfficial-DotNet-Test\u002Fskills\u002Ffind-untested-sources\u002FSKILL.md",true,[79,85,89,95],{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"index.json","REFERENCE","参考文档",611,"https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fsoc\u002Fhunting\u002Fdll\u002Fdetect\u002Findex.json",{"path":86,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":87,"sourceHtmlUrl":88},"manifest.json",114,"https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FTesting\u002FOfficial-DotNet-Test\u002Fskills\u002Ffind-untested-sources\u002Fmanifest.json",{"path":90,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":93,"sourceHtmlUrl":94},"scripts\u002Ffind_untested_sources.py","SCRIPT","脚本",35897,"https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FTesting\u002FOfficial-DotNet-Test\u002Fskills\u002Ffind-untested-sources\u002Fscripts\u002Ffind_untested_sources.py",{"path":96,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":97,"sourceHtmlUrl":98},"scripts\u002FFind-UntestedSources.cs",24622,"https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FTesting\u002FOfficial-DotNet-Test\u002Fskills\u002Ffind-untested-sources\u002Fscripts\u002FFind-UntestedSources.cs",[100,135,158,189,199,226],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":116,"publishedAt":49},"01M6DYQE1Y9FHAQHEDTVFQ3447","xtwitter-scraper","Use XTwitterScraper when a .NET application needs typed access to Xquik's X automation REST API for tweet search, user lookup, posting workflows, extraction jobs, monitors, webhooks, or giveaway draws. USE FOR: integrating the XTwitterScraper NuGet package; reviewing Xquik API client usage; modeling API-key configuration, pagination, binary exports, raw responses, retries, and webhook\u002Fevent flows in .NET. DO NOT USE FOR: unrelated stacks; direct browser automation; generic social-media strategy; or code that does not call Xquik. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FLibraries\u002FXTwitterScraper\u002Fskills\u002Fxtwitter-scraper\u002FSKILL.md",[106,111],{"categoryNo":107,"categoryName":108,"taxonomyType":109,"taxonomyTypeDesc":110},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":112,"categoryName":113,"taxonomyType":114,"taxonomyTypeDesc":115},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[117,118,119,120,121,122,123,43,124,125,126,127,128,129,130,32,131,132,133,134],"xtwitter scraper","browser automation","workflows","run","code","browser","search","api","Media","api client","access","edit","unrelated","webhooks","social","commands","modeling","webhook",{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":147,"publishedAt":49},"01M6DYQ9S4PE1H6G8MCH9T21HR","sep","Use Sep for high-performance separated-value parsing and writing in .NET, including delimiter inference, explicit parser\u002Fwriter options, and low-allocation row\u002Fcolumn workflows. USE FOR: delimited data needs are performance-sensitive and allocation-aware; project needs explicit control over separator inference, escaping, trimming, and header behavior;. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fcatalog\u002FLibraries\u002FSep\u002Fskills\u002Fsep\u002FSKILL.md",[141,144],{"categoryNo":142,"categoryName":143,"taxonomyType":109,"taxonomyTypeDesc":110},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":145,"categoryName":146,"taxonomyType":114,"taxonomyTypeDesc":115},"01JBSEEDCAT000000000000036","内容创作者",[137,148,149,119,150,120,43,42,151,152,128,153,129,32,31,154,155,156,132,157],"writing","performance","tasks","parsing","parser","context","writer","options","project","high-performance",{"skillNo":159,"name":160,"nameZh":6,"description":161,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":162,"categories":163,"keywords":164,"publishedAt":49},"01M6DZS2DNEPXCGGF6SSCW6G5V","webgpu-threejs-tsl","Comprehensive guide for developing WebGPU-enabled Three.js applications using TSL (Three.js Shading Language). Covers WebGPU renderer setup, TSL syntax and node materials, compute shaders, post-processing effects, and WGSL integration. Use this skill when working with Three.js WebGPU, TSL shaders, node materials, or GPU compute in Three.js.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fexternal-sources\u002Fupstreams\u002Fwebgpu-claude-skill\u002Fskills\u002Fwebgpu-threejs-tsl\u002FSKILL.md",[],[165,166,167,168,169,170,171,172,173,174,175,176,34,177,178,179,180,181,182,183,184,185,186,187,188],"webgpu","threejs","webgpu threejs tsl","setup","shaders","gpu","integration","applications","js","node","syntax","guide","language","three","compute","post","processing","with","renderer","for","materials","wgsl","effects","when",{"skillNo":190,"name":191,"nameZh":6,"description":192,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":193,"categories":194,"keywords":195,"publishedAt":49},"01M6DZS0BQXW2B56A289XF1X76","roslynk","Use Roslynk for semantic inspection and edits of *.cs, *.razor and *.cshtml solution files.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fexternal-sources\u002Fupstreams\u002Froslynk\u002Fskills\u002Froslynk\u002FSKILL.md",[],[191,34,32,196,197,184,198],"semantic","razor","inspection",{"skillNo":200,"name":201,"nameZh":6,"description":202,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":203,"categories":204,"keywords":205,"publishedAt":49},"01M6DZRW6MEJCVW80K3S4XV60K","system-text-json-net11","Imperative guidance for the System.Text.Json APIs added in .NET 11: the built-in `JsonNamingPolicy.PascalCase` naming policy, and the strongly-typed generic `JsonSerializerOptions.GetTypeInfo` and `JsonSerializerOptions.TryGetTypeInfo` metadata accessors (generic overloads that return a typed `JsonTypeInfo`). USE ONLY when the user is targeting net11.0 or later and needs PascalCase JSON property or dictionary-key names without writing a custom naming policy, a strongly-typed generic `JsonTypeInfo` instead of the non-generic `JsonTypeInfo`, or a no-throw way to probe whether a type's serialization metadata is resolved. DO NOT USE when the target is earlier than net11.0, the requested behavior uses an established pre-net11 naming policy, or the user explicitly selected another JSON library.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fexternal-sources\u002Fupstreams\u002Fdotnet-skills\u002Fplugins\u002Fdotnet11\u002Fskills\u002Fsystem-text-json-net11\u002FSKILL.md",[],[206,207,208,209,148,210,211,212,213,214,215,34,216,217,218,219,31,220,221,222,223,184,224,225,188],"system","json","text","system text json net11","policy","metadata","library","serialization","behavior","user","only","probe","guidance","later","type","dictionary","naming","targeting","custom","generic",{"skillNo":227,"name":228,"nameZh":6,"description":229,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":230,"categories":231,"keywords":234,"publishedAt":49},"01M6DZRRJP3S662NFSG1RSPQQ7","process-api-net11","Provides guidance on the new System.Diagnostics.Process APIs introduced in .NET 11: Process.Run, Process.RunAndCaptureText, Process.StartAndForget, Process.ReadAllText\u002FBytes\u002FLines, KillOnParentExit, InheritedHandles, and StartDetached. USE FOR: starting, orchestrating, or capturing output from external processes in applications targeting net11.0 or later. DO NOT USE FOR: applications targeting .NET 10 or earlier, or basic pre-.NET 11 Process.Start usage without new APIs.","https:\u002F\u002Fgithub.com\u002Fmanagedcode\u002Fdotnet-skills\u002Fblob\u002Fmain\u002Fexternal-sources\u002Fupstreams\u002Fdotnet-skills\u002Fplugins\u002Fdotnet11\u002Fskills\u002Fprocess-api-net11\u002FSKILL.md",[232,233],{"categoryNo":107,"categoryName":108,"taxonomyType":109,"taxonomyTypeDesc":110},{"categoryNo":112,"categoryName":113,"taxonomyType":114,"taxonomyTypeDesc":115},[124,235,236,237,120,238,172,206,34,218,219,31,239,240,241,242,223,184,243],"process","process api net11","diagnostics","start","basic","processes","output","usage","new"]