csharp-nunit

csharp-nunit is a skill for Claude Code, Codex from OKHP3/skillz. It costs 17 tokens per session (643 once invoked), scanned A, a copy of csharp-nunit, MIT.

A guide to writing unit tests with NUnit, a testing framework for .NET applications, including tests that run against multiple sets of data.

In plain words
What is it for?
Use it when setting up NUnit tests, organizing test fixtures, managing setup and cleanup, writing assertions, or creating data-driven tests.
Why use it?
It helps keep tests focused, repeatable, and easier to understand when checking individual parts of a C# or .NET program.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when setting up NUnit tests, organizing test fixtures, managing setup and cleanup, writing assertions, or creating data-driven tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/okhp3/skillz/csharp-nunit
View source ↗ OKHP3/skillz
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 OKHP3/skillz --skill csharp-nunit
Clone the repo
git clone --depth 1 https://github.com/OKHP3/skillz

Made for: Claude Code, Codex.

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 csharp-nunit

README.md
[![agentmods](https://agentmods.dev/badge/skills/okhp3/skillz/csharp-nunit/github.svg)](https://agentmods.dev/skills/okhp3/skillz/csharp-nunit)
Your own site
<a href="https://agentmods.dev/skills/okhp3/skillz/csharp-nunit"><img src="https://agentmods.dev/badge/skills/okhp3/skillz/csharp-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 csharp-nunit

Your own site · 80×15
<a href="https://agentmods.dev/skills/okhp3/skillz/csharp-nunit"><img src="https://agentmods.dev/badge/skills/okhp3/skillz/csharp-nunit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 643 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 100% copy Near-identical to another mod 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.00017 $0.00643
Opus 5 $0.00009 $0.00321
Sonnet 5 $0.00003 $0.00129
Haiku 4.5 $0.00002 $0.00064

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

Security

Grade A, and why

csharp-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 6d 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.

Origin

This is a copy

100% identical to csharp-nunit — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

community/csharp-nunit/SKILL.md · 72 lines

How it starts

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

NUnit Best Practices

Your goal is to help me write effective unit tests with NUnit, covering both standard and data-driven testing approaches.

Project Setup

  • Use a separate test project with naming convention [ProjectName].Tests
  • Reference Microsoft.NET.Test.Sdk, NUnit, and NUnit3TestAdapter packages
  • Create test classes that match the classes being tested (e.g., CalculatorTests for Calculator)
  • Use .NET SDK test commands: dotnet test for running tests

Test Structure

  • Apply [TestFixture] attribute to test classes
  • Use [Test] attribute for test methods
  • Follow the Arrange-Act-Assert (AAA) pattern
  • Name tests using the pattern MethodName_Scenario_ExpectedBehavior
  • Use [SetUp] and [TearDown] for per-test setup and teardown
  • Use [OneTimeSetUp] and [OneTimeTearDown] for per-class setup and teardown
  • Use [SetUpFixture] for assembly-level setup and teardown

Standard Tests

  • Keep tests focused on a single behavior
  • Avoid testing multiple behaviors in one test method
  • Use clear assertions that express intent
  • Include only the assertions needed to verify the test case
  • Make tests independent and idempotent (can run in any order)
  • Avoid test interdependencies

Data-Driven Tests

  • Use [TestCase] for inline test data
  • Use [TestCaseSource] for programmatically generated test data
  • Use [Values] for simple parameter combinations
  • Use [ValueSource] for property or method-based data sources
  • Use [Random] for random numeric test values
  • Use [Range] for sequential numeric test values
  • Use [Combinatorial] or [Pairwise] for combining multiple parameters

Assertions

  • Use Assert.That with constraint model (preferred NUnit style)
  • Use constraints like Is.EqualTo, Is.SameAs, Contains.Item
  • Use Assert.AreEqual for simple value equality (classic style)
  • Use CollectionAssert for collection comparisons
  • Use StringAssert for string-specific assertions
  • Use Assert.Throws<T> or Assert.ThrowsAsync<T> to test exceptions
  • Use descriptive messages in assertions for clarity on failure

Read the full file on GitHub · 72 lines

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. 6d ago First seen · 72 lines · 17 tokens per session scan A f03540e3fc32

Subscribe to this mod's changes

csharp-nunit is a skill published in the GitHub repository OKHP3/skillz (3 stars, last pushed yesterday), licensed MIT. It adds 17 tokens to every session and 643 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to csharp-nunit, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

xunit-nunit

When the user wants to design, implement, debug, or optimize unit / integration tests in .NET using xUnit, NUnit, or MSTest. Use when the user mentions "xUnit," "NUnit," "MSTest," "[Fact]," "[Theory]," "InlineData," "[Test]," "[TestCase]," "[TestFixture]," "Moq," "NSubstitute," "FluentAssertions," "Shouldly,"…

aks-builds/quality-skills · 142 tokens

csharp-testing-standards

Defines the testing standards, patterns, and conventions for all C# unit and integration test projects. Rules cover test framework usage, naming, structure, mocking, assertions, and parameterization. Apply these rules uniformly across all test projects.

linuxchata/ai-playbook · 53 tokens

author-test

Generate a test given sample. Parameters: C# SDK repository root; Package name: one of Azure.AI.Projects, Azure.AI.Projects.Agents or Azure.AI.Extensions.OpenAI; the sample to use as a starting point for the test.

Azure/azure-sdk-for-net · 68 tokens

migrate-mstest-v3-to-v4

Use this skill before answering, planning, or editing any MSTest 3.x-to-4.x upgrade or post-upgrade failure. Triggers include "MSTest v4 breaking changes"; CS0507/CS0103/CS1061/CS1615; ExecuteAsync, CallerInfo, DisplayName, or custom TestMethodAttribute; ClassCleanupBehavior; ContainsKey; ThrowsExactly or…

dotnet/skills · 179 tokens

migrate-mstest-v1v2-to-v3

Use this skill before answering or editing whenever an MSTest v1/v2 project is being upgraded or repaired for v3. Triggers include QualityTools assembly references; MSTest.TestFramework/TestAdapter 1.x-2.x; "upgrade to MSTest v3"; comparing v1 and v2 migration paths; choosing MSTest or MSTest.Sdk; CS0411/CS1503 after…

dotnet/skills · 193 tokens

migrate-xunit-to-mstest

Convert .NET tests from xUnit.net v2/v3 to MSTest v4 while preserving VSTest or MTP. Use for replacing xunit packages, Fact/Theory/InlineData/MemberData, assertions, IClassFixture/ICollectionFixture, ITestOutputHelper, TestContext cancellation, traits/Owner, skips, timeouts, and xUnit parallelization. Also use when a…

dotnet/skills · 141 tokens