csharp-testing-standards

csharp-testing-standards is a skill for Claude Code from linuxchata/ai-playbook. It costs 53 tokens per session (2,211 once invoked), scanned A, original, MIT.

A shared set of rules for writing C# unit and integration tests, including naming, structure, mocking, assertions, and parameterized cases.

In plain words
What is it for?
It guides tests built with NUnit 3, Moq, and coverlet, including test setup, cleanup, mocks, assertions, and test cases.
Why use it?
It keeps tests consistent across projects and avoids repeated decisions about frameworks, layout, and testing style.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit It guides tests built with NUnit 3, Moq, and coverlet, including test setup, cleanup, mocks, assertions, and test cases.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/linuxchata/ai-playbook/csharp-testing-standards
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 linuxchata/ai-playbook --skill csharp-testing-standards
Clone the repo
git clone --depth 1 https://github.com/linuxchata/ai-playbook

Made for: Claude Code.

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-testing-standards

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/linuxchata/ai-playbook/csharp-testing-standards"><img src="https://agentmods.dev/badge/skills/linuxchata/ai-playbook/csharp-testing-standards.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,211 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.00053 $0.02211
Opus 5.5 $0.00021 $0.00884
Sonnet 5.5 $0.00011 $0.00442
Haiku 4.5 $0.00005 $0.00221

Measured 1mo ago against content hash 735b4e5fad4c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

csharp-testing-standards 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 1mo 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.

.claude/skills/csharp-testing-standards/SKILL.md · 319 lines

How it starts

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

C# Testing Standards

Description

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.


1. Framework & Tooling

  • Test framework: NUnit 3
  • Mocking: Moq
  • Coverage: coverlet.collector
  • Test runner: Microsoft.NET.Test.Sdk + NUnit3TestAdapter

Core NUnit attributes in use:

Attribute Purpose
[TestFixture] Marks the test class
[Test] Marks a single test method
[SetUp] Runs before each test
[TearDown] Runs after each test
[OneTimeSetUp] Runs once before all tests in the fixture
[TestCase] Parameterized test inline values

2. Test Class Structure

2.1 Visibility

Test classes are internal. They do not need to be public – NUnit discovers them via the test runner regardless.

[TestFixture]
internal class OrderServiceTests { }

2.2 System Under Test Field

Name the field under test _sut (system under test) and initialize it in [SetUp]:

private OrderService _sut = null!;

2.3 Mock Fields

Declare all mocks as class-level fields initialized in [SetUp]:

private Mock<IOrderRepository> _orderRepositoryMock = null!;
private Mock<ILogger<OrderService>> _loggerMock = null!;

2.4 SetUp Method

  • Initialize all mocks and the SUT in the [SetUp] method.
  • Configure happy-path default behaviors here so individual tests only override what they specifically need.
  • Keep [SetUp] focused – it should not contain assertions or complex logic.
[SetUp]
public void Setup()
{
    _orderRepositoryMock = new Mock<IOrderRepository>();
    _orderRepositoryMock
        .Setup(r => r.GetByIdAsync(It.IsAny<Guid>(), It.IsAny<CancellationToken>()))
        .ReturnsAsync((Order?)null);

    _sut = new OrderService(
        _orderRepositoryMock.Object,
        NullLogger<OrderService>.Instance);
}

Read the full file on GitHub · 319 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. 1mo ago First seen · 319 lines · 53 tokens per session scan A 735b4e5fad4c

Subscribe to this mod's changes

csharp-testing-standards is a skill published in the GitHub repository linuxchata/ai-playbook (7 stars, last pushed 5mo ago), licensed MIT. It adds 53 tokens to every session and 2,211 once invoked, about $0.0002 per session on Opus 5.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-08-31.

Related

Other skills, from other repositories

111-java-maven-dependencies

Use when you need to add or evaluate Maven dependencies that improve code quality or domain modeling — including nullness annotations (JSpecify), static analysis (Error Prone + NullAway), functional programming (VAVR), architecture testing (ArchUnit), or money and currency support (JavaMoney) — and want a…

jabrena/plinth · 133 tokens

130-java-testing-strategies

Use when you need to apply testing strategies for Java code — RIGHT-BICEP to guide test creation, A-TRIP for test quality characteristics, or CORRECT for verifying boundary conditions. This should trigger for requests such as Review Java code for testing strategies; Apply RIGHT-BICEP testing strategies in Java code…

jabrena/plinth · 96 tokens

131-java-testing-unit-testing

Use when you need to review, improve, or write Java unit tests — including migrating from JUnit 4 to JUnit 5, adopting AssertJ for fluent assertions, structuring tests with Given-When-Then, ensuring test independence, applying parameterized tests, mocking dependencies with Mockito, verifying boundary conditions…

jabrena/plinth · 160 tokens

421-frameworks-quarkus-testing-unit-tests

Use when you need to write fast unit tests for Quarkus applications — including pure tests with @ExtendWith(MockitoExtension.class), @QuarkusTest with @InjectMock for full CDI mock replacement, @InjectSpy for partial CDI bean mocking, REST Assured for resource-focused tests, @ParameterizedTest with @CsvSource /…

jabrena/plinth · 205 tokens

craft-pest

Testing Craft CMS 5 plugins and modules with Pest — test isolation, database safety, and the markhuot/craft-pest-core harness. ALWAYS load when writing, running, fixing, or reviewing tests for a Craft plugin or module, and whenever a suite touches a real Craft install. Covers why rollback is opt-in, tests/Pest.php +…

michtio/craftcms-claude-skills · 175 tokens

test-go

Write, review, and improve Go test code for this project. Use whenever generating, reviewing, or modifying Go tests - including when invoked by the Tester agent, the /test prompt, or any test-related request. Covers table-driven tests, subtests, t.Parallel(), test helpers with t.Helper(), error assertions via…

sergeyklay/.agents · 109 tokens