dotnet-efficient-validation
Skill3 starsChanged 35 days agoMITView on GitHub
Efficient .NET validation with low noise and no redundant work. Mandatory when running dotnet build, publish, or run, or discovering, listing, or running tests with VSTest or Microsoft.Testing.Platform (MTP). Do not use to migrate test frameworks.
In this repository26 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ai-ready-fixSkill
- ai-ready-scoreSkill
- architectural-analysisSkill
- commitSkill
- deep-reviewSkill
- domain-modelingSkill
- herdr-orchestrationSkill
- no-workaroundsSkill
- repository-cli-efficiencySkill
- sdd-create-prdSkill
- sdd-create-techspecSkill
- sdd-execute-correctionsSkill
- sdd-execute-taskSkill
- sdd-orchestrate-flowSkill
- sdd-orchestrate-prdsSkill
- sdd-orchestrate-tasksSkill
- sdd-plan-auditSkill
- sdd-plan-correctionsSkill
- sdd-plan-refactoringSkill
- sdd-plan-tasksSkill
- sdd-review-codeSkill
- sdd-snapshotSkill
- sdd-triageSkill
- update-nuget-packagesSkill
- writing-agents-mdSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 7 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Use this skill before any execution of:
- Distinctive: line 15
test discovery or execution with VSTest or Microsoft.Testing.Platform (MTP).
- Very specific: line 23
Prefer the most specific test.
- Distinctive: line 24
If restore assets are missing or package references changed, restore once:
- Very specific: line 44
Run dotnet publish only when the published artifact or packaging validation is needed.
- Very specific: line 47
Use concise output options accepted by the runner.
- Very specific: line 49
If minimum validation fails, repeat only the necessary step with normal output or rtk proxy, preserving the first error.
- Very specific: line 53
Check the selected SDK with rtk dotnet --version, the effective global.json, and test projects in scope.
- Very specific: line 54
Look for test.runner: "Microsoft.Testing.Platform" in global.json, SDKs such as MSTest.Sdk, packages Microsoft.Testing.Platform/.MSBuild, …
- Distinctive: line 56
If imports or conditions leave doubt, query evaluated properties without running targets, preserving the target's configuration and …
- Very specific: line 66
Always prefix shell commands with rtk, as required by the global instructions.
- Distinctive: line 67
Do not run the full suite when a specific project or filter meets the goal.
- Distinctive: line 68
Do not combine build and test so that the test recompiles the same code unnecessarily.
- Very specific: line 69
Do not silence build, test, publish, or run with Out-Null.
- Distinctive: line 70
Do not treat reduced output as reduced compile, restore, test, or publish time.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Efficient .NET validation
When to use
Use this skill before any execution of:
dotnet build;- test discovery or execution with VSTest or Microsoft.Testing.Platform (MTP);
dotnet publish;dotnet run;- validation of a C# solution, project, or test.
Procedure
- Identify the directly affected project or solution. For tests, determine the runner under Runner detection before choosing arguments.
- Prefer the most specific test. In VSTest, use
--filter; for MTP, read references/mtp.md in full before listing or running tests. If restore assets are missing or package references changed, restore once:
rtk dotnet restore <project-or-solution> --nologo --verbosity:minimalWith updated assets, build without restore only when a valid build does not already exist:
rtk dotnet build <project-or-solution> --no-restore --nologo --verbosity:minimalReuse the build only for the same code, configuration, framework, and runtime. In VSTest, run without rebuilding or restoring:
rtk dotnet test <project-or-solution> --no-build --no-restore --nologo --logger "console;verbosity=minimal"To discover names or investigate a filter with no matches, add
--list-testsand check the listed tests. Listing does not replace execution. In MTP, use the command for the mode identified in the reference.- Run
dotnet publishonly when the published artifact or packaging validation is needed. Prefer--no-restore; use--no-buildonly when the corresponding build is already valid. - For
dotnet run, use--no-build --no-restorewhen a valid build exists. Never useOut-Nullas the primary diagnostic. - In PowerShell, preserve the exit code. After pipes or compound commands, check
$LASTEXITCODEand propagate failures. - Use concise output options accepted by the runner.
--verbosity:minimaland--nologoserve build and VSTest commands; MTP options are in the reference. Select-Object -Last Nreduces context received by the agent, but does not reduce process work and can hide a failure's cause. Use it only for supplemental inspection after preserving the command result.- If minimum validation fails, repeat only the necessary step with normal output or
rtk proxy, preserving the first error. Do not rerun the entire suite without a reason.
Runner detection
- Check the selected SDK with
rtk dotnet --version, the effectiveglobal.json, and test projects in scope. ConsiderDirectory.Build.props,Directory.Build.targets,Directory.Packages.props, and applicable imports. - Look for
test.runner: "Microsoft.Testing.Platform"inglobal.json, SDKs such asMSTest.Sdk, packagesMicrosoft.Testing.Platform/.MSBuild,TUnit, orxunit.v3, and propertiesIsTestingPlatformApplication,EnableMSTestRunner,EnableNUnitRunner,UseMicrosoftTestingPlatformRunner, andTestingPlatformDotnetTestSupport. Combine this evidence with effective versions and values; a package alone does not define the execution mode. - Include MTP projects even without
Microsoft.NET.Test.Sdk, a VSTest adapter, or explicitIsTestProject=true. The presence of those elements also does not exclude MTP. If imports or conditions leave doubt, query evaluated properties without running targets, preserving the target's configuration and framework:
rtk dotnet msbuild <test-project> -getProperty:IsTestProject,IsTestingPlatformApplication,TestingPlatformDotnetTestSupport,EnableMSTestRunner,EnableNUnitRunner,UseMicrosoftTestingPlatformRunner,TargetFrameworks- Record the runner and route per project: VSTest, native MTP through
dotnet test, MTP through legacy integration, or an MTP executable. In mixed solutions, run per project with compatible arguments. Preserve the existing configuration; validating tests does not require migrating the runner.
Rules
- Always prefix shell commands with
rtk, as required by the global instructions. - Do not run the full suite when a specific project or filter meets the goal.
- Do not combine build and test so that the test recompiles the same code unnecessarily.
- Do not silence
build,test,publish, orrunwithOut-Null. - Do not treat reduced output as reduced compile, restore, test, or publish time.
Completion criteria
- The executed scope corresponds to the changed behavior.
- The runner was identified and expected tests were executed. Zero tests, build-only, or listing-only do not prove validation; investigate discovery, filter, and execution mode before concluding.
- Restore, build, and tests were not repeated unnecessarily.
- Standard output is concise, while errors and exit codes remain observable.
- Publish or run were executed only when necessary.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

