xunit-nunit

xunit-nunit is a skill for Claude Code from aks-builds/quality-skills. It costs 142 tokens per session (3,122 once invoked), scanned A, original, MIT.

A testing guide for .NET projects using xUnit, NUnit, or MSTest, which are tools for writing automated checks. It also covers common assertion and mocking libraries such as FluentAssertions and Moq.

In plain words
What is it for?
Use it to design, write, debug, and improve unit or integration tests, including parameterized tests, assertions, and mocked dependencies.
Why use it?
It helps developers choose and use .NET testing tools without guessing framework attributes, method names, or package details.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the quality-skills plugin — 57 skills shipped together

Good fit Use it to design, write, debug, and improve unit or integration tests, including parameterized tests, assertions, and mocked dependencies.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aks-builds/quality-skills/xunit-nunit
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add aks-builds/quality-skills --skill xunit-nunit
Clone the repo
git clone --depth 1 https://github.com/aks-builds/quality-skills

Made for: Claude Code.

Or install quality-skills, the plugin that ships this one along with the rest of its 57 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for xunit-nunit

README.md
[![agentmods](https://agentmods.dev/badge/skills/aks-builds/quality-skills/xunit-nunit/github.svg)](https://agentmods.dev/skills/aks-builds/quality-skills/xunit-nunit)
Your own site
<a href="https://agentmods.dev/skills/aks-builds/quality-skills/xunit-nunit"><img src="https://agentmods.dev/badge/skills/aks-builds/quality-skills/xunit-nunit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for xunit-nunit

Your own site · 80×15
<a href="https://agentmods.dev/skills/aks-builds/quality-skills/xunit-nunit"><img src="https://agentmods.dev/badge/skills/aks-builds/quality-skills/xunit-nunit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 142 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,122 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00142 $0.03122
Opus 5 $0.00071 $0.01561
Sonnet 5 $0.00028 $0.00624
Haiku 4.5 $0.00014 $0.00312

Measured 5d ago against content hash c41038079c77, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

xunit-nunit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/xunit-nunit/SKILL.md · 331 lines

How it starts

The opening of the file, as written. The whole thing — 331 lines — stays where its author put it; the contents beside it link to each section on GitHub.

xUnit, NUnit, and MSTest

You are an expert in the three major .NET test frameworks — xUnit, NUnit, and MSTest — plus the assertion (FluentAssertions, Shouldly) and mocking (Moq, NSubstitute, FakeItEasy) ecosystems. Your goal is to help engineers write maintainable .NET tests, parametrize cleanly, mock effectively, and pick between frameworks when starting fresh. Don't fabricate attribute names, framework method signatures, or NuGet package IDs. When uncertain, point the reader to the official docs (xunit.net, docs.nunit.org, or Microsoft's testing docs).

Initial Assessment

Check .agents/qa-context.md (fallback: .claude/qa-context.md) before answering. Pay attention to:

  • Which framework? — xUnit is the modern .NET default and what most newer Microsoft docs use. NUnit is also widely adopted with rich attribute model. MSTest is built-in but less feature-rich; most teams prefer xUnit or NUnit.
  • .NET version — .NET 6 / 7 / 8 / 9. Test SDKs need to be aligned with the target framework.
  • Assertion style — built-in (Assert.Equal), FluentAssertions (fluent, recommended), or Shouldly.
  • Mocking libraryMoq (most common), NSubstitute (clean syntax), FakeItEasy. Avoid mixing.
  • Web / API testingMicrosoft.AspNetCore.Mvc.Testing (WebApplicationFactory) is the in-process integration test infrastructure.

If the file does not exist, ask: framework, .NET version, assertion library, mocking library, and whether ASP.NET integration tests are in scope.


Why one over the other

Pick xUnit when… Pick NUnit when… Pick MSTest when…
Greenfield .NET project Rich attribute features ([TestCase], [Values], combinatorial) Strict Microsoft-tooling constraint
Microsoft templates / docs alignment Migrating from Java JUnit-style patterns Existing MSTest investment
Constructor / IClassFixture model preferred [SetUp] / [OneTimeSetUp] lifecycle preferred (otherwise rarely the new default)

Read the full file on GitHub · 331 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 331 lines · 142 tokens per session scan A c41038079c77

Subscribe to this mod's changes

xunit-nunit is a skill published in the GitHub repository aks-builds/quality-skills (2 stars, last pushed today), licensed MIT. It adds 142 tokens to every session and 3,122 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.