[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74EZ8ZSW7M8ZR2WBDED4YNA":3,"skill-same:01M74EZ8ZSW7M8ZR2WBDED4YNA":61},{"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":15,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":13,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":34,"ownerDescription":35,"updatedAt":36,"install":37,"resources":50},"01M74EZ8ZSW7M8ZR2WBDED4YNA","run-tests",null,"Chooses and runs the repository-compatible .NET test command: classic, VSTest, bridged MTP, or native MTP syntax for MSTest, xUnit, NUnit, and TUnit. Use before running .NET tests or answering with a test command or flags: run the tests, one test, class, category, trait or target framework, combined filters, --filter-query, --no-build, --diag, TRX, coverage collection, crash or hang dumps, filter errors, or unrecognized options. Not for platform identification alone (use platform-detection), writing or debugging test code, interpreting a coverage report (use coverage-analysis), CI investigation, migration, or a persistent hot-reload loop.","Cratis\u002FArchitecture","Cratis","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F16456213?v=4","01M6BXRH290K4C8RS4PTKK3HXQ","01M74ET2PT8TQK44HAHJBABW28",0,"MIT","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Frun-tests\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Frun-tests\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: run-tests\ndescription: 'Chooses and runs the repository-compatible .NET test command: classic, VSTest, bridged MTP, or native MTP syntax for MSTest, xUnit, NUnit, and TUnit. Use before running .NET tests or answering with a test command or flags: run the tests, one test, class, category, trait or target framework, combined filters, --filter-query, --no-build, --diag, TRX, coverage collection, crash or hang dumps, filter errors, or unrecognized options. Not for platform identification alone (use platform-detection), writing or debugging test code, interpreting a coverage report (use coverage-analysis), CI investigation, migration, or a persistent hot-reload loop.'\nlicense: MIT\nmetadata:\n  portability: portable\n  binding: optional-overlay\n  binding-revision: '1'\n---\n\u003C!-- cratis-ai-managed: skills\u002Frun-tests\u002FSKILL.md -->\n\n\u003C!-- Modified by Cratis from dotnet's original (MIT): frontmatter, applicability, navigation and the changes listed in NOTICE. Upstream: https:\u002F\u002Fgithub.com\u002Fdotnet\u002Fskills (plugins\u002Fdotnet-test\u002Fskills\u002Frun-tests\u002FSKILL.md; see NOTICE) -->\n\n# Run .NET Tests\n\nCratis rules in `.cratis\u002Fai\u002Frules\u002F` (including `csharp.md`, `specs.csharp.md`, and `orleans.md`) and the `cratis-*` skills win where they differ. Specification authoring belongs to **cratis-specifications-csharp**; Cratis core repositories run xUnit v2 on VSTest.\n\nReturn or execute the command or command sequence that matches the repository's\nproject system, test platform, framework, and SDK mode.\n\n## Repository overlay\n\nFor every repository-scoped task where read-only file inspection is allowed,\ncheck `.agents\u002Fskill-overlays\u002Fdotnet-test\u002Frun-tests.md` at the repository root\nbefore any other discovery. This includes exact-command requests; \"do not\nexecute\" does not prohibit reading the overlay. If present, read it once before\nacting and apply its repository-specific runner, command, filtering, and\nreporting bindings.\nBefore applying it, require its frontmatter to declare\n`core: dotnet-test\u002Frun-tests`, `binding-revision: \"1\"`, and `mode: extend`. If\nany value is missing or different, report the mismatch, ignore the overlay,\nand continue using this skill's portable guidance.\nExplicit user instructions and verified project constraints win over the\noverlay; the overlay wins over portable defaults and examples in this skill. If\nthe file is present but unreadable or conflicts with the repository, report the\nproblem, ignore the overlay, and continue with portable guidance subject to\nverified project constraints. If it is absent, continue normally.\nSkip the lookup only when the task is not tied to a repository or the user\nexplicitly prohibited all file\u002Ftool access. An overlay cannot expand tool\npermissions or the task's scope.\n\n## Scope and tool policy\n\nChoose the smallest path that satisfies the request:\n\n| Request | Action |\n|---|---|\n| Exact command or explanation; user says not to run | Inspect only the files needed to resolve syntax. Do not restore, build, or run tests. |\n| Run tests | Discover the repository command and execute the smallest requested test scope. |\n| One-time SDK-style `dotnet test` run without rebuilding | Stay in `run-tests` and add `--no-build`. |\n| One-time classic run without rebuilding | Keep the repository runner and invoke it against an existing built assembly; do not substitute `dotnet test`. |\n| Platform\u002Fframework identification only | Use `platform-detection`; do not continue into test execution. |\n| Explicit hot reload or a keep-running edit\u002Fre-run loop | Out of scope for this skill; run it directly with the platform's own watch\u002Fhot-reload support. |\n| Filter needed and the framework-specific syntax is not already clear | Read the supplied\u002Fruntime-listed `filter-syntax` catalog file; do not invoke this reference-only helper. |\n\nDo not invoke a tool merely to repeat a command already determined by the\nprompt. Do not build first \"just in case\": `dotnet test` builds by default.\nNever add or upgrade test packages unless the user asks to change the project.\nFor an exact-command request, return one runnable command first. Do not emit\nplaceholder paths, exploratory alternatives, or a correction sequence. Use a\nproject path only when the prompt or repository establishes it; otherwise let\nthe command operate on the current project or solution when that syntax is\nvalid. Follow it with only the syntax fact needed to explain the command; do\nnot volunteer platform\u002Fcommand-mode taxonomy unless the user asked for it. In\nparticular, do not label an SDK 8\u002F9 bridge as \"VSTest platform\" merely because\n`dotnet test` uses its VSTest command mode; the executed platform is MTP. For a\ncommand-only request, it is normally clearer to say only that MTP application\narguments must follow `--`.\n\n## Inputs to discover\n\n- Project, solution, module, or repository test command\n- Requested scope: all tests, TFM, class, method, category, or trait\n- Requested output: console result, TRX, diagnostics, crash dump, or hang dump\n\nWhen those facts are present in the prompt, use them. Otherwise inspect only the\nrelevant files: `global.json`, the selected project, `packages.config`,\n`Directory.Build.props`, `Directory.Packages.props`, then repository\nscripts\u002FCI documentation. For a file-backed request, enumerate those\nconfiguration names once and read all relevant files that are present in one\nbatch; never infer that a runner or bridge property is absent merely because it\nis not in the `.csproj`. Load `platform-detection` only when those signals need\nprecedence analysis; do not duplicate its full analysis in the response.\nIf execution is requested and the command depends on the active SDK but neither\nthe prompt nor `global.json` establishes it, run `dotnet --version` once. For a\ncommand-only request that prohibits execution, do not probe: state the required\nSDK assumption or ask for the SDK version when the syntax cannot otherwise be\nresolved. Route identification-only requests to `platform-detection`.\n\n## Decision table\n\n| Detected mode \u002F platform | Command shape | Never use |\n|---|---|---|\n| Classic non-SDK | Repository script, or full MSBuild followed by `vstest.console.exe` \u002F `MSTest.exe` | Assuming `dotnet test` is compatible or migrating implicitly |\n| VSTest mode \u002F VSTest | `dotnet test [\u003Cpath>] [VSTEST_OPTIONS]` | MTP-only flags such as `--report-trx` or `--treenode-filter` |\n| VSTest mode \u002F executable MTP bridge | `dotnet test [\u003Cpath>] [DOTNET_OPTIONS] -- [MTP_OPTIONS]` | Omitting the `--` separator, including on SDK 10 |\n| Native MTP mode, SDK 10+ | `dotnet test --project \u003Cpath> [DOTNET_OPTIONS] [MTP_OPTIONS]` | Bare positional project paths or the bridge separator |\n\n`global.json` controls the `dotnet test` command mode on SDK 10+, not\nnecessarily the platform that executes tests. A VSTest-mode project with an MTP\nrunner, `TestingPlatformDotnetTestSupport=true`, and final `OutputType=Exe` is\nstill bridge syntax with `--`. SDK 8\u002F9 only has VSTest command mode.\n\n`--project` is valid only in SDK 10+ **native MTP command mode** (selected by\n`global.json` `test.runner`). Never use it for VSTest mode or an SDK 8\u002F9 bridge;\nthose forms take a positional project path. Conversely, native MTP options are\ndirect arguments and must not be placed after a bridge separator.\n\nKeep `dotnet test`\u002FMSBuild options such as `--framework`, `--configuration`,\n`--no-build`, and `--verbosity` before `--`. Put only MTP application arguments\nafter `--` in bridge mode.\n\n## Workflow\n\n1. **Resolve the repository-compatible runner.**\n\nFor classic projects, signals include `ToolsVersion`, explicit `Compile` and\n`Reference` items, legacy imports, and `packages.config`. Prefer a checked-in\nscript or documented CI command. A typical fallback is:\n\n```powershell\nnuget restore MySolution.sln\nMSBuild.exe MySolution.sln \u002Ft:Build \u002Fp:Configuration=Debug\nvstest.console.exe path\\to\\MyTests.dll \u002FTestAdapterPath:path\\to\\adapter\\build\\\u003Ctfm>\n```\n\nFor `packages.config`, restore with NuGet before the build unless the imported\npackage files are already present. If adapter discovery is not repository-\nconfigured, derive `\u002FTestAdapterPath` from the restored adapter package path or\nthe adapter `.props`\u002F`.targets` imports; do not guess the package root.\n\nFor a requested no-rebuild run, omit the build step and invoke the repository's\ntest runner only when the expected assembly already exists. Otherwise report the\nmissing build output rather than silently rebuilding or switching runners.\n\nFor a requested subset, keep the repository runner and use its filter syntax:\n`vstest.console.exe path\\to\\MyTests.dll\n\u002FTestCaseFilter:\"TestCategory=Integration\"`. Older `MSTest.exe` repositories may\nuse `\u002Ftest:\u003Cname>` or `\u002Fcategory:\u003Ccategory>` instead. Do not substitute the\nlater `dotnet test` filter examples for a classic runner.\n\nUse the installed adapter-compatible VSTest\u002FMSTest toolchain. If it is not\navailable, state the missing prerequisite and the documented command; do not\nclaim tests ran.\nClassic `packages.config` fallback commands are Windows toolchain commands.\nExplicitly say they require a Windows Developer Command Prompt (or the\nrepository's equivalent configured environment) when the current host cannot\nprovide `nuget`, full MSBuild, and `vstest.console.exe`.\n\nFor SDK-style projects, distinguish:\n\n| Signal | Meaning |\n|---|---|\n| SDK 10+ `global.json` selects `Microsoft.Testing.Platform` | Native MTP command mode |\n| VSTest mode + enabled MTP runner + final `TestingPlatformDotnetTestSupport=true` + final `OutputType=Exe` | Executable VSTest-to-MTP bridge |\n| VSTest mode without a complete runner-and-bridge combination | VSTest |\n| `Microsoft.NET.Test.Sdk` plus adapter, without stronger MTP signals | VSTest |\n| `TUnit` | MTP-only; use a configured bridge\u002Fnative mode or the test executable |\n\nEvaluate properties from the project and imported\n`Directory.Build.props`\u002F`Directory.Packages.props`. Respect project-level\noverrides and per-target-framework conditions. A runner and bridge without an\nexecutable final output are an incomplete MTP configuration, not a usable\nbridge.\n\n2. **Select the command and requested scope.**\n\n```shell\n# VSTest mode\ndotnet test path\u002Fto\u002FTests.csproj\n\n# VSTest mode that bridges to MTP\ndotnet test path\u002Fto\u002FTests.csproj -- \u003CMTP_OPTIONS>\n\n# Native MTP mode on SDK 10+\ndotnet test --project path\u002Fto\u002FTests.csproj \u003CMTP_OPTIONS>\n\n# One target framework; this stays before the bridge separator\ndotnet test path\u002Fto\u002FTests.csproj --framework net9.0 -- \u003CMTP_OPTIONS>\n```\n\nFor native MTP, use `--project`, `--solution`, or `--test-modules`; positional\npaths belong to VSTest mode.\n\nIf the user names a subset, do not run the whole suite. Inspect test attributes\nonly when needed to translate a human label such as \"integration\" or \"smoke\"\ninto the framework's actual category\u002Ftrait name.\n\nWhen a VSTest class filter must distinguish similarly named classes, combine\nthe positive selector with an explicit negative selector rather than relying on\nan incidental substring difference.\n\n3. **Apply platform- and framework-correct filters.**\n\nRead the supplied or runtime-listed `filter-syntax` file only when the request\nis filtered and framework-specific syntax is unclear. It is reference-only,\nnot an invocable skill; otherwise use the common decisions below:\n\nFor a file-backed filtered request, resolve the framework and SDK command mode\nfrom the project, `global.json`, and imported props before choosing syntax.\nDo not infer VSTest syntax merely from `Microsoft.NET.Test.Sdk` or from the\nframework name.\n\n| Platform \u002F framework | Filter |\n|---|---|\n| VSTest with MSTest, xUnit v2, or NUnit | `--filter \"\u003Cproperty expression>\"` |\n| MTP with MSTest or NUnit | Same expression; after `--` in bridge mode, direct in native mode |\n| MTP with xUnit v3 | `--filter-class`, `--filter-method`, `--filter-trait`, or one `--filter-query` for a combined expression |\n| MTP with TUnit | `--treenode-filter` path expression |\n\nExamples:\n\n```shell\n# VSTest MSTest\u002FNUnit\ndotnet test --filter \"FullyQualifiedName~OrderServiceTests&TestCategory=Unit\"\n\n# SDK 8\u002F9 or SDK 10 VSTest-mode MTP bridge, xUnit v3\ndotnet test -- --filter-trait \"Category=Integration\"\n\n# Native MTP, xUnit v3\ndotnet test --project Tests.csproj --filter-class \"*ShoppingCartTests*\"\n\n# One xUnit v3 combined expression\ndotnet test -- --filter-query \"\u002F*\u002F*\u002F*Integration*\u002F*[Category=Smoke]\"\n\n# TUnit on SDK 8\u002F9 with a configured VSTest-to-MTP bridge\ndotnet test -- --treenode-filter \"\u002F*\u002F*\u002FSmsNotificationTests\u002F*\"\n\n# TUnit executable fallback when no bridge is configured\ndotnet run --project Tests.csproj -- --treenode-filter \"\u002F*\u002F*\u002FSmsNotificationTests\u002F*\"\n```\n\nDo not use VSTest `--filter \"ClassName=...\"` with xUnit v3 on MTP. Do not use a\ngeneric VSTest expression with TUnit.\nWhen the user requests one combined xUnit query expression, return only one\n`--filter-query` command; do not replace it with separate filter flags or offer\nspeculative alternative grammars.\n\n4. **Add reports or diagnostics.**\n\n| Outcome | VSTest | MTP |\n|---|---|---|\n| TRX | SDK-style: `--logger \"trx;LogFileName=\u003Cname>.trx\"` when an exact output file is requested, otherwise `--logger trx`; standalone `vstest.console.exe`: `\u002FLogger:trx`; `MSTest.exe`: repository-documented results option | `--report-trx` |\n| Results directory | `--results-directory \u003Cdir>` | `--results-directory \u003Cdir>` |\n| Diagnostic log | `--diag \u003Cfile>` | `--diagnostic --diagnostic-output-directory \u003Cdir>` |\n| Crash dump | `--blame-crash` | `--crashdump` |\n| Hang timeout | `--blame-hang --blame-hang-timeout 5min` | `--hangdump --hangdump-timeout 5min` |\n| Code coverage | `--collect \"Code Coverage\"` | `--coverage` |\n\nMTP report, dump, and coverage flags require their corresponding registered\nextensions (`TrxReport`, `CrashDump`, `HangDump`, or `CodeCoverage`). Some\nframework SDKs bundle common extensions; if a flag is unrecognized, inspect\npackage references before recommending a package change.\n\n`--verbosity diagnostic` increases dotnet\u002FMSBuild output verbosity; it does not\nwrite a VSTest diagnostic log file.\n\nExamples:\n\n```shell\n# VSTest TRX\ndotnet test Tests.csproj --logger \"trx;LogFileName=TestResults.trx\"\n\n# MTP bridge TRX\ndotnet test Tests.csproj -- --report-trx\n\n# Native MTP TRX and hang detection\ndotnet test --project Tests.csproj --report-trx --hangdump --hangdump-timeout 5min\n\n# Native MTP diagnostics\ndotnet test --project Tests.csproj --diagnostic --diagnostic-output-directory artifacts\u002Fdiagnostics\n```\n\n5. **Execute only when requested.**\n\nRun the narrowest command or sequence that answers the request. Capture each\ncommand, exit code, and test summary. A failed restore\u002Fbuild is not a test\nfailure, and a test failure is not a tool failure. Report which phase failed and\ninclude the actionable diagnostic. Never claim a clean run unless the sequence\ncompleted successfully with the intended tests executed.\nFor a filtered run, a successful exit is not enough: confirm the reported test\nnames or count match the requested scope. If the filter was ignored, correct the\nplatform-specific syntax and rerun before reporting success.\n\n## Output contract\n\n- Command-only request: lead with the exact command or command sequence, then\n  one short syntax explanation.\n- Execution request: report the exact command or command sequence and\n  a literal `Passed: N, Failed: N, Skipped: N` summary from the completed run;\n  include the first actionable failure.\n- Detection needed only to choose syntax: state the selected mode\u002Fplatform\n  briefly, not a separate detection report.\n- Missing prerequisite or incompatible configuration: name it explicitly and\n  stop rather than returning a success-shaped fallback.\n\n## Validation\n\n- The command matches classic, VSTest, bridged MTP, or native MTP mode.\n- The framework-specific filter targets the requested subset.\n- `--framework` and other `dotnet test` options are before any bridge separator.\n- SDK 8\u002F9 bridge commands contain `--`; `--project` appears only in SDK 10+\n  native MTP mode.\n- TRX, diagnostics, dump, and coverage flags match the platform.\n- No restore, build, or test was run for an advisory-only request.\n- Reported results match the actual command outcome.\n","\u003C!-- cratis-ai-managed: skills\u002Frun-tests\u002FSKILL.md -->\n\n\u003C!-- Modified by Cratis from dotnet's original (MIT): frontmatter, applicability, navigation and the changes listed in NOTICE. Upstream: https:\u002F\u002Fgithub.com\u002Fdotnet\u002Fskills (plugins\u002Fdotnet-test\u002Fskills\u002Frun-tests\u002FSKILL.md; see NOTICE) -->\n\n# Run .NET Tests\n\nCratis rules in `.cratis\u002Fai\u002Frules\u002F` (including `csharp.md`, `specs.csharp.md`, and `orleans.md`) and the `cratis-*` skills win where they differ. Specification authoring belongs to **cratis-specifications-csharp**; Cratis core repositories run xUnit v2 on VSTest.\n\nReturn or execute the command or command sequence that matches the repository's\nproject system, test platform, framework, and SDK mode.\n\n## Repository overlay\n\nFor every repository-scoped task where read-only file inspection is allowed,\ncheck `.agents\u002Fskill-overlays\u002Fdotnet-test\u002Frun-tests.md` at the repository root\nbefore any other discovery. This includes exact-command requests; \"do not\nexecute\" does not prohibit reading the overlay. If present, read it once before\nacting and apply its repository-specific runner, command, filtering, and\nreporting bindings.\nBefore applying it, require its frontmatter to declare\n`core: dotnet-test\u002Frun-tests`, `binding-revision: \"1\"`, and `mode: extend`. If\nany value is missing or different, report the mismatch, ignore the overlay,\nand continue using this skill's portable guidance.\nExplicit user instructions and verified project constraints win over the\noverlay; the overlay wins over portable defaults and examples in this skill. If\nthe file is present but unreadable or conflicts with the repository, report the\nproblem, ignore the overlay, and continue with portable guidance subject to\nverified project constraints. If it is absent, continue normally.\nSkip the lookup only when the task is not tied to a repository or the user\nexplicitly prohibited all file\u002Ftool access. An overlay cannot expand tool\npermissions or the task's scope.\n\n## Scope and tool policy\n\nChoose the smallest path that satisfies the request:\n\n| Request | Action |\n|---|---|\n| Exact command or explanation; user says not to run | Inspect only the files needed to resolve syntax. Do not restore, build, or run tests. |\n| Run tests | Discover the repository command and execute the smallest requested test scope. |\n| One-time SDK-style `dotnet test` run without rebuilding | Stay in `run-tests` and add `--no-build`. |\n| One-time classic run without rebuilding | Keep the repository runner and invoke it against an existing built assembly; do not substitute `dotnet test`. |\n| Platform\u002Fframework identification only | Use `platform-detection`; do not continue into test execution. |\n| Explicit hot reload or a keep-running edit\u002Fre-run loop | Out of scope for this skill; run it directly with the platform's own watch\u002Fhot-reload support. |\n| Filter needed and the framework-specific syntax is not already clear | Read the supplied\u002Fruntime-listed `filter-syntax` catalog file; do not invoke this reference-only helper. |\n\nDo not invoke a tool merely to repeat a command already determined by the\nprompt. Do not build first \"just in case\": `dotnet test` builds by default.\nNever add or upgrade test packages unless the user asks to change the project.\nFor an exact-command request, return one runnable command first. Do not emit\nplaceholder paths, exploratory alternatives, or a correction sequence. Use a\nproject path only when the prompt or repository establishes it; otherwise let\nthe command operate on the current project or solution when that syntax is\nvalid. Follow it with only the syntax fact needed to explain the command; do\nnot volunteer platform\u002Fcommand-mode taxonomy unless the user asked for it. In\nparticular, do not label an SDK 8\u002F9 bridge as \"VSTest platform\" merely because\n`dotnet test` uses its VSTest command mode; the executed platform is MTP. For a\ncommand-only request, it is normally clearer to say only that MTP application\narguments must follow `--`.\n\n## Inputs to discover\n\n- Project, solution, module, or repository test command\n- Requested scope: all tests, TFM, class, method, category, or trait\n- Requested output: console result, TRX, diagnostics, crash dump, or hang dump\n\nWhen those facts are present in the prompt, use them. Otherwise inspect only the\nrelevant files: `global.json`, the selected project, `packages.config`,\n`Directory.Build.props`, `Directory.Packages.props`, then repository\nscripts\u002FCI documentation. For a file-backed request, enumerate those\nconfiguration names once and read all relevant files that are present in one\nbatch; never infer that a runner or bridge property is absent merely because it\nis not in the `.csproj`. Load `platform-detection` only when those signals need\nprecedence analysis; do not duplicate its full analysis in the response.\nIf execution is requested and the command depends on the active SDK but neither\nthe prompt nor `global.json` establishes it, run `dotnet --version` once. For a\ncommand-only request that prohibits execution, do not probe: state the required\nSDK assumption or ask for the SDK version when the syntax cannot otherwise be\nresolved. Route identification-only requests to `platform-detection`.\n\n## Decision table\n\n| Detected mode \u002F platform | Command shape | Never use |\n|---|---|---|\n| Classic non-SDK | Repository script, or full MSBuild followed by `vstest.console.exe` \u002F `MSTest.exe` | Assuming `dotnet test` is compatible or migrating implicitly |\n| VSTest mode \u002F VSTest | `dotnet test [\u003Cpath>] [VSTEST_OPTIONS]` | MTP-only flags such as `--report-trx` or `--treenode-filter` |\n| VSTest mode \u002F executable MTP bridge | `dotnet test [\u003Cpath>] [DOTNET_OPTIONS] -- [MTP_OPTIONS]` | Omitting the `--` separator, including on SDK 10 |\n| Native MTP mode, SDK 10+ | `dotnet test --project \u003Cpath> [DOTNET_OPTIONS] [MTP_OPTIONS]` | Bare positional project paths or the bridge separator |\n\n`global.json` controls the `dotnet test` command mode on SDK 10+, not\nnecessarily the platform that executes tests. A VSTest-mode project with an MTP\nrunner, `TestingPlatformDotnetTestSupport=true`, and final `OutputType=Exe` is\nstill bridge syntax with `--`. SDK 8\u002F9 only has VSTest command mode.\n\n`--project` is valid only in SDK 10+ **native MTP command mode** (selected by\n`global.json` `test.runner`). Never use it for VSTest mode or an SDK 8\u002F9 bridge;\nthose forms take a positional project path. Conversely, native MTP options are\ndirect arguments and must not be placed after a bridge separator.\n\nKeep `dotnet test`\u002FMSBuild options such as `--framework`, `--configuration`,\n`--no-build`, and `--verbosity` before `--`. Put only MTP application arguments\nafter `--` in bridge mode.\n\n## Workflow\n\n1. **Resolve the repository-compatible runner.**\n\nFor classic projects, signals include `ToolsVersion`, explicit `Compile` and\n`Reference` items, legacy imports, and `packages.config`. Prefer a checked-in\nscript or documented CI command. A typical fallback is:\n\n```powershell\nnuget restore MySolution.sln\nMSBuild.exe MySolution.sln \u002Ft:Build \u002Fp:Configuration=Debug\nvstest.console.exe path\\to\\MyTests.dll \u002FTestAdapterPath:path\\to\\adapter\\build\\\u003Ctfm>\n```\n\nFor `packages.config`, restore with NuGet before the build unless the imported\npackage files are already present. If adapter discovery is not repository-\nconfigured, derive `\u002FTestAdapterPath` from the restored adapter package path or\nthe adapter `.props`\u002F`.targets` imports; do not guess the package root.\n\nFor a requested no-rebuild run, omit the build step and invoke the repository's\ntest runner only when the expected assembly already exists. Otherwise report the\nmissing build output rather than silently rebuilding or switching runners.\n\nFor a requested subset, keep the repository runner and use its filter syntax:\n`vstest.console.exe path\\to\\MyTests.dll\n\u002FTestCaseFilter:\"TestCategory=Integration\"`. Older `MSTest.exe` repositories may\nuse `\u002Ftest:\u003Cname>` or `\u002Fcategory:\u003Ccategory>` instead. Do not substitute the\nlater `dotnet test` filter examples for a classic runner.\n\nUse the installed adapter-compatible VSTest\u002FMSTest toolchain. If it is not\navailable, state the missing prerequisite and the documented command; do not\nclaim tests ran.\nClassic `packages.config` fallback commands are Windows toolchain commands.\nExplicitly say they require a Windows Developer Command Prompt (or the\nrepository's equivalent configured environment) when the current host cannot\nprovide `nuget`, full MSBuild, and `vstest.console.exe`.\n\nFor SDK-style projects, distinguish:\n\n| Signal | Meaning |\n|---|---|\n| SDK 10+ `global.json` selects `Microsoft.Testing.Platform` | Native MTP command mode |\n| VSTest mode + enabled MTP runner + final `TestingPlatformDotnetTestSupport=true` + final `OutputType=Exe` | Executable VSTest-to-MTP bridge |\n| VSTest mode without a complete runner-and-bridge combination | VSTest |\n| `Microsoft.NET.Test.Sdk` plus adapter, without stronger MTP signals | VSTest |\n| `TUnit` | MTP-only; use a configured bridge\u002Fnative mode or the test executable |\n\nEvaluate properties from the project and imported\n`Directory.Build.props`\u002F`Directory.Packages.props`. Respect project-level\noverrides and per-target-framework conditions. A runner and bridge without an\nexecutable final output are an incomplete MTP configuration, not a usable\nbridge.\n\n2. **Select the command and requested scope.**\n\n```shell\n# VSTest mode\ndotnet test path\u002Fto\u002FTests.csproj\n\n# VSTest mode that bridges to MTP\ndotnet test path\u002Fto\u002FTests.csproj -- \u003CMTP_OPTIONS>\n\n# Native MTP mode on SDK 10+\ndotnet test --project path\u002Fto\u002FTests.csproj \u003CMTP_OPTIONS>\n\n# One target framework; this stays before the bridge separator\ndotnet test path\u002Fto\u002FTests.csproj --framework net9.0 -- \u003CMTP_OPTIONS>\n```\n\nFor native MTP, use `--project`, `--solution`, or `--test-modules`; positional\npaths belong to VSTest mode.\n\nIf the user names a subset, do not run the whole suite. Inspect test attributes\nonly when needed to translate a human label such as \"integration\" or \"smoke\"\ninto the framework's actual category\u002Ftrait name.\n\nWhen a VSTest class filter must distinguish similarly named classes, combine\nthe positive selector with an explicit negative selector rather than relying on\nan incidental substring difference.\n\n3. **Apply platform- and framework-correct filters.**\n\nRead the supplied or runtime-listed `filter-syntax` file only when the request\nis filtered and framework-specific syntax is unclear. It is reference-only,\nnot an invocable skill; otherwise use the common decisions below:\n\nFor a file-backed filtered request, resolve the framework and SDK command mode\nfrom the project, `global.json`, and imported props before choosing syntax.\nDo not infer VSTest syntax merely from `Microsoft.NET.Test.Sdk` or from the\nframework name.\n\n| Platform \u002F framework | Filter |\n|---|---|\n| VSTest with MSTest, xUnit v2, or NUnit | `--filter \"\u003Cproperty expression>\"` |\n| MTP with MSTest or NUnit | Same expression; after `--` in bridge mode, direct in native mode |\n| MTP with xUnit v3 | `--filter-class`, `--filter-method`, `--filter-trait`, or one `--filter-query` for a combined expression |\n| MTP with TUnit | `--treenode-filter` path expression |\n\nExamples:\n\n```shell\n# VSTest MSTest\u002FNUnit\ndotnet test --filter \"FullyQualifiedName~OrderServiceTests&TestCategory=Unit\"\n\n# SDK 8\u002F9 or SDK 10 VSTest-mode MTP bridge, xUnit v3\ndotnet test -- --filter-trait \"Category=Integration\"\n\n# Native MTP, xUnit v3\ndotnet test --project Tests.csproj --filter-class \"*ShoppingCartTests*\"\n\n# One xUnit v3 combined expression\ndotnet test -- --filter-query \"\u002F*\u002F*\u002F*Integration*\u002F*[Category=Smoke]\"\n\n# TUnit on SDK 8\u002F9 with a configured VSTest-to-MTP bridge\ndotnet test -- --treenode-filter \"\u002F*\u002F*\u002FSmsNotificationTests\u002F*\"\n\n# TUnit executable fallback when no bridge is configured\ndotnet run --project Tests.csproj -- --treenode-filter \"\u002F*\u002F*\u002FSmsNotificationTests\u002F*\"\n```\n\nDo not use VSTest `--filter \"ClassName=...\"` with xUnit v3 on MTP. Do not use a\ngeneric VSTest expression with TUnit.\nWhen the user requests one combined xUnit query expression, return only one\n`--filter-query` command; do not replace it with separate filter flags or offer\nspeculative alternative grammars.\n\n4. **Add reports or diagnostics.**\n\n| Outcome | VSTest | MTP |\n|---|---|---|\n| TRX | SDK-style: `--logger \"trx;LogFileName=\u003Cname>.trx\"` when an exact output file is requested, otherwise `--logger trx`; standalone `vstest.console.exe`: `\u002FLogger:trx`; `MSTest.exe`: repository-documented results option | `--report-trx` |\n| Results directory | `--results-directory \u003Cdir>` | `--results-directory \u003Cdir>` |\n| Diagnostic log | `--diag \u003Cfile>` | `--diagnostic --diagnostic-output-directory \u003Cdir>` |\n| Crash dump | `--blame-crash` | `--crashdump` |\n| Hang timeout | `--blame-hang --blame-hang-timeout 5min` | `--hangdump --hangdump-timeout 5min` |\n| Code coverage | `--collect \"Code Coverage\"` | `--coverage` |\n\nMTP report, dump, and coverage flags require their corresponding registered\nextensions (`TrxReport`, `CrashDump`, `HangDump`, or `CodeCoverage`). Some\nframework SDKs bundle common extensions; if a flag is unrecognized, inspect\npackage references before recommending a package change.\n\n`--verbosity diagnostic` increases dotnet\u002FMSBuild output verbosity; it does not\nwrite a VSTest diagnostic log file.\n\nExamples:\n\n```shell\n# VSTest TRX\ndotnet test Tests.csproj --logger \"trx;LogFileName=TestResults.trx\"\n\n# MTP bridge TRX\ndotnet test Tests.csproj -- --report-trx\n\n# Native MTP TRX and hang detection\ndotnet test --project Tests.csproj --report-trx --hangdump --hangdump-timeout 5min\n\n# Native MTP diagnostics\ndotnet test --project Tests.csproj --diagnostic --diagnostic-output-directory artifacts\u002Fdiagnostics\n```\n\n5. **Execute only when requested.**\n\nRun the narrowest command or sequence that answers the request. Capture each\ncommand, exit code, and test summary. A failed restore\u002Fbuild is not a test\nfailure, and a test failure is not a tool failure. Report which phase failed and\ninclude the actionable diagnostic. Never claim a clean run unless the sequence\ncompleted successfully with the intended tests executed.\nFor a filtered run, a successful exit is not enough: confirm the reported test\nnames or count match the requested scope. If the filter was ignored, correct the\nplatform-specific syntax and rerun before reporting success.\n\n## Output contract\n\n- Command-only request: lead with the exact command or command sequence, then\n  one short syntax explanation.\n- Execution request: report the exact command or command sequence and\n  a literal `Passed: N, Failed: N, Skipped: N` summary from the completed run;\n  include the first actionable failure.\n- Detection needed only to choose syntax: state the selected mode\u002Fplatform\n  briefly, not a separate detection report.\n- Missing prerequisite or incompatible configuration: name it explicitly and\n  stop rather than returning a success-shaped fallback.\n\n## Validation\n\n- The command matches classic, VSTest, bridged MTP, or native MTP mode.\n- The framework-specific filter targets the requested subset.\n- `--framework` and other `dotnet test` options are before any bridge separator.\n- SDK 8\u002F9 bridge commands contain `--`; `--project` appears only in SDK 10+\n  native MTP mode.\n- TRX, diagnostics, dump, and coverage flags match the platform.\n- No restore, build, or test was run for an advisory-only request.\n- Reported results match the actual command outcome.\n",{"name":5,"license":14,"metadata":24,"description":7},{"binding":25,"portability":26,"binding-revision":27},"optional-overlay","portable","1","main","68f67ef8a166617b7a614aae2545f77d3c7d5ab8",".cratis\u002Fai\u002Fskills\u002Frun-tests","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture","https:\u002F\u002Fwww.cratis.io\u002Farchitecture\u002F","https:\u002F\u002Fgithub.com\u002FCratis","https:\u002F\u002Fwww.cratis.io","Open-source (MIT) event sourcing and CQRS for .NET and beyond: Chronicle, Arc, Components and Screenplay.","2026-11-14 06:37:25",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add Cratis\u002FArchitecture --skill run-tests",{"tool":43,"command":44},"bunx","bunx skills add Cratis\u002FArchitecture --skill run-tests",{"tool":46,"command":47},"pnpm","pnpm dlx skills add Cratis\u002FArchitecture --skill run-tests","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Frun-tests\u002FSKILL.md",true,[51,55],{"path":52,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":15},"LICENSE","许可证",1162,{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"NOTICE","OTHER","其他",995,"https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Frun-tests\u002FNOTICE",[62,70,78,86,94,102],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":66,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M74EZHX4AJ09G25KF026Q7P5","vectorization","Designs, implements, optimizes, and reviews SIMD code in .NET: vectorizing scalar loops with TensorPrimitives, Vector64, Vector128, Vector256, Vector512, or hardware intrinsics, and reviewing existing SIMD code, including the generic Vector type, for contract equivalence, tail handling, memory safety, portability, fallbacks, and measured performance. Use when a .NET loop or SIMD routine is being written or reviewed. Not for performance work unrelated to SIMD.","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fvectorization\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fvectorization\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":74,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M74EZD5Y0JQAJATM11TTSZRA","target-authoring","Canonical patterns for writing custom MSBuild targets: DependsOnTargets versus BeforeTargets and AfterTargets, the Build-to-CoreBuild three-level pattern, and the XxxDependsOn chain-extension pattern. Use when diagnosing or fixing custom-target anti-patterns: Directory.Build.targets redefining SDK targets, targets that replace CompileDependsOn instead of extending it, Outputs versus Returns misuse that returns stale results, missing Inputs\u002FOutputs causing needless rebuilds, or missing FileWrites registration. Not for incremental build tuning or general anti-pattern review (use the msbuild skill), or non-MSBuild build systems.","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Ftarget-authoring\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Ftarget-authoring\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":82,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M74EZ4Q0W4B632KY77V6K5EP","profiling","Uses the free official .NET diagnostics CLI tools for profiling and runtime investigation in a repository: CPU, GC pressure, allocation growth, exception storms, lock contention, and slow code. Use when a .NET application needs performance or runtime profiling. Not for replacing realistic performance or load tests with ad-hoc tracing, production heap collection without a pause-risk plan, crash dumps (use dump-collect), or benchmark design (use microbenchmarking).","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fprofiling\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fprofiling\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":90,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M74EZ08N8PGKKZY6Z1DRR5YS","platform-detection","Identifies a .NET project's test platform, framework, command mode, and SDK-style versus classic project system, resolving global.json, project, packages.config, Directory.Build.props, and Directory.Packages.props precedence for MSTest, xUnit, NUnit, and TUnit. Use when asking \"which test platform or framework?\", \"VSTest or MTP?\", or \"what runner does this project use?\", including bridge settings, UseVSTest opt-outs, and conflicting VSTest\u002FMTP configuration. Not for running or filtering tests, commands, flags, TRX, dumps, or test-command errors (use run-tests), or for hot-reload or migration requests.","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fplatform-detection\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fplatform-detection\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":98,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M74EYW35N2Y22QQXANX9TQ1V","orleans","Designs Microsoft Orleans systems from each primitive's purpose and failure model: grains, digital twins, state versus databases, transactions, messaging, streams, timers, reminders, Durable Jobs, stateless workers, grain services, startup, and hosting. Use when a task needs an Orleans design decision: inspect version and topology, choose the primitive, implement, and validate. Not for other actor stacks, batch processing, relational-only CRUD, or advice without an Orleans decision.","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Forleans\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Forleans\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":106,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M74EYQ6WX5SZXWPT6R9SMVWQ","msbuild","Investigates MSBuild build failures, diagnoses build performance, and reviews build XML and extension contracts using binary logs. Use for failing dotnet build, restore, pack, or publish; .binlog capture and replay; project, props, and targets conditions; custom-target inputs\u002Foutputs; Import\u002FExists hooks and packed NuGet imports; slow evaluation, compilation, copying, or no-change builds; and controlled timing comparisons. Not for legacy or non-SDK project migration, framework or package upgrades, SDK installation, C# refactoring, runtime profiling, assertions after a successful build, or non-MSBuild builds.","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fmsbuild\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCratis\u002FArchitecture\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fmsbuild\u002FSKILL.md",[],[]]