Youssef Victor c4937f8f68 Add 'run_command_and_assert' assertion (#401)
* Add 'run_command_and_assert' assertion

* Rename for clarity

* Add tests

* Fix race condition in command output handling

* Fix async output race condition in RunCommandAndAssert

WaitForExit(TimeSpan) does not guarantee that async output event
handlers have completed. Add parameterless WaitForExit() call after
the timed wait to ensure stdout/stderr are fully captured before
checking their contents. Also handle the timeout case explicitly
by killing the process.

* Address PR review: extract CommandAssertionArgs, add regex matching, configurable timeout

- Extract command-specific fields from Assertion into a dedicated
  CommandAssertionArgs record type for cleaner separation of concerns
- Add ExpectedStdOutMatches/ExpectedStdErrorMatches for regex-based
  stdout/stderr assertions (matches type asserts)
- Make command timeout configurable via assertion-level 'command_timeout'
  field, falling back to the scenario timeout when not specified
- Show actual timeout value in timeout error messages
- Update EvalSchema parsing, EvaluateCommand call sites, and all tests
- Add new tests for regex matching and timeout configuration

---------

Co-authored-by: Jan Krivanek <jankrivanek@microsoft.com>
2026-03-20 21:48:52 +00:00
2026-03-18 10:45:36 +01:00

.NET Agent Skills

Dashboard

This repository contains the .NET team's curated set of core skills and custom agents for coding agents. For information about the Agent Skills standard, see agentskills.io.

What's Included

Plugin Description
dotnet Collection of core .NET skills for handling common .NET coding tasks.
dotnet-data Skills for .NET data access and Entity Framework related tasks.
dotnet-diag Skills for .NET performance investigations, debugging, and incident analysis.
dotnet-msbuild Comprehensive MSBuild and .NET build skills: failure diagnosis, performance optimization, code quality, and modernization.
dotnet-nuget NuGet and .NET package management: dependency management and modernization.
dotnet-upgrade Skills for migrating and upgrading .NET projects across framework versions, language features, and compatibility targets.
dotnet-maui Skills for .NET MAUI development: environment setup, diagnostics, and troubleshooting.
dotnet-ai AI and ML skills for .NET: technology selection, LLM integration, agentic workflows, RAG pipelines, MCP, and classic ML with ML.NET.
dotnet-template-engine .NET Template Engine skills: template discovery, project scaffolding, and template authoring.
dotnet-test Skills for running, diagnosing, and migrating .NET tests: test execution, filtering, platform detection, and MSTest workflows.

Installation

🚀 Plugins - Copilot CLI / Claude Code

  1. Launch Copilot CLI or Claude Code
  2. Add the marketplace:
    /plugin marketplace add dotnet/skills
    
  3. Install a plugin:
    /plugin install <plugin>@dotnet-agent-skills
    
  4. Restart to load the new plugins
  5. View available skills:
    /skills
    
  6. View available agents:
    /agents
    
  7. Update plugin (on demand):
    /plugin update <plugin>@dotnet-agent-skills
    

VS Code / VS Code Insiders (Preview)

Important

VS Code plugin support is a preview feature and subject to change. You may need to enable it first.

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

Once configured, type /plugins in Copilot Chat or use the @agentPlugins filter in Extensions to browse and install plugins from the marketplace.

Codex CLI

Skills in this repository follow the agentskills.io open standard and are compatible with OpenAI Codex.

Install individual skills using the skill-installer CLI with the GitHub URL:

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

⚡ Agentic Workflows

Some plugins include GitHub Agentic Workflow templates for CI/CD automation:

  1. Install the gh aw CLI extension
  2. Copy the desired workflow .md files and the shared/ directory to your repository's .github/workflows/
  3. Compile and commit:
    gh aw compile
    
  4. Commit both the .md and generated .lock.yml files

Contributing

See CONTRIBUTING.md for contribution guidelines and how to add a new plugin.

License

See LICENSE for details.

S
Description
run-tests: ALWAYS USE before running .NET tests or answering with a test command or flags. Trigger on "run the tests", "exact dotnet test command", one…; optimizing-ef-core-queries: Optimize and improve the performance of slow Entity Framework Core (EF Core) queries: make them generate less SQL, make fewer database round-trips, and return…; analyzing-dotnet-performance: Scans .NET code for ~50 performance anti-patterns across async, memory, strings, collections, LINQ, regex, serialization, and…
Readme 254 MiB
Languages
C# 90.3%
JavaScript 3.6%
PowerShell 2.8%
Python 2.2%
Shell 0.4%
Other 0.6%