Covers xUnit v3 testing patterns with migration notes for projects still on v2. You'll use this when writing Fact and Theory tests, setting up class and collection fixtures, or dealing with async lifecycle hooks that now return ValueTask instead of Task. The skill draws clear lines between v3's strongly typed TheoryDataRow and v2's object arrays, which matters during upgrades. It assumes your test project is already scaffolded and stays focused on xUnit mechanics rather than broader testing strategy. Good reference for parallelism configuration and the removal of assertion message parameters in v3.

skills.sh installs
619
GitHub stars
90
last updated
Aug 21, 2026

Install

$ npx -y skills add wshaddix/dotnet-skills --skill dotnet-xunit --agent claude-code

Installs into .claude/skills of the current project.

Files

dotnet-xunit

xUnit v3 testing framework features for .NET. Covers [Fact] and [Theory] attributes, test fixtures (IClassFixture, ICollectionFixture), parallel execution configuration, IAsyncLifetime for async setup/teardown, custom assertions, and xUnit analyzers. Includes v2 compatibility notes where behavior differs.

Version assumptions: xUnit v3 primary (.NET 8.0+ baseline). Where v3 behavior differs from v2, compatibility notes are provided inline. xUnit v2 remains widely used; many projects will encounter both versions during migration.

Out of scope: Test project scaffolding (creating xUnit projects, package references, Directory.Build.props) is owned by [skill:dotnet-add-testing]. Testing strategy and test type decisions are covered by [skill:dotnet-testing-strategy]. Integration testing patterns (WebApplicationFactory, Testcontainers) are covered by [skill:dotnet-integration-testing].

Prerequisites: Test project already scaffolded via [skill:dotnet-add-testing] with xUnit packages referenced. Run [skill:dotnet-version-detection] to confirm .NET 8.0+ baseline for xUnit v3 support.

Sponsors

Details

Repository
github.com/wshaddix/dotnet-skills
Categories
Documentation, .NET & C#
First seen
Jun 3, 2026

More from wshaddix/dotnet-skills

All 13
1alirezarezvani avatarexperiment-designeralirezarezvani/claude-skillsUse when planning product experiments, writing testable hypotheses, estimating sample size, prioritizing tests, or interpreting A/B outcomes with practical stat617skills.sh installs
2mohitmishra786 avatarrust-ffimohitmishra786/low-level-dev-skillsRust FFI skill for C interoperability. Use when calling C libraries from Rust, generating Rust bindings with bindgen, exporting Rust functions to C with cbindge613skills.sh installs
3langgenius avatarvercel-react-best-practiceslanggenius/difyReact and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js c612skills.sh installs
4mohitmishra786 avatarrust-unsafemohitmishra786/low-level-dev-skillsRust unsafe code skill for systems programming. Use when writing or reviewing unsafe Rust, understanding what operations require unsafe, implementing safe abstr611skills.sh installs
5yangsonhung avatarnovel-writeryangsonhung/awesome-agent-skillsUse when writing, continuing, revising, or planning novels, characters, and fictional worlds.610skills.sh installs
6spatie avatarlivewire-developmentspatie/freek.devDevelops reactive Livewire 4 components. Activates when creating, updating, or modifying Livewire components; working with wire:model, wire:click, wire:loading,608skills.sh installs