[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CV8DC2CX61912B8D1E4RZV":3,"skill-same:01M7CV8DC2CX61912B8D1E4RZV":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":13,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7CV8DC2CX61912B8D1E4RZV","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.","deadmade\u002Fdead-agent-skills","deadmade","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F130925709?v=4","01M7CTQ65AGYR4J9K9TX0YR9V3","01M7CTQ66B4VMJFEDZP4EKKE6K",0,"MIT","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Ffind-untested-sources\u002FSKILL.md",[],[],"2026-11-15 14:19:17",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":14,"description":23},"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","ccab8dffc0ecc173838f51e4c5f0d3b51a704f41","plugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Ffind-untested-sources","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills","https:\u002F\u002Fgithub.com\u002Fdeadmade","https:\u002F\u002Fdeadmade.github.io\u002F","Blood, an Ocean of blood","2026-11-14 02:03:31",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add deadmade\u002Fdead-agent-skills --skill find-untested-sources",{"tool":38,"command":39},"bunx","bunx skills add deadmade\u002Fdead-agent-skills --skill find-untested-sources",{"tool":41,"command":42},"pnpm","pnpm dlx skills add deadmade\u002Fdead-agent-skills --skill find-untested-sources","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Ffind-untested-sources\u002FSKILL.md",true,[46,52],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"scripts\u002Ffind_untested_sources.py","SCRIPT","脚本",35897,"https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Ffind-untested-sources\u002Fscripts\u002Ffind_untested_sources.py",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"scripts\u002FFind-UntestedSources.cs",24622,"https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Ffind-untested-sources\u002Fscripts\u002FFind-UntestedSources.cs",[57,64,73,81,88,95],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":18},"01M7CVRBFTXSTTQ7F5P6PJEFYA","rust-best-practices","Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook. Use this skill when: (1) writing new Rust code or functions, (2) reviewing or refactoring existing Rust code, (3) deciding between borrowing vs cloning or ownership patterns, (4) implementing error handling with Result types, (5) optimizing Rust code for performance, (6) writing tests or documentation for Rust projects.","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Frust-skills\u002Fskills\u002Frust-best-practices\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":68,"licenseFileUrl":69,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M7CVR0W7B8EGTNPSPA7FPC4Z","postgres-database-migration","Use this skill for planning, testing, and safely executing PostgreSQL schema migrations — especially when working with production data or shared databases.\n\n**Trigger when user asks to:**\n- Test a schema migration before applying it to production\n- Add, remove, or rename columns safely on a live table\n- Change a column's data type without downtime\n- Add or drop indexes, constraints, or foreign keys on large tables\n- Understand which ALTER TABLE operations lock the table\n- Roll back a failed migration\n- Plan a zero-downtime migration strategy\n- Fork a database to test a migration safely\n\nCovers: lock-level reference for every common DDL operation, safe migration patterns, fork-based testing, zero-downtime column changes, index creation, constraint addition, backfill strategies, pre\u002Fpost-migration validation, and rollback planning.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fpostgres\u002Fskills\u002Fpostgres-database-migration\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fpostgres\u002Fskills\u002Fpostgres-database-migration\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":68,"licenseFileUrl":77,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M7CVQWK20ASAZN5VETZC8J99","postgres-best-practices","Best practices and guidelines for working with Postgres. Covers schema design, indexing strategies, query optimization, migrations, and common pitfalls. Use when writing SQL, designing database schemas, optimizing queries, or setting up a Postgres database.","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fpostgres\u002Fskills\u002Fpostgres-best-practices\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fpostgres\u002Fskills\u002Fpostgres-best-practices\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M7CVQ5CY7AQHY7A2Y99RE6A7","writing-mstest-tests","ALWAYS USE when asked to fix, rewrite, update, improve, modernize, show corrected code for, or explain existing MSTest tests or MSTest-specific configuration. Use for \"review\" when corrected code or edits are wanted, even for one pasted assertion or passing tests with bad failure output. Covers expected\u002Factual labels; generic Boolean, collection, string, numeric, null, identity, exception, hard-cast, and object[] checks; TestContext\u002Flifecycle; timeout\u002Fcancellation; OS\u002FCI conditions, retry, cleanup, parallelization, MSTest.Sdk project setup, and MSTESTxxxx. Honor the installed MSTest version. DO NOT USE to design new test cases (code-testing), perform report-only audits, create project files rather than explain MSTest setup, run tests, migrate frameworks, or handle non-MSTest\u002Fnon-.NET code.","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Fwriting-mstest-tests\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":18},"01M7CVPWJZ63GB0810F0SCGZ1K","winforms-expert","Create, modify, debug, or review Windows Forms applications only when the request contains a concrete Windows Forms marker. USE FOR: WinForms, Windows Forms, System.Windows.Forms, WinForms Form or UserControl designer files (*.Designer.cs or *.Designer.vb), Visual Studio WinForms Designer, TableLayoutPanel, BindingSource, DataGridView, Control.InvokeAsync, component-tray ownership, or custom control serialization. DO NOT USE FOR: WPF or WPF XAML, including Window.InputBindings, KeyBinding, commands, or DataContext; .NET MAUI; Avalonia; or any request where none of the listed Windows Forms markers is present.","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Fwinforms-expert\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":18},"01M7CVPR0QFZ1HMJ6GZRBQAQ7W","vectorization","Design, implement, optimize, and review SIMD code in .NET. USE FOR: vectorizing scalar loops with TensorPrimitives, Vector64\u002F128\u002F256\u002F512, or platform hardware intrinsics; reviewing existing SIMD code, including the generic Vector type, for contract equivalence, tail handling, memory safety, portability, fallbacks, and measured performance. DO NOT USE FOR: performance work unrelated to SIMD or vectorization.","https:\u002F\u002Fgithub.com\u002Fdeadmade\u002Fdead-agent-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fopt-in\u002Fimplementation\u002Fcsharp-skills\u002Flibrary\u002Fvectorization\u002FSKILL.md",[],[]]