---
/plugin marketplace add NikiforovAll/claude-code-rules/plugin install handbook-dotnet@cc-handbookThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/blame-mode.mdreferences/parallel-execution.mdRun .NET tests selectively using a build-first, test-targeted workflow optimized for development speed.
Follow this workflow to run tests efficiently:
Build the entire solution with minimal output to catch compile errors early:
dotnet build -p:WarningLevel=0 /clp:ErrorsOnly --verbosity minimal
Run tests for the specific test project with --no-build to skip redundant compilation:
dotnet test path/to/project --no-build --verbosity minimal
Narrow down to specific tests using filter expressions:
# By method name (contains)
dotnet test --no-build --filter "Name~MyTestMethod"
# By class name (exact match)
dotnet test --no-build --filter "ClassName=MyNamespace.MyTestClass"
# Combined filters
dotnet test --no-build --filter "Name~Create|Name~Update"
| Command | Purpose |
|---|---|
dotnet build -p:WarningLevel=0 /clp:ErrorsOnly --verbosity minimal | Build solution with minimal output |
dotnet test path/to/Tests.csproj --no-build | Run project tests (skip build) |
dotnet test --no-build --logger "console;verbosity=detailed" | Show ITestOutputHelper output |
dotnet test --no-build --filter "..." | Run filtered tests |
dotnet test --no-build --list-tests | List available tests without running |
| Operator | Meaning | Example |
|---|---|---|
= | Exact match | ClassName=MyTests |
!= | Not equal | Name!=SkipThis |
~ | Contains | Name~Create |
!~ | Does not contain | Name!~Integration |
| | OR | Name~Test1|Name~Test2 (note '|' is an escape for markdown) |
& | AND | Name~User&Category=Unit |
| Property | Description | Example |
|---|---|---|
FullyQualifiedName | Full test name with namespace | FullyQualifiedName~MyNamespace.MyClass |
DisplayName | Test display name | DisplayName=My_Test_Name |
Name | Method name | Name~ShouldCreate |
Category | Trait category | Category=Unit |
# Run tests containing "Create" in method name
dotnet test --no-build --filter "Name~Create"
# Run tests in a specific class
dotnet test --no-build --filter "ClassName=MyNamespace.UserServiceTests"
# Run tests matching namespace pattern
dotnet test --no-build --filter "FullyQualifiedName~MyApp.Tests.Unit"
# Run tests with specific trait
dotnet test --no-build --filter "Category=Integration"
# Exclude slow tests
dotnet test --no-build --filter "Category!=Slow"
# Combined: class AND method pattern
dotnet test --no-build --filter "ClassName=OrderTests&Name~Validate"
To see output from xUnit's ITestOutputHelper, use the console logger with detailed verbosity:
dotnet test --no-build --logger "console;verbosity=detailed"
Verbosity levels for dotnet test:
| Level | Flag | Description |
|---|---|---|
| quiet | -v q | Minimal output (pass/fail only) |
| minimal | -v m | Clean summary, no test output |
| normal | -v n | Default, shows discovered tests |
| detailed | -v d | Shows more details |
| diagnostic | -v diag | Most verbose |
To see test output, use grep to filter out discovery messages (for xUnit):
dotnet test --no-build --logger "console;verbosity=detailed" 2>&1 | grep -v "Discovered \[execution\]"
This skill focuses on xUnit. For MSTest or NUnit, filter property names differ:
| Property | xUnit | MSTest | NUnit |
|---|---|---|---|
| Method name | Name | Name | Name |
| Class name | ClassName | ClassName | ClassName |
| Category/Trait | Category | TestCategory | Category |
| Priority | - | Priority | Priority |
For advanced debugging scenarios, load additional references:
--blameLoad these references when:
Invoke when the user needs to:
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.