dotnet-testing-strategy — Claude Code skill: test strategy in .NET
Guides assistants in choosing between unit and integration tests for .NET projects. Sets directory structures and method naming patterns.
npx skills add wshaddix/dotnet-skills --skill dotnet-testing-strategy -a claude-codeWhat dotnet-testing-strategy does
The skill provides a decision tree to choose between unit and integration tests. Pure business logic belongs in fast unit tests. They run in under 10ms. When verifying database queries, it directs you toward real instances via Testcontainers instead of a mocked DbContext, which fails to validate actual SQL generation.
Test projects mirror production namespaces inside the tests/ folder with suffixes like *.UnitTests. The skill enforces Arrange-Act-Assert blocks alongside naming conventions such as Method_Scenario_ExpectedBehavior. Project scaffolding and code coverage remain outside its scope. Running dotnet-project-analysis beforehand is required to map out the solution.
What it helps with
- pick between unit, integration, and functional test types
- organize test projects to mirror production assemblies
- standardize test method names using clear conventions
- structure test bodies into distinct Arrange, Act, and Assert steps
Example prompts for the agent
- Follow the decision tree to pick the right test type for
OrderService.cs. - Suggest the project layout and class name for testing
MyApp.Infrastructure. - Refactor this test to follow the Arrange-Act-Assert convention.
How to install dotnet-testing-strategy
1Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill dotnet-testing-strategy -a claude-code2Manually: put the files in place
~/.claude/skills/dotnet-testing-strategy/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/dotnet-testing-strategy/
1Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill dotnet-testing-strategy -a codex2Manually: put the files in place
.agents/skills/dotnet-testing-strategy/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill dotnet-testing-strategy -a cursor2Manually: put the files in place
.cursor/skills/dotnet-testing-strategy/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install wshaddix/dotnet-skills dotnet-testing-strategy2Manually: put the files in place
.github/skills/dotnet-testing-strategy/SKILL.md1Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill dotnet-testing-strategy -a gemini-cli2Platform CLI
gemini skills install https://github.com/wshaddix/dotnet-skills --path skills/dotnet-testing-strategyManually: put the files in place
.devin/skills/dotnet-testing-strategy/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add wshaddix/dotnet-skills --skill dotnet-testing-strategy -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about dotnet-testing-strategy
How to install dotnet-testing-strategy in Claude Code?
Run npx skills add wshaddix/dotnet-skills --skill dotnet-testing-strategy -a claude-code. The files will be placed in ~/.claude/skills/dotnet-testing-strategy/.
What does dotnet-testing-strategy do?
It provides decision criteria for categorizing .NET tests, structuring solution folders, and formatting test method names.
Does this skill generate xUnit project files?
It does not handle project scaffolding or package installations. Project setup and coverage tooling are handled by companion skills such as dotnet-add-testing and dotnet-test-quality.