[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EKH5JR68FP3MCHAB090SNA":3,"skill-same:01M7EKH5JR68FP3MCHAB090SNA":52},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":32,"commitSha":33,"skillDirectory":34,"forksCount":14,"repositoryHtmlUrl":35,"repositoryHomepageUrl":35,"ownerHtmlUrl":36,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":37,"install":38,"resources":51},"01M7EKH5JR68FP3MCHAB090SNA","detect-static-dependencies",null,"> ACTIVATION PREREQUISITE: the request or discovered target must explicitly identify C#, .NET, `.cs`, or `.csproj`; otherwise stay dormant without invoking this skill. USE FOR: locating System.DateTime.Now\u002FUtcNow, System.IO.File\u002FDirectory, System.Environment,","Mr-Nobody-Anonymous\u002FAll-skills","Mr-Nobody-Anonymous","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184253119?v=4","01M7AEXFJHKTYQW5R0ZCQQTWFV","anonymous","01M7C00M3GQR4QKP9GZA42GFAK",0,"MIT","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fcloud\u002Fdetect-static-dependencies\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: detect-static-dependencies\ndescription: \"> ACTIVATION PREREQUISITE: the request or discovered target must explicitly identify C#, .NET, `.cs`, or `.csproj`; otherwise stay dormant without invoking this skill. USE FOR: locating System.DateTime.Now\u002FUtcNow, System.IO.File\u002FDirectory, System.Environment,\"\ncategory: cloud\nversion: 1.0.0\ndisable-model-invocation: false\nrisk: low\nsource:\n  repository: \"microsoft\u002Fskills\"\n  commit: \"8f3b1a2c\"\n  path: \"plugins\u002Fdotnet-test\u002Fskills\u002Fdetect-static-dependencies\u002FSKILL.md\"\n  license: \"MIT\"\n  imported_at: \"2026-09-20\"\n---\n# Detect Static Dependencies\n\nScan 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.\n\n## When to Use\n\n- Auditing a project's testability before adding unit tests\n- Understanding the scope of static coupling in a legacy codebase\n- Prioritizing which statics to wrap first (highest-frequency wins)\n- Creating a migration plan for incremental testability improvements\n\n## Response Guidelines\n\n- Scale the response to the user's request. A question about a specific category (e.g., \"find time statics\") should focus on that category with file locations and counts, not produce a full report across all categories.\n- When the user provides a specific file or directory path, scan only that scope — do not expand to the entire solution unless asked.\n- The full structured report format in Step 4 is for comprehensive audit requests. For focused questions, return only the relevant subset (e.g., category summary + affected files for the requested category).\n\n## Execution Contract\n\n- A relative path named in the prompt is enough to start. Discover it with the\n  available file-listing tools and scan it immediately; do not ask the user to\n  provide or re-upload files before both discovery and a content search fail.\n- Start with a recursive, line-numbered content search over eligible `.cs`\n  files. Do not search only for the `static` keyword: ambient calls inside\n  LINQ expressions, lambdas, callbacks, and interpolated strings usually have\n  no `static` modifier.\n- If a file-reading tool fails on a path that listing or search proved exists,\n  classify the failure before retrying. Fall back to another available\n  mechanism such as `rg -n`, grep, or a shell file reader only for confirmed\n  tool availability, transport, or path-normalization failures and only after\n  verifying the canonical path remains inside the workspace. Stop on\n  content-exclusion, permission\u002Fpolicy, workspace-boundary, or unknown failures.\n  Search output can seed the occurrence ledger; open only the surrounding code\n  needed to verify receiver provenance.\n- Never stop after loading this skill or announcing a scan plan. Return the\n  completed audit in the same response. If every fallback genuinely fails,\n  report the verified partial findings and the exact limitation; do not invent\n  findings or replace the audit with a request to rerun.\n\n## When Not to Use\n\n- The user wants wrappers generated (hand off to `generate-testability-wrappers`)\n- The user wants mechanical migration done (hand off to `migrate-static-to-wrapper`)\n- The statics are already behind interfaces or `TimeProvider`\n- The code is not C# \u002F .NET\n\n## Inputs\n\n| Input | Required | Description |\n|-------|----------|-------------|\n| Target path | No | A file, directory, project (.csproj), or solution (.sln) to scan. Defaults to the current workspace. |\n| Exclusion patterns | No | Glob patterns to skip (e.g., `**\u002Fobj\u002F**`, `**\u002FMigrations\u002F**`) |\n| Category filter | No | Limit to specific categories: `time`, `filesystem`, `environment`, `network`, `console`, `process` |\n\n## Workflow\n\n### Step 1: Determine scan scope\n\nResolve the target to a set of `.cs` files:\n- Treat a prompt-named workspace-relative path as the target; locate it rather\n  than asking the user for an absolute path.\n- If omitted, scan every eligible `.cs` file under the current workspace; do not\n  pick one project and silently omit its siblings.\n- If a `.cs` file, scan that single file.\n- If a directory, scan all `.cs` files recursively (excluding `obj\u002F`, `bin\u002F`).\n- If a `.csproj`, find its directory and scan `.cs` files within.\n- If a `.sln`, parse it, find all project directories, and scan `.cs` files across all projects.\n\nAlways exclude `obj\u002F`, `bin\u002F`, and any user-specified exclusion patterns.\n\n### Step 2: Search for static dependency patterns\n\nScan each file for calls matching these categories:\n\nTreat pattern matches as candidates, not findings. Before counting an instance call, trace how its\nreceiver enters the class. A collaborator supplied through a constructor, parameter, property, or\ndependency injection (DI) is already a test seam. In particular, an injected `HttpClient` is\ntestable with a controlled `HttpMessageHandler`; do not count its calls or recommend replacing it\nmerely because the injected type is concrete.\n\n| Category | Patterns to search for | Recommended replacement |\n|----------|----------------------|------------------------|\n| **Time** | `DateTime.Now`, `DateTime.UtcNow`, `DateTime.Today`, `DateTimeOffset.Now`, `DateTimeOffset.UtcNow`, `Task.Delay(`, `new CancellationTokenSource(TimeSpan` | `TimeProvider` (.NET 8+) |\n| **File System** | `File.ReadAllText(`, `File.WriteAllText(`, `File.Exists(`, `File.Delete(`, `File.Copy(`, `File.Move(`, `Directory.Exists(`, `Directory.CreateDirectory(`, `Directory.GetFiles(`, `Directory.Delete(`, `Path.GetTempPath(`, and instance members that hit the disk (`new FileInfo(...)`, `new DirectoryInfo(...)`, `.LastWriteTimeUtc`, `new StreamReader(path)`) | `IFileSystem` (System.IO.Abstractions NuGet) |\n| **Randomness \u002F identity** | `new Random(`, `Random.Shared`, `Guid.NewGuid(` | `TimeProvider`-style seam: inject `Random` \u002F an `IGuidProvider` |\n| **Culture \u002F serialization** | `CultureInfo.CurrentCulture`, `CultureInfo.CurrentUICulture`, `JsonSerializer.Serialize(`, `JsonSerializer.Deserialize(` | Pass culture\u002Foptions explicitly, or inject a serializer abstraction |\n| **Environment** | `Environment.GetEnvironmentVariable(`, `Environment.SetEnvironmentVariable(`, `Environment.MachineName`, `Environment.UserName`, `Environment.CurrentDirectory`, `Environment.Exit(` | Custom `IEnvironmentProvider` |\n| **Network** | `new HttpClient(`, `.GetAsync(`, `.PostAsync(`, `.SendAsync(` (confirm the receiver is an `HttpClient`; exclude calls whose receiver is injected or produced by an injected factory) | Inject `HttpClient` (commonly supplied by `IHttpClientFactory`) |\n| **Console** | `Console.WriteLine(`, `Console.ReadLine(`, `Console.Write(`, `Console.ReadKey(` | `IConsole` wrapper or `ILogger` |\n| **Process** | `Process.Start(`, `Process.GetCurrentProcess(`, `Process.GetProcessesByName(` | Custom `IProcessRunner` |\n\nFor time calls, inspect use as well as count. Two ambient clock reads in one\nlogical operation are two call sites and a consistency defect: for example,\nseparate `DateTime.UtcNow` reads for `CreatedAt` and\n`ExpiresAt = DateTime.UtcNow.AddDays(30)` can drift. Recommend one captured\ninstant. With `TimeProvider`, retain `DateTimeOffset` where possible; when the\nexisting member requires UTC `DateTime`, use `GetUtcNow().UtcDateTime`, never\n`.DateTime`, which loses the UTC kind. Treat capturing one instant as an\noptional behavior-level follow-up: a mechanical wrapper migration must preserve\nthe original reads one-for-one unless the user separately approves that\nsemantic change.\n\n### Step 3: Aggregate and rank results\n\nCount each call site across the entire scan scope — including the instance-member call sites covered by the rules below, not only `static` ones.\n\n**Counting rules — inaccurate totals are the main way this report loses to an ad-hoc scan:**\n\n- **Build one occurrence ledger before writing prose.** Give each included call\n  site exactly one row containing category, exact pattern, `file:line`, and\n  recommended seam. Derive every category, pattern, and per-file count by\n  grouping that same ledger; never recount independently while writing tables.\n- **Keep the three count domains separate.** `Files scanned` includes every\n  eligible source file; `affected files` includes only files with ledger rows;\n  `call sites` is the number of ledger rows. Never substitute one for another.\n- **One authoritative total.** Every call site you found belongs in the category summary and the grand total. Never park real findings in an \"additional observations\" section that the totals exclude.\n- **Classify by what the member touches, not by whether it is `static`.** Instance members that reach the same untestable resource still count and belong in the matching category (`new FileInfo(path).LastWriteTimeUtc` → File System; `new HttpClient().GetAsync(...)` → Network). Say \"hidden dependency\", not \"static\", when the member is an instance call.\n- **Check receiver provenance before counting instance calls.** Count a resource access only when the code under test acquires or constructs the dependency itself. Exclude constructor-, parameter-, property-, and DI-injected collaborators from the \"needs wrapping\" total, including concrete `HttpClient` instances.\n- **Exclude deterministic pure helpers from the \"needs wrapping\" total.** `Path.Combine`, `Path.GetExtension`, `Path.GetFileName`, and `Math.*`\u002F`string.*` statics take no ambient input and are trivially testable. List them, if at all, in a separate \"no action needed\" note — never as testability blockers.\n- **Cover every category before reporting** — time, file system, environment, network, console, process, randomness (`new Random()`, `Guid.NewGuid()`), culture (`CultureInfo.CurrentCulture`), and serialization\u002Fstatics such as `JsonSerializer`. Omitting a category that is present is an under-count.\n- **Give `file:line` for every occurrence** so the user can jump straight to it.\n- **Reconcile before publishing.** The category totals, the top-patterns table, and the per-file table must sum to the same grand total.\n- **Treat exclusions as a scope decision, not a category.** Remove `obj\u002F`,\n  `bin\u002F`, generated, and user-excluded files before building the ledger. Do not\n  include their files or call sites in any reported count. State the exclusions\n  once rather than mixing excluded candidates into the arithmetic.\n- **Label truncated rankings.** In a comprehensive audit, list all distinct\n  patterns when needed for reconciliation. If the user asked only for a top-N\n  subset, label it as a subset and do not imply that its rows sum to the grand\n  total.\n\nProduce a summary with:\n\n1. **Category summary** — total call sites per category (time, filesystem, env, etc.)\n2. **Top patterns** — the 10 most frequent individual patterns ranked by count\n3. **Most affected files** — files with the highest number of static dependencies\n4. **Existing abstractions available** — for each category, note the recommended .NET abstraction:\n   - Time → `TimeProvider` (built-in since .NET 8)\n   - File system → `System.IO.Abstractions` (NuGet package)\n   - HTTP → `IHttpClientFactory` (built-in)\n   - Environment → custom `IEnvironmentProvider`\n   - Console → custom `IConsole` or `ILogger`\n   - Process → custom `IProcessRunner`\n\n### Step 4: Present the report\n\nFormat the output as a structured report:\n\n```\n## Static Dependency Report\n\n**Scope**: \u003Cproject\u002Fsolution name>\n**Files scanned**: \u003Ccount>\n**Total static call sites**: \u003Ccount>\n\n### Category Summary\n| Category     | Call Sites | Recommended Abstraction |\n|-------------|-----------|------------------------|\n| Time         | 42        | TimeProvider (.NET 8+) |\n| File System  | 31        | System.IO.Abstractions |\n| Environment  | 12        | IEnvironmentProvider   |\n| ...          | ...       | ...                    |\n\n### Top 10 Patterns\n| # | Pattern             | Count | Files |\n|---|---------------------|-------|-------|\n| 1 | DateTime.UtcNow     | 28    | 14    |\n| 2 | File.ReadAllText    | 18    | 9     |\n| ...                                      |\n\n### Most Affected Files\n| File                          | Static Calls | Categories          |\n|-------------------------------|-------------|---------------------|\n| Services\u002FOrderProcessor.cs    | 12          | Time, FileSystem    |\n| ...                                                               |\n\n### Migration Priority\n1. **Time** (42 sites) — Use `TimeProvider`, zero NuGet dependencies on .NET 8+\n2. **File System** (31 sites) — Use `System.IO.Abstractions` NuGet package\n3. ...\n```\n\n### Step 5: Suggest next steps\n\nBased on the report, recommend which category to tackle first (highest count, best built-in support). Keep this to a few lines.\n\nMention `generate-testability-wrappers` or `migrate-static-to-wrapper` only when the user's next action clearly needs them — a hand-off note, not a sales pitch. Never end an audit with promotional next-steps that dilute the findings.\n\n## Validation\n\n- [ ] All `.cs` files in scope were scanned (check count)\n- [ ] Report includes category totals, top patterns, and affected files\n- [ ] Category totals, top patterns, and per-file counts reconcile to the same grand total\n- [ ] Files scanned, affected files, and call sites are reported as different quantities\n- [ ] Every aggregate was derived from one occurrence ledger rather than independently recounted\n- [ ] Every occurrence carries a `file:line` location\n- [ ] No findings are held outside the totals in an \"additional\" section\n- [ ] Calls on injected collaborators are excluded from the \"needs wrapping\" total\n- [ ] Deterministic pure helpers (`Path.Combine`, `Math.*`) are not counted as testability blockers\n- [ ] Each detected pattern has a recommended replacement listed\n- [ ] `obj\u002F` and `bin\u002F` directories were excluded\n- [ ] Migration priority is ordered by impact (count × ease of replacement)\n\n## Common Pitfalls\n\n| Pitfall | Solution |\n|---------|----------|\n| Scanning `obj\u002F` or generated code | Always exclude `obj\u002F`, `bin\u002F`, and `*.Designer.cs` |\n| Counting calls on injected collaborators | Trace the receiver: an injected `HttpClient`, `TimeProvider`, interface, or other caller-supplied dependency already has a seam and needs no replacement |\n| Missing statics inside lambdas\u002FLINQ | Search covers all code within `.cs` files, including lambdas |\n| Recommending `TimeProvider` on \u003C .NET 8 | Check `TargetFramework` in `.csproj` — if \u003C net8.0, recommend `NodaTime.IClock` or custom `ISystemClock` |\n| Ignoring test projects | Only scan production code — exclude `*.Tests.csproj` projects from the scan |\n| Under-counting by relegating findings | Real call sites belong in the category totals, not in a trailing \"also noticed\" paragraph that the totals ignore |\n| Calling an instance member a static | `new FileInfo(p).LastWriteTimeUtc` is an instance call but still a hidden file-system dependency — count it under File System and describe it accurately |\n| Recommending a wrapper for `Path.Combine` | Pure, deterministic helpers need no seam; listing them as blockers makes the recommendations wrong |\n","# Detect Static Dependencies\n\nScan 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.\n\n## When to Use\n\n- Auditing a project's testability before adding unit tests\n- Understanding the scope of static coupling in a legacy codebase\n- Prioritizing which statics to wrap first (highest-frequency wins)\n- Creating a migration plan for incremental testability improvements\n\n## Response Guidelines\n\n- Scale the response to the user's request. A question about a specific category (e.g., \"find time statics\") should focus on that category with file locations and counts, not produce a full report across all categories.\n- When the user provides a specific file or directory path, scan only that scope — do not expand to the entire solution unless asked.\n- The full structured report format in Step 4 is for comprehensive audit requests. For focused questions, return only the relevant subset (e.g., category summary + affected files for the requested category).\n\n## Execution Contract\n\n- A relative path named in the prompt is enough to start. Discover it with the\n  available file-listing tools and scan it immediately; do not ask the user to\n  provide or re-upload files before both discovery and a content search fail.\n- Start with a recursive, line-numbered content search over eligible `.cs`\n  files. Do not search only for the `static` keyword: ambient calls inside\n  LINQ expressions, lambdas, callbacks, and interpolated strings usually have\n  no `static` modifier.\n- If a file-reading tool fails on a path that listing or search proved exists,\n  classify the failure before retrying. Fall back to another available\n  mechanism such as `rg -n`, grep, or a shell file reader only for confirmed\n  tool availability, transport, or path-normalization failures and only after\n  verifying the canonical path remains inside the workspace. Stop on\n  content-exclusion, permission\u002Fpolicy, workspace-boundary, or unknown failures.\n  Search output can seed the occurrence ledger; open only the surrounding code\n  needed to verify receiver provenance.\n- Never stop after loading this skill or announcing a scan plan. Return the\n  completed audit in the same response. If every fallback genuinely fails,\n  report the verified partial findings and the exact limitation; do not invent\n  findings or replace the audit with a request to rerun.\n\n## When Not to Use\n\n- The user wants wrappers generated (hand off to `generate-testability-wrappers`)\n- The user wants mechanical migration done (hand off to `migrate-static-to-wrapper`)\n- The statics are already behind interfaces or `TimeProvider`\n- The code is not C# \u002F .NET\n\n## Inputs\n\n| Input | Required | Description |\n|-------|----------|-------------|\n| Target path | No | A file, directory, project (.csproj), or solution (.sln) to scan. Defaults to the current workspace. |\n| Exclusion patterns | No | Glob patterns to skip (e.g., `**\u002Fobj\u002F**`, `**\u002FMigrations\u002F**`) |\n| Category filter | No | Limit to specific categories: `time`, `filesystem`, `environment`, `network`, `console`, `process` |\n\n## Workflow\n\n### Step 1: Determine scan scope\n\nResolve the target to a set of `.cs` files:\n- Treat a prompt-named workspace-relative path as the target; locate it rather\n  than asking the user for an absolute path.\n- If omitted, scan every eligible `.cs` file under the current workspace; do not\n  pick one project and silently omit its siblings.\n- If a `.cs` file, scan that single file.\n- If a directory, scan all `.cs` files recursively (excluding `obj\u002F`, `bin\u002F`).\n- If a `.csproj`, find its directory and scan `.cs` files within.\n- If a `.sln`, parse it, find all project directories, and scan `.cs` files across all projects.\n\nAlways exclude `obj\u002F`, `bin\u002F`, and any user-specified exclusion patterns.\n\n### Step 2: Search for static dependency patterns\n\nScan each file for calls matching these categories:\n\nTreat pattern matches as candidates, not findings. Before counting an instance call, trace how its\nreceiver enters the class. A collaborator supplied through a constructor, parameter, property, or\ndependency injection (DI) is already a test seam. In particular, an injected `HttpClient` is\ntestable with a controlled `HttpMessageHandler`; do not count its calls or recommend replacing it\nmerely because the injected type is concrete.\n\n| Category | Patterns to search for | Recommended replacement |\n|----------|----------------------|------------------------|\n| **Time** | `DateTime.Now`, `DateTime.UtcNow`, `DateTime.Today`, `DateTimeOffset.Now`, `DateTimeOffset.UtcNow`, `Task.Delay(`, `new CancellationTokenSource(TimeSpan` | `TimeProvider` (.NET 8+) |\n| **File System** | `File.ReadAllText(`, `File.WriteAllText(`, `File.Exists(`, `File.Delete(`, `File.Copy(`, `File.Move(`, `Directory.Exists(`, `Directory.CreateDirectory(`, `Directory.GetFiles(`, `Directory.Delete(`, `Path.GetTempPath(`, and instance members that hit the disk (`new FileInfo(...)`, `new DirectoryInfo(...)`, `.LastWriteTimeUtc`, `new StreamReader(path)`) | `IFileSystem` (System.IO.Abstractions NuGet) |\n| **Randomness \u002F identity** | `new Random(`, `Random.Shared`, `Guid.NewGuid(` | `TimeProvider`-style seam: inject `Random` \u002F an `IGuidProvider` |\n| **Culture \u002F serialization** | `CultureInfo.CurrentCulture`, `CultureInfo.CurrentUICulture`, `JsonSerializer.Serialize(`, `JsonSerializer.Deserialize(` | Pass culture\u002Foptions explicitly, or inject a serializer abstraction |\n| **Environment** | `Environment.GetEnvironmentVariable(`, `Environment.SetEnvironmentVariable(`, `Environment.MachineName`, `Environment.UserName`, `Environment.CurrentDirectory`, `Environment.Exit(` | Custom `IEnvironmentProvider` |\n| **Network** | `new HttpClient(`, `.GetAsync(`, `.PostAsync(`, `.SendAsync(` (confirm the receiver is an `HttpClient`; exclude calls whose receiver is injected or produced by an injected factory) | Inject `HttpClient` (commonly supplied by `IHttpClientFactory`) |\n| **Console** | `Console.WriteLine(`, `Console.ReadLine(`, `Console.Write(`, `Console.ReadKey(` | `IConsole` wrapper or `ILogger` |\n| **Process** | `Process.Start(`, `Process.GetCurrentProcess(`, `Process.GetProcessesByName(` | Custom `IProcessRunner` |\n\nFor time calls, inspect use as well as count. Two ambient clock reads in one\nlogical operation are two call sites and a consistency defect: for example,\nseparate `DateTime.UtcNow` reads for `CreatedAt` and\n`ExpiresAt = DateTime.UtcNow.AddDays(30)` can drift. Recommend one captured\ninstant. With `TimeProvider`, retain `DateTimeOffset` where possible; when the\nexisting member requires UTC `DateTime`, use `GetUtcNow().UtcDateTime`, never\n`.DateTime`, which loses the UTC kind. Treat capturing one instant as an\noptional behavior-level follow-up: a mechanical wrapper migration must preserve\nthe original reads one-for-one unless the user separately approves that\nsemantic change.\n\n### Step 3: Aggregate and rank results\n\nCount each call site across the entire scan scope — including the instance-member call sites covered by the rules below, not only `static` ones.\n\n**Counting rules — inaccurate totals are the main way this report loses to an ad-hoc scan:**\n\n- **Build one occurrence ledger before writing prose.** Give each included call\n  site exactly one row containing category, exact pattern, `file:line`, and\n  recommended seam. Derive every category, pattern, and per-file count by\n  grouping that same ledger; never recount independently while writing tables.\n- **Keep the three count domains separate.** `Files scanned` includes every\n  eligible source file; `affected files` includes only files with ledger rows;\n  `call sites` is the number of ledger rows. Never substitute one for another.\n- **One authoritative total.** Every call site you found belongs in the category summary and the grand total. Never park real findings in an \"additional observations\" section that the totals exclude.\n- **Classify by what the member touches, not by whether it is `static`.** Instance members that reach the same untestable resource still count and belong in the matching category (`new FileInfo(path).LastWriteTimeUtc` → File System; `new HttpClient().GetAsync(...)` → Network). Say \"hidden dependency\", not \"static\", when the member is an instance call.\n- **Check receiver provenance before counting instance calls.** Count a resource access only when the code under test acquires or constructs the dependency itself. Exclude constructor-, parameter-, property-, and DI-injected collaborators from the \"needs wrapping\" total, including concrete `HttpClient` instances.\n- **Exclude deterministic pure helpers from the \"needs wrapping\" total.** `Path.Combine`, `Path.GetExtension`, `Path.GetFileName`, and `Math.*`\u002F`string.*` statics take no ambient input and are trivially testable. List them, if at all, in a separate \"no action needed\" note — never as testability blockers.\n- **Cover every category before reporting** — time, file system, environment, network, console, process, randomness (`new Random()`, `Guid.NewGuid()`), culture (`CultureInfo.CurrentCulture`), and serialization\u002Fstatics such as `JsonSerializer`. Omitting a category that is present is an under-count.\n- **Give `file:line` for every occurrence** so the user can jump straight to it.\n- **Reconcile before publishing.** The category totals, the top-patterns table, and the per-file table must sum to the same grand total.\n- **Treat exclusions as a scope decision, not a category.** Remove `obj\u002F`,\n  `bin\u002F`, generated, and user-excluded files before building the ledger. Do not\n  include their files or call sites in any reported count. State the exclusions\n  once rather than mixing excluded candidates into the arithmetic.\n- **Label truncated rankings.** In a comprehensive audit, list all distinct\n  patterns when needed for reconciliation. If the user asked only for a top-N\n  subset, label it as a subset and do not imply that its rows sum to the grand\n  total.\n\nProduce a summary with:\n\n1. **Category summary** — total call sites per category (time, filesystem, env, etc.)\n2. **Top patterns** — the 10 most frequent individual patterns ranked by count\n3. **Most affected files** — files with the highest number of static dependencies\n4. **Existing abstractions available** — for each category, note the recommended .NET abstraction:\n   - Time → `TimeProvider` (built-in since .NET 8)\n   - File system → `System.IO.Abstractions` (NuGet package)\n   - HTTP → `IHttpClientFactory` (built-in)\n   - Environment → custom `IEnvironmentProvider`\n   - Console → custom `IConsole` or `ILogger`\n   - Process → custom `IProcessRunner`\n\n### Step 4: Present the report\n\nFormat the output as a structured report:\n\n```\n## Static Dependency Report\n\n**Scope**: \u003Cproject\u002Fsolution name>\n**Files scanned**: \u003Ccount>\n**Total static call sites**: \u003Ccount>\n\n### Category Summary\n| Category     | Call Sites | Recommended Abstraction |\n|-------------|-----------|------------------------|\n| Time         | 42        | TimeProvider (.NET 8+) |\n| File System  | 31        | System.IO.Abstractions |\n| Environment  | 12        | IEnvironmentProvider   |\n| ...          | ...       | ...                    |\n\n### Top 10 Patterns\n| # | Pattern             | Count | Files |\n|---|---------------------|-------|-------|\n| 1 | DateTime.UtcNow     | 28    | 14    |\n| 2 | File.ReadAllText    | 18    | 9     |\n| ...                                      |\n\n### Most Affected Files\n| File                          | Static Calls | Categories          |\n|-------------------------------|-------------|---------------------|\n| Services\u002FOrderProcessor.cs    | 12          | Time, FileSystem    |\n| ...                                                               |\n\n### Migration Priority\n1. **Time** (42 sites) — Use `TimeProvider`, zero NuGet dependencies on .NET 8+\n2. **File System** (31 sites) — Use `System.IO.Abstractions` NuGet package\n3. ...\n```\n\n### Step 5: Suggest next steps\n\nBased on the report, recommend which category to tackle first (highest count, best built-in support). Keep this to a few lines.\n\nMention `generate-testability-wrappers` or `migrate-static-to-wrapper` only when the user's next action clearly needs them — a hand-off note, not a sales pitch. Never end an audit with promotional next-steps that dilute the findings.\n\n## Validation\n\n- [ ] All `.cs` files in scope were scanned (check count)\n- [ ] Report includes category totals, top patterns, and affected files\n- [ ] Category totals, top patterns, and per-file counts reconcile to the same grand total\n- [ ] Files scanned, affected files, and call sites are reported as different quantities\n- [ ] Every aggregate was derived from one occurrence ledger rather than independently recounted\n- [ ] Every occurrence carries a `file:line` location\n- [ ] No findings are held outside the totals in an \"additional\" section\n- [ ] Calls on injected collaborators are excluded from the \"needs wrapping\" total\n- [ ] Deterministic pure helpers (`Path.Combine`, `Math.*`) are not counted as testability blockers\n- [ ] Each detected pattern has a recommended replacement listed\n- [ ] `obj\u002F` and `bin\u002F` directories were excluded\n- [ ] Migration priority is ordered by impact (count × ease of replacement)\n\n## Common Pitfalls\n\n| Pitfall | Solution |\n|---------|----------|\n| Scanning `obj\u002F` or generated code | Always exclude `obj\u002F`, `bin\u002F`, and `*.Designer.cs` |\n| Counting calls on injected collaborators | Trace the receiver: an injected `HttpClient`, `TimeProvider`, interface, or other caller-supplied dependency already has a seam and needs no replacement |\n| Missing statics inside lambdas\u002FLINQ | Search covers all code within `.cs` files, including lambdas |\n| Recommending `TimeProvider` on \u003C .NET 8 | Check `TargetFramework` in `.csproj` — if \u003C net8.0, recommend `NodaTime.IClock` or custom `ISystemClock` |\n| Ignoring test projects | Only scan production code — exclude `*.Tests.csproj` projects from the scan |\n| Under-counting by relegating findings | Real call sites belong in the category totals, not in a trailing \"also noticed\" paragraph that the totals ignore |\n| Calling an instance member a static | `new FileInfo(p).LastWriteTimeUtc` is an instance call but still a hidden file-system dependency — count it under File System and describe it accurately |\n| Recommending a wrapper for `Path.Combine` | Pure, deterministic helpers need no seam; listing them as blockers makes the recommendations wrong |\n",{"name":5,"risk":24,"source":25,"version":30,"category":31,"description":7,"disable-model-invocation":20},"low",{"path":26,"commit":27,"license":15,"repository":28,"imported_at":29},"plugins\u002Fdotnet-test\u002Fskills\u002Fdetect-static-dependencies\u002FSKILL.md","8f3b1a2c","microsoft\u002Fskills","2026-09-20","1.0.0","cloud","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fcloud\u002Fdetect-static-dependencies","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous","2026-11-09 11:45:36",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":50},[40,43,46],{"tool":41,"command":42},"npx","npx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill detect-static-dependencies",{"tool":44,"command":45},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill detect-static-dependencies",{"tool":47,"command":48},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill detect-static-dependencies","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fcloud\u002Fdetect-static-dependencies\u002FSKILL.md",true,[],[53,61,68,75,82,89],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":60},"01M7FFFZPC2025JQQHPHDX154J","dei-assessment","Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-assessment\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":60},"01M7FFFWN8H4WA7A6Y398QKB6J","dei-action-plan","Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-action-plan\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":60},"01M7FFFSHTM0QZRVZ2NRJTJ0PY","culture-fit-assessment","Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fculture-fit-assessment\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":60},"01M7FFFMA12RKEQA38KHJSXXPS","cowork-to-code-bridge","Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcowork-to-code-bridge\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":60},"01M7FFFH1F6M8YRGW5V487GH1K","counter-offer-response","Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcounter-offer-response\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":60},"01M7FFFDGEHV8Y7J9N40HZXW52","continuous-feedback-system","Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcontinuous-feedback-system\u002FSKILL.md",[],[]]