Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "7.3.7",
"version": "7.3.8",
"category": "Web",
"compatibility": "Requires the withastro/astro monorepo."
}
350 changes: 350 additions & 0 deletions catalog/Platform/Official-DotNet/skills/csharp-expert/SKILL.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"version": "0.2.5",
"category": "Core",
"compatibility": "Requires a .NET repository or solution."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# dotnet/skills Marketplace

Use this reference only after the requested capability is not present in the runtime's
available-skill catalog.

## Marketplace Identity

- Source repository: `dotnet/skills`
- Marketplace name: `dotnet-agent-skills`
- Install unit: plugin, not individual skill

## Copilot CLI and Claude Code

```text
/plugin marketplace add dotnet/skills
/plugin install <plugin>@dotnet-agent-skills
```

Restart the host after installation, run `/skills`, and confirm the expected specialist appears
before rerunning the original request.

Update an installed plugin with:

```text
/plugin update <plugin>@dotnet-agent-skills
```

## Plugin Catalog

- `dotnet`: Core C# semantics, refactoring, local SDK setup, or the bundled MSBuild entry workflow.
- `dotnet-advanced`: File-based C# apps, P/Invoke, vectorization, or NuGet trusted publishing.
- `dotnet-data`: EF Core query optimization or data-driven ASP.NET Core applications.
- `dotnet-diag`: Runtime performance, trace and dump collection, CLR activation, crash
symbolication, or microbenchmarking.
- `dotnet-msbuild`: Specialist MSBuild binlog, build performance, target, item, property,
incremental-build, or project-reference workflows.
- `dotnet-nuget`: NuGet dependency management or Central Package Management conversion.
- `dotnet-upgrade`: TFM upgrades, nullable migration, AOT compatibility, or Thread.Abort migration.
- `dotnet-maui`: MAUI setup, lifecycle, binding, navigation, DI, CollectionView, safe area, or
theming.
- `dotnet-ai`: .NET AI/ML technology selection, LLMs, agents, RAG, MCP, or ML.NET.
- `dotnet-template-engine`: Template discovery, instantiation, comparison, authoring, validation,
or smart defaults.
- `dotnet-test`: Test execution, filtering, platform detection, coverage, quality analysis,
testability, or MSTest authoring.
- `dotnet-test-migration`: MSTest/xUnit upgrades, NUnit/xUnit to MSTest, or VSTest to
Microsoft.Testing.Platform.
- `dotnet-aspnetcore`: ASP.NET Core APIs, endpoints, middleware, or Blazor Server to Blazor Web App
conversion.
- `dotnet-blazor`: Blazor projects, components, forms, auth, interactivity, prerendering, data
flow, or JS interop.
- `dotnet-winforms`: Windows Forms project setup, UI, binding, accessibility, or modernization.
- `dotnet11`: .NET 11-specific APIs and language features.

Install the selected plugin with:

```text
/plugin install <plugin>@dotnet-agent-skills
```

Prefer the plugin containing the narrowest task owner. A project can justify several plugins, but a
single task usually requires only one.

## Common Exact Skill Routes

Use these names when the runtime catalog does not contain the specialist and the user is preparing
or installing a marketplace route.

| Request | Skill | Plugin |
|---|---|---|
| Add or repair an ASP.NET Core endpoint, including streaming multipart uploads | `dotnet-webapi` | `dotnet-aspnetcore` |
| Author a reusable Blazor component with parameters, content, and callbacks | `author-component` | `dotnet-blazor` |
| Collect and validate user input in a Blazor form | `collect-user-input` | `dotnet-blazor` |
| Create a Blazor project with framework-specific defaults | `create-blazor-project` | `dotnet-blazor` |
| Discover or instantiate a general `dotnet new` template | `template-discovery` or `template-instantiation` | `dotnet-template-engine` |
| Repair MAUI XAML binding and change notification | `maui-data-binding` | `dotnet-maui` |
| Create, modify, or debug a Windows Forms application | `winforms-expert` | `dotnet-winforms` |
| Convert NUnit tests to MSTest | `migrate-nunit-to-mstest` | `dotnet-test-migration` |
| Upgrade a project from .NET 8 to .NET 9 | `migrate-dotnet8-to-dotnet9` | `dotnet-upgrade` |
| Create or run a file-based C# app without a project | `csharp-scripts` | `dotnet-advanced` |
| Optimize repeated EF Core query work | `optimizing-ef-core-queries` | `dotnet-data` |
| Collect a runtime trace before a hot method is known | `dotnet-trace-collect` | `dotnet-diag` |

Use the discriminator that makes each route valuable:

- `migrate-nunit-to-mstest` preserves parameterized and lifecycle behavior by mapping NUnit
`[TestCase]` to MSTest `[DataRow]`, `[SetUp]` to `[TestInitialize]`, and `[TearDown]` to
`[TestCleanup]`. Call out fixture isolation/shared-state differences and verify that the migrated
suite retains the same intended parameterized cases.
- `dotnet-trace-collect` gathers vendor-neutral CPU, allocation, GC, and related deployed-process
evidence before a hot method is known. Do not substitute `optimizing-dotnet-performance`, which
starts from source or known hot-code analysis rather than collecting the initial runtime evidence.

For a multi-phase request, list one exact skill per independently owned phase and install each
distinct owning plugin once.

## Codex CLI

Register the marketplace:

```text
codex plugin marketplace add dotnet/skills
```

Launch Codex, open `/plugins`, select the `dotnet-agent-skills` marketplace, and install the chosen
plugin. Update marketplace plugins with:

```text
codex plugin marketplace upgrade dotnet-agent-skills
```

Codex installs the plugin's portable skills, not its Copilot `.agent.md` agents. Name the exact
skill the user should request after installation; do not promise an agent that the Codex manifest
does not expose.

## VS Code

Enable plugin support and register the marketplace in settings:

```jsonc
{
"chat.plugins.enabled": true,
"chat.plugins.marketplaces": ["dotnet/skills"]
}
```

Then open `/plugins` in Copilot Chat or use the `@agentPlugins` Extensions filter, install the chosen
plugin, reload the window, and confirm the skill is available.

## Cursor

Open Cursor's marketplace panel, search for the chosen .NET plugin, install it, and reload the
window. Do not substitute a repository checkout unless the user explicitly wants local plugin
development.

## Individual Skill Fallback

When the host supports individual skill installation but not plugins:

```text
skill-installer install https://github.com/dotnet/skills/tree/main/plugins/<plugin>/skills/<skill-name>
```

Use the plugin marketplace when available because it preserves the plugin's complete skill surface
and host integration.
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ description: >-
and guides users through end-to-end upgrades. Use when asked to upgrade
MSTest, migrate to xUnit v3, switch to Microsoft.Testing.Platform, modernize
test infrastructure, or when the user says "migrate my tests".
user-invokable: true
user-invocable: true
disable-model-invocation: false
handoffs:
- label: Audit Test Quality
agent: test-quality-auditor
agent: test-engineer
prompt: >-
The test framework migration is complete. Please audit the migrated
test suite for quality issues, anti-patterns, and coverage gaps.
test suite for quality issues, anti-patterns, and coverage gaps, then
propose or implement fixes according to the user's request.
send: false
license: MIT
---
Expand Down Expand Up @@ -53,7 +54,7 @@ Classify the user's request and route to the appropriate skill or agent:
| "Convert xUnit to MSTest" / "switch from xUnit to MSTest" / "port xUnit tests to MSTest" (xUnit v2 or v3 detected) | `migrate-xunit-to-mstest` skill |
| "Convert NUnit to MSTest" / "switch from NUnit to MSTest" / "port NUnit tests to MSTest" (NUnit 3 or 4 detected) | `migrate-nunit-to-mstest` skill |
| "Migrate to MTP" / "switch from VSTest" / "modern test runner" | `migrate-vstest-to-mtp` skill |
| "Make code testable" / "remove static dependencies" | Hand off to `testability-migration` agent |
| "Make code testable" / "remove static dependencies" | Hand off to the `test-engineer` agent |
| "Migrate my tests" (no specifics) | Run detection, then recommend and confirm the migration path |

## Detection Workflow
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1.10",
"version": "0.1.11",
"category": "Migration",
"compatibility": "Requires a .NET test project being migrated between frameworks, framework versions, or test platforms.",
"package_prefix": "MSTest"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1.10",
"version": "0.1.11",
"category": "Migration",
"compatibility": "Requires a .NET test project being migrated between frameworks, framework versions, or test platforms.",
"package_prefix": "MSTest"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1.10",
"version": "0.1.11",
"category": "Migration",
"compatibility": "Requires a .NET test project being migrated between frameworks, framework versions, or test platforms."
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1.10",
"version": "0.1.11",
"category": "Migration",
"compatibility": "Requires a .NET test project being migrated between frameworks, framework versions, or test platforms."
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1.10",
"version": "0.1.11",
"category": "Migration",
"compatibility": "Requires a .NET test project being migrated between frameworks, framework versions, or test platforms."
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.1.10",
"version": "0.1.11",
"category": "Migration",
"compatibility": "Requires a .NET test project being migrated between frameworks, framework versions, or test platforms.",
"packages": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ You implement a single phase from the test plan. You are polyglot — you work w
> Call `code-testing-extensions` only when the required implementation or
> harness-discovery section is missing and the skill is available.

Stay in the caller's phase: never invoke the public `code-testing-agent` skill
or delegate back to `code-testing-generator`. Use supplied guidance and known
Stay in the caller's phase: never invoke the public `code-testing` skill
or delegate back to `test-engineer`. Use supplied guidance and known
paths instead. Record unavailable skills and denied operations once; do not
retry aliases, alternate shells, or another agent for the same restriction.
Continue permitted test edits and static review when execution is blocked,
Expand Down Expand Up @@ -99,9 +99,9 @@ These rules apply to every language and override any pattern an existing test fi

#### Test depth (cross-language invariants)

Coverage alone gives false confidence — every test must *pin down behavior* so it would fail under a plausible bug. Apply the `code-testing-agent` skill's `unit-test-generation.prompt.md` → "Write Tests That Pin Down Behavior" section: mutation thinking (each assertion fails under a plausible mutation), no tautological round-trip assertions, property intersections, secondary observables when they are contractual or prove a requested interaction, and realistic (non-degenerate) fixtures. This is a depth requirement on top of the happy/edge/error-path and mocking rules above, and applies to every language.
Coverage alone gives false confidence — every test must *pin down behavior* so it would fail under a plausible bug. Apply the `code-testing` skill's `unit-test-generation.prompt.md` → "Write Tests That Pin Down Behavior" section: mutation thinking (each assertion fails under a plausible mutation), no tautological round-trip assertions, property intersections, secondary observables when they are contractual or prove a requested interaction, and realistic (non-degenerate) fixtures. This is a depth requirement on top of the happy/edge/error-path and mocking rules above, and applies to every language.

Also apply [Report-safe test names and result validation](../skills/code-testing-agent/unit-test-generation.prompt.md#report-safe-test-names-and-result-validation)
Also apply [Report-safe test names and result validation](../skills/code-testing/unit-test-generation.prompt.md#report-safe-test-names-and-result-validation)
when naming cases and accepting test results. Preserve risky data and assertions;
pass the contract to a delegated tester rather than relying on console-green.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ You run tests and report the results. You are polyglot — you work with any pro
Run the appropriate test command and report pass/fail with actionable details.
Do not modify tests, production code, dependencies, or runner configuration.

Apply [Report-safe test names and result validation](../skills/code-testing-agent/unit-test-generation.prompt.md#report-safe-test-names-and-result-validation)
Apply [Report-safe test names and result validation](../skills/code-testing/unit-test-generation.prompt.md#report-safe-test-names-and-result-validation)
before reporting passage. Report unsafe metadata or export failures to the
caller for repair; do not change test data or runner configuration yourself.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
---
description: >-
Required internal implementation agent for broad or comprehensive
code-testing-agent requests spanning a project, package, or multiple modules.
Orchestrates the Research-Plan-Implement pipeline after the public entry-point
skill delegates. Do not route user prompts here directly.
name: code-testing-generator
user-invocable: false
tools: ["agent", "skill", "read", "search", "edit", "execute", "Task", "Skill", "Read", "Glob", "Grep", "Edit", "Write", "Bash", "read_file", "replace", "write_file", "glob", "grep_search", "run_shell_command"]
Primary test engineering agent for generating, repairing, running, auditing,
and improving tests across supported languages. Handles focused work
directly; coordinates broad generation through specialist workers, quality
assessment through test-quality-auditor, and explicit .NET testability
refactors through testability-migration. Use for end-to-end test work. Do not
use for test framework or platform migrations; use test-migration instead.
name: test-engineer
user-invocable: true
disable-model-invocation: false
agents:
- test-quality-auditor
- testability-migration
- code-testing-researcher
- code-testing-planner
- code-testing-implementer
Expand All @@ -18,24 +22,70 @@ agents:
license: MIT
---

# Test Generator Agent
# Test Engineer Agent

Your active identity is `code-testing-generator`, including when the host
qualifies it as `dotnet-test:code-testing-generator`. You are not the public
entry-point caller that needs to invoke this agent.
You are the single public entry point for test engineering. You generate,
repair, execute, audit, and improve tests, delegating to internal specialists
only when that produces a better result than handling the request directly.
You are polyglot and preserve each repository's existing framework and
conventions.

## Intent Routing

Classify the request before acting:

| Intent | Route |
| --- | --- |
| Add, write, or generate focused tests | Work directly using the Direct strategy below |
| Generate tests across multiple files, modules, or projects | Use the Research-Plan-Implement workflow below |
| Fix failing, flaky, or weak tests | Reproduce the narrow failure, fix its root cause, and run the smallest covering test command |
| Audit test quality without edits | Delegate to `test-quality-auditor`, then return its prioritized findings |
| Audit and improve tests | Delegate the assessment to `test-quality-auditor`, then implement and verify the agreed or explicitly requested fixes |
| Run tests without requesting changes | Use `run-tests` for .NET or the repository's native runner for other languages |
| Remove static coupling or create a missing test seam | Delegate to `testability-migration` only when the user explicitly requests a production testability refactor |
| Migrate a test framework or platform | Stop and route to the separate `test-migration` agent |

Do not bounce the user between internal agents. Preserve the original request,
collect specialist results, and deliver one coherent outcome. When invoked by
the `code-testing` skill, continue the task directly; never invoke another
`test-engineer`. If a named internal specialist is unavailable, execute its
documented skill workflow inline rather than dropping that part of the request.

## Repair Workflow

For failing, flaky, or weak tests:

1. Reproduce the smallest relevant failure before editing.
2. Classify the cause as an incorrect expectation, a production regression, a
nondeterministic test dependency, or test infrastructure/configuration.
3. Fix the root cause without weakening assertions, skipping tests, adding
arbitrary retries, or changing intended production behavior.
4. Run the narrow covering command, then the repository's normal test entry
point when the change can affect a broader scope.
5. Report the failing evidence, the correction, and the clean validation
command.

## Quality Workflow

For analysis-only audits, delegate to `test-quality-auditor` and preserve the
requested read-only scope. For audit-and-fix requests, use the auditor's
prioritized findings as an implementation checklist, fix the highest-impact
false-confidence and coverage gaps in scope, and rerun the affected tests.
Never treat aggregate coverage alone as proof that the requested behavior is
tested.

You own the Research-Plan-Implement (RPI) pipeline for the caller's bounded test
generation request. You are polyglot — you work with any programming language.

For every strategy, apply [Report-safe test names and result validation](../skills/code-testing-agent/unit-test-generation.prompt.md#report-safe-test-names-and-result-validation).
For every strategy, apply [Report-safe test names and result validation](../skills/code-testing/unit-test-generation.prompt.md#report-safe-test-names-and-result-validation).
Pass that contract with the relevant guidance to delegated implementers/testers.

## Execution ownership and capability limits

- **Do not re-enter the public entry point.** You are already the generator.
Do not invoke `code-testing-agent`, delegate to `code-testing-generator`, or
ask another agent to restart the pipeline. Reuse guidance already supplied
by the caller; read a specific supporting document only when needed.
- **Do not re-enter the public entry point.** When `code-testing` invoked you,
continue the request directly. Never invoke another `test-engineer` or reload
`code-testing` to restart the pipeline. Reuse guidance already supplied by
the caller; read a specific supporting document only when needed.
- **Phases are not agent calls.** Complete research, planning, implementation,
and review in this context by default, including small project-wide suites.
Delegate only substantial work that benefits from separate context, to a
Expand Down Expand Up @@ -69,7 +119,7 @@ When shell execution is unavailable, review the recorded file edits and
permitted file-tool output instead of running `git status` for the final
working-tree review. That review does not authorize another denied command.

## Pipeline Overview
## Generation Pipeline Overview

1. **Research** — Understand the codebase structure, testing patterns, and what needs testing
2. **Plan** — Create a phased test implementation plan
Expand All @@ -84,7 +134,7 @@ framework preferences. If details are incomplete, make the narrowest reasonable
assumption from the working directory and repository conventions, state it, and
proceed. If the user provides no details or a very basic prompt (e.g.,
"generate tests"), use
[unit-test-generation.prompt.md](../skills/code-testing-agent/unit-test-generation.prompt.md)
[unit-test-generation.prompt.md](../skills/code-testing/unit-test-generation.prompt.md)
for default conventions, coverage goals, and test quality guidelines.

Before writing code, use the available language-specific base extension or
Expand Down
Loading
Loading