Skip to content
Skill

Csharp testing

Guides writing and reviewing xUnit tests, mocks and integration tests for .NET

Csharp testing is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
66
Last commit
License
MIT
Listing updated

Similar skills

About Csharp testing

This skill gives an agent a reference of testing patterns for C# and .NET projects built on xUnit, with FluentAssertions for readable assertions and NSubstitute or Moq for mocking dependencies. It covers arrange-act-assert unit tests, parameterized Theory tests with InlineData and MemberData, and NSubstitute stubbing and call verification.

For ASP.NET Core, it shows WebApplicationFactory setups that swap in an in-memory database, and Testcontainers-based tests that run against a real PostgreSQL container. It also suggests a test project layout split into unit, integration and helper projects, along with a test data builder pattern and a table of common anti-patterns to avoid.

The skill is written around the dotnet CLI, so the agent uses commands such as dotnet test with coverage collection and name filters. No scripts are bundled; the guidance is delivered as instructions and code samples.

When your agent uses it

C# and .NET testing patterns with xUnit, FluentAssertions, mocking, integration tests, and test organization best practices. Use when writing or reviewing xUnit tests, mocks, or integration tests in a C# / .NET project.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 2 files (9 KB) on GitHub on 1 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the rea-skills plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add smartworldarafath/REA_Skill
/plugin install rea-skills@smartworldarafath

Or copy only this skill to ~/.claude/skills/csharp-testing:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/csharp-testing &&
cp -R "$tmp/.agents/skills/csharp-testing" ~/.claude/skills/csharp-testing &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/csharp-testing inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/csharp-testing to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/csharp-testing &&
cp -R "$tmp/.agents/skills/csharp-testing" ~/.agents/skills/csharp-testing &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/csharp-testing inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/csharp-testing to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/csharp-testing &&
cp -R "$tmp/.agents/skills/csharp-testing" ~/.cursor/skills/csharp-testing &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/csharp-testing inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/smartworldarafath/REA_Skill.git --path .agents/skills/csharp-testing

Or copy the folder to ~/.gemini/skills/csharp-testing yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/csharp-testing:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/csharp-testing &&
cp -R "$tmp/.agents/skills/csharp-testing" ~/.copilot/skills/csharp-testing &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/csharp-testing inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/smartworldarafath/REA_Skill.git

Then copy REA_Skill/.agents/skills/csharp-testing into your agent's skills folder as csharp-testing. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Unit test structure
Arrange-act-assert layout with xUnit Fact tests and FluentAssertions checks.
Parameterized theories
Patterns for InlineData and MemberData driven tests across many input cases.
NSubstitute mocking
Stubbing repository calls and verifying that dependencies received expected arguments.
ASP.NET Core integration tests
WebApplicationFactory setup with an in-memory database replacing the real one.
Testcontainers databases
Running repository tests against a disposable PostgreSQL container with lifecycle hooks.
Test project organization
Suggested folder layout separating unit, integration and helper projects.
Anti-pattern checklist
Common testing mistakes paired with recommended fixes for review work.

Good for

  • Write xUnit tests for a C# service class
  • Review existing .NET tests for flaky or implementation-coupled patterns
  • Add parameterized tests for a validator with many input cases
  • Set up an ASP.NET Core API integration test with WebApplicationFactory
  • Mock repository dependencies with NSubstitute in unit tests

Csharp testing FAQ

What test libraries does Csharp testing assume?

It assumes xUnit for tests, FluentAssertions for assertions, NSubstitute or Moq for mocking, Testcontainers for real infrastructure, WebApplicationFactory for ASP.NET Core and Bogus for test data.

When does the skill apply?

It applies when writing or reviewing xUnit tests, mocks or integration tests in a C# or .NET project, as described in its trigger text.

Does Csharp testing run scripts or change files?

No scripts are included. It provides patterns, code samples and dotnet CLI commands for the agent to use.

How do I install Csharp testing in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/csharp-testing to use it in all your projects, or to .claude/skills/csharp-testing in one project. Or install the rea-skills plugin, which includes it: /plugin marketplace add smartworldarafath/REA_Skill, then /plugin install rea-skills@smartworldarafath.

Does Csharp testing run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Csharp testing?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Csharp testing?

The closest alternatives to Csharp testing are Csharp xunit, Csharp nunit, Xunit skill, Csharp tunit and Nunit skill.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from smartworldarafath/REA_Skill

  1. Guides building and auditing UI to WCAG 2.2 AA across web, iOS and Android

    • Open source
    • 66 GitHub stars
    • Developer tools
  2. Diagnoses agent and LLM stacks for hidden failures and ranks the fixes by severity

    • Open source
    • 66 GitHub stars
    • Developer tools
  3. Compare coding agents head-to-head on your own tasks by pass rate, cost and time

    • Open source
    • 66 GitHub stars
    • Developer tools
  4. Guides an agent to design tool sets, observations and error recovery for better completion

    • Open source
    • 66 GitHub stars
    • Developer tools
  5. Lets an AI agent make x402 payments within per-task budgets and spending policies

    • Open source
    • 66 GitHub stars
    • Finance and payments