csharp-scripts
Run file-based C# apps with the .NET CLI when the user explicitly wants C#/.NET code without creating a project. Use for C# language/API experiments, one-file…
Pseudo-mutation analysis ONLY: answer whether tests would catch a bug if production code changed, which meaningful changes would still pass, or which caller-visible mutations existing assertions would miss; verify candidates when requested, then optionally close verified gaps.
$ npx -y skills add dotnet/skills --skill test-gap-analysis --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/test-gap-analysisContext preview
The summary Claude sees to decide when to auto-load this skill.
Pseudo-mutation analysis ONLY: answer whether tests would catch a bug if production code changed, which meaningful changes would still pass, or which caller-visible mutations existing assertions would miss; verify candidates when requested, then optionally close verified gaps.
name: test-gap-analysis description: >- Pseudo-mutation analysis ONLY: answer whether tests would catch a bug if production code changed, which meaningful changes would still pass, or which caller-visible mutations existing assertions would miss; verify candidates when requested, then optionally close verified gaps. Activate for behavioral blind spots or missing edge cases tied to production behavior. Polyglot. DO NOT USE FOR: suite organization, taxonomy, metadata, or distribution reports (test-tagging); .NET line-vs-branch or Cobertura interpretation, arithmetic, plateaus, project-wide coverage gaps, or coverage-backed test/CRAP priorities (coverage-analysis; use native coverage tooling outside .NET); named-target CRAP (crap-score); new suites (code-testing-agent); assertion/smell audits; or mutation tools. license: MIT
Answer one question: **which caller-visible production behaviors could change without an existing test failing?** Mutation reasoning is a probe, not the goal. Inventory public outcomes first, then verify only credible gaps.
Discover production and test files from manifests and file types. After a narrow search misses, inspect the current directory broadly before asking for paths.
| Request | Action | |---|---| | One component or named risk | Inventory every high-risk public outcome in scope; do not edit production code unless verification was requested | | General small-component review | Inventory distinct outcomes and report caller-visible gaps from source/assertion mapping | | Explicit survivor verification | Inventory all requested outcomes; execute one representative observable candidate for each distinct high-risk outcome under verification, then classify it as **Survived** or **Killed** | | Explicit exhaustive audit | Read [references/mutation-catalog.md](references/mutation-catalog.md) and classify all meaningful candidates | | Add tests to an existing suite | Analyze first; add tests only for verified survivors or demonstrated no-coverage outcomes | | Create a new suite | Stop and use `code-testing-agent` |
When the request names a risk, turn it into a one-line public-outcome allowlist before reading code. An outcome is not in scope merely because the same method writes it. For `money math`, allow computed or returned amounts, rates, tier/boundary choice, percentage base/order, floors/caps, and rounding; exclude non-monetary state predicates (including derived booleans), identity, and formatting. Private code is in scope only to trace an allowed outcome.
Do not expand a focused request into a repository audit, plan artifact, or dashboard. Use source and tests directly for familiar frameworks. Invoke `test-analysis-extensions` only when discovery or assertion semantics are unclear.
Run the narrowest existing test command once. Choose it from the project manifest; Microsoft.Testing.Platform executables may require `dotnet run`. Confirm tests executed: exit 0 with build-only output is not green. If that one attempt cannot run the suite, do not troubleshoot the runner or try alternate commands for an advisory review; continue statically and label all candidates **unverified**. Do not infer a project-configuration cause from missing output; name a cause only when the command reports it.
Missing runner output limits only claims of empirical mutation survival. It does not make source-proven facts tentative: a public outcome with no reaching test is still **No coverage**, and an exact expected value derived from the unmodified implementation is still actionable. State the baseline limitation once, then give the static source/assertion conclusion directly instead of hedging every row.
For an advisory review such as "would tests catch this?", stop execution after that baseline. Source-to-assertion mapping is sufficient evidence for **No coverage** and **Candidate survivor (unverified)**. Trace or run the unmodified code once only when an original value is unclear. Apply mutations only for explicit verification, an exhaustive audit, or closing gaps with tests.
Any focused mutation budget limits execution, not discovery. Keep every distinct unasserted public outcome in the inventory.
For each public entry point, map:
nearest-valid guard boundaries, and default cases;
invalid-input acceptance, public state transition, or external side effect;
and error propagation as observed through the public caller.
Use `public input/sequence -> expected outcome -> existing assertion -> gap`. One asserted return field does not cover another. One allowed result does not cover its denial.
**Money math:** inventory the no-op path, every rate/tier and exact boundary, operation order, percentage base or composition, floor/cap, and rounding. Trace private helpers through the public result. A test asserting only a broad range does not pin any exact amount. For each actionable money row, derive one witness input and its exact original result through the complete call chain; do not recommend a generic "assert the exact amount" without supplying that amount.
**Ordered guards and retries:** inventory `invalid below minimum | first valid | last allowed or retryable | first blocked | later blocked`. For an upper guard such as `value >= limit`, use `limit - 1`, `limit`, and `limit + 1`; the last witness exposes narrowing to `value == limit`. Inventory every accepted and rejected error class. When type matching is polymorphic, include a representative derived accepted type that would expose exact-runtime-type narrowing. A test at the first blocked value does not protect the last allowed or later blocked value.
**Au
This repository contains the .NET team's curated set of portable skills and host-specific custom agents for coding agents. For information about the Agent Skills standard, see agentskills.io.
Repo: dotnet/skills
Run file-based C# apps with the .NET CLI when the user explicitly wants C#/.NET code without creating a project. Use for C# language/API experiments, one-file…
Correctly call native (C/C++) libraries from .NET using P/Invoke and LibraryImport. Covers function signatures, string marshalling, memory lifetime,…
Set up NuGet trusted publishing (OIDC) on a GitHub Actions repo — replaces long-lived API keys with short-lived tokens. USE FOR: trusted publishing, NuGet…
Design, implement, optimize, and review SIMD code in .NET. USE FOR: vectorizing scalar loops with TensorPrimitives, Vector64/128/256/512, or platform hardware…
Guides technology selection and implementation of AI and ML features in .NET 8+ applications using ML.NET, Microsoft.Extensions.AI (MEAI), Microsoft Agent…
Configure OpenTelemetry distributed tracing, metrics, and logging in ASP.NET Core using the .NET OpenTelemetry SDK. Use when adding observability, setting up…