Agent skill

Dotnet Testing

by macalbert in macalbert/envilder

Mandatory testing conventions for .NET (xUnit, AwesomeAssertions).

MITAuto-check passedTesting & QA

Install Dotnet Testing

skills CLI
$ npx skills add macalbert/envilder --skill dotnet-testing -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install macalbert/envilder dotnet-testing --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/macalbert/envilder.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/dotnet-testing .claude/skills/dotnet-testing && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
dotnet-testing
GitHub stars
138
Token cost
~1.6k tokens
SKILL.md length
460 words
Files
1
Skills in repo
30
Repo updated
First seen
Licence
MIT

At a glance

Mandatory testing conventions for .NET (xUnit, AwesomeAssertions).

  • Works in 3 steps: AAA Pattern (Arrange – Act – Assert) → Test Naming Convention → Variable Naming (MANDATORY)
  • Acceptance tests with xUnit
  • SKILL.md covers Documentation Rules, Libraries, Core Principles and Test Class Structure, plus 4 more sections
  • Calls dotnet

What it does

Dotnet Testing is an agent skill from macalbert/envilder. Mandatory testing conventions for .NET (xUnit, AwesomeAssertions). Use for unit, integration, or acceptance tests with xUnit, Testcontainers, or Playwright.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Unit testing, Integration testing and End-to-end testing. It works with .NET and Playwright. The repository describes itself as: One secret mapping for local dev, CI/CD, and runtime. Envilder resolves cloud secrets from your own vaults without SaaS middlemen, duplicated config, or .env drift. The licence is MIT.

When your agent uses it

  • Acceptance tests with xUnit
  • Tasks that involve Unit testing
  • Tasks that involve Integration testing

Example prompts

  • “/dotnet-testing”

Requirements

  • Docker

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. AAA Pattern (Arrange – Act – Assert)
  2. Test Naming Convention
  3. Variable Naming (MANDATORY)

What it can do on your machine

Read from SKILL.md and the folder at commit b6a0327. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • dotnet

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Dotnet Testing loads about 1.6k tokens when it runs. Until then it costs about 43 tokens; SKILL.md has 460 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~43
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from macalbert/envilder at commit b6a0327, republished under its MIT licence (© macalbert). 460 words, ~1,570 tokens.

Download SKILL.mdSave it as .claude/skills/dotnet-testing/SKILL.md (or your agent's skills folder).
name
dotnet-testing
description
Mandatory testing conventions for .NET (xUnit, AwesomeAssertions). Use for unit, integration, or acceptance tests with xUnit, Testcontainers, or Playwright.

Testing Conventions (.NET)

This skill defines the MANDATORY testing conventions for .NET projects. These are rules, not guidelines.


Documentation Rules

NO Comments Except AAA Markers
  • NEVER write XML summaries on test methods or test classes
  • NEVER write explanatory comments: code must be self-explanatory
  • Only // Arrange, // Act, // Assert comments are allowed in tests
  • The test name Should_X_When_Y already documents the intent

Libraries

CategoryLibraryPurpose
FrameworkxUnitTest framework
AssertionsAwesomeAssertionsFluent assertion syntax
SnapshotsVerify.XunitSnapshot / approval testing
MockingNSubstituteSpies, stubs, and mocks
Mocking (HTTP)WireMock.NetHTTP service mocking
Test data (fake)BogusRealistic fake data (Mother pattern)
Test data (dummy)AutoFixtureAutomatic dummy object generation
ContainersTestcontainersDocker containers in tests

Core Principles

1. AAA Pattern (Arrange – Act – Assert)

ALL tests MUST follow the AAA pattern, separated by inline comments.

Rules
  • Each phase MUST be separated with comments
  • Never mix phases
  • Each comment (// Arrange, // Act, // Assert) appears AT MOST ONCE per test: if you need two actions or two asserts, write two tests
  • Act = one single invocation on the SUT. Multiple statements in Act only if they are genuinely part of the same logical action (rare and exceptional). Two independent operations = two tests.
  • All assertions belong in Assert only. No .Should() in Arrange or Act. If you need a precondition check, extract it to a separate test or use a guard clause that throws: not an assertion.
  • AAA markers are mandatory in ALL tests: including structural guards, static completeness checks, and data validation tests. No exceptions.
  • No if, switch, or conditional logic inside Arrange, Act, or Assert
  • No try/catch/finally inside tests: use IAsyncLifetime or IDisposable for teardown
  • No // Act & Assert combined blocks: Act and Assert are ALWAYS separate
  • For exceptions: act.Should().ThrowAsync<T>() (AwesomeAssertions)
  • Omit comment if section is empty
  • If a test needs branching, split it into separate tests
Show full SKILL.md (160 more words)Show less
xUnit Example
csharp
[Fact(Timeout = CancellationTokenForTest.ShortTimeout)]
public async Task Should_CreateGroup_When_RequestIsValid()
{
    // Arrange
    var request = new CreateGroupRequest { Name = "Test Group" };
    var command = new CreateGroupCommand(request);

    // Act
    var actual = await _sut.Handle(command, CancellationToken.None);

    // Assert
    actual.Should().NotBeNull();
    actual.GroupId.Should().NotBeEmpty();
    _repository.Received(1).AddGroup(Arg.Any<Group>());
}

2. Test Naming Convention
text
Should_{ExpectedBehavior}_When_{Condition}
Rules
  • PascalCase for both parts
  • NO natural language
  • NO vague names (Should_Work, TestHandler)
  • NO missing When clause
  • Method names only: xUnit uses [Fact] or [Theory], not description strings

3. Variable Naming (MANDATORY)
PurposeName
Subject under test_sut (field) or sut (local)
Expected valueexpected
Actual resultactual

Test Class Structure

csharp
public class CreateGroupCommandHandlerTests
{
    private readonly Fixture _fixture;
    private readonly IEnvilderRepository _repository;
    private readonly CreateGroupCommandHandler _sut;

    public CreateGroupCommandHandlerTests()
    {
        _fixture = new();
        _repository = Substitute.For<IEnvilderRepository>();
        _sut = new(_repository);
    }
}

Exception Testing

Act and Assert MUST be separate.

✅ CORRECT
csharp
[Fact(Timeout = CancellationTokenForTest.ShortTimeout)]
public async Task Should_ThrowNotFound_When_GroupDoesNotExist()
{
    // Arrange
    _repository.GetByIdAsync(Arg.Any<Guid>(), Arg.Any<CancellationToken>())
        .Returns((Group?)null);

    // Act
    var act = () => _sut.Handle(query, CancellationToken.None);

    // Assert
    await act.Should().ThrowAsync<NotFoundException>();
}
❌ FORBIDDEN
csharp
// Act & Assert   ← NEVER
await Assert.ThrowsAsync<NotFoundException>(
    () => _sut.Handle(query, CancellationToken.None));

Teardown & Cleanup

Never use try/finally in tests. Use framework mechanisms:

ScenarioMechanism
Async setup/teardownIAsyncLifetime (InitializeAsync / DisposeAsync)
Sync cleanupIDisposable (Dispose)
Shared fixtureIAsyncLifetime on collection fixture
csharp
public class MyTests : IAsyncLifetime
{
    private (string Name, string? Value)[] _originalEnvValues = [];

    public Task InitializeAsync()
    {
        _originalEnvValues = EnvVarNames
            .Select(v => (Name: v, Value: Environment.GetEnvironmentVariable(v)))
            .ToArray();
        return Task.CompletedTask;
    }

    public Task DisposeAsync()
    {
        foreach (var (name, value) in _originalEnvValues)
        {
            Environment.SetEnvironmentVariable(name, value);
        }
        return Task.CompletedTask;
    }
}

Verification Commands

ContextCommand
Unit testsdotnet test tests/sdks/dotnet/ --filter "Category!=Acceptance"
Acceptance (Docker)dotnet test tests/sdks/dotnet/
Format checkdotnet format src/sdks/dotnet/Envilder.sln --verify-no-changes

Completion Criteria

  • Test names follow Should_<Expected>_When_<Condition>
  • AAA markers present (except structural guards), each at most once
  • _sut/actual/expected used consistently
  • All mock interactions verified with .Received()
  • No try/catch/finally or control flow in test bodies
  • Tests run green: dotnet test
  • No format regressions: dotnet format --verify-no-changes

© macalbert, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/dotnet-testing of macalbert/envilder.

Open the folder on GitHubat commit b6a0327

Compare with similar skills

Dotnet Testing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Dotnet Testing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dotnet Testing this skillmacalbert/envilder138—~1.6kAutomated safety check: PassMIT
Dotnet Testingnovotnyllc/dotnet-artisan233—~972Automated safety check: PassMIT
Supercheck Testing QAsupercheck-io/supercheck215—~942Automated safety check: PassAGPL-3.0
Testing Guidemobazha/mobazha-unified165—~1.7kAutomated safety check: PassMPL-2.0
Angular TestingKilo-Org/kilo-marketplace189—~2.9kAutomated safety check: PassMIT
E2E Testinglangflow-ai/langflow156k—~3.3kAutomated safety check: PassMIT

Similar skills

  • Dotnet Testing

    novotnyllc/dotnet-artisan

    Defines .NET test strategy and implementation patterns across xUnit v3 (Facts, Theories, fixtures, IAsyncLifetime), integration testing (WebApplicationFactory, Testcontainers), Aspire testing…

    233 GitHub stars~972 tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • Supercheck Testing QA

    supercheck-io/supercheck

    Test or validate Supercheck changes using package checks, Jest, Playwright UI/API E2E, recorder browser tests, contract tests, AI SRE acceptance, release evidence, and commit/merge readiness gates.

    215 GitHub stars~942 tokensUpdated today
    Testing & QAAuto-check passed
  • Testing Guide

    mobazha/mobazha-unified

    Guide for writing unit tests (Vitest), integration tests, and E2E tests (Playwright) following Mobazha project conventions.

    165 GitHub stars~1.7k tokensUpdated 4 days ago
    Testing & QAAuto-check passed
  • Angular Testing

    Kilo-Org/kilo-marketplace

    Write unit and integration tests for Angular v20+ applications using Vitest or Jasmine with TestBed and modern testing patterns.

    189 GitHub stars~2.9k tokensUpdated 9 days ago
    Testing & QAAuto-check passed
  • E2E Testing

    langflow-ai/langflow

    Write and review Playwright E2E tests for Langflow. An agent skill from langflow-ai/langflow.

    156k GitHub stars~3.3k tokensUpdated today
    Testing & QAAuto-check passed
  • Aspire Integration Testing

    DevBetterCom/DevBetterWeb

    Write integration tests using .NET Aspire's testing facilities with xUnit.

    157 GitHub starsUsed in 2 repos~2.3k tokens
    Testing & QAAuto-check passed

More from macalbert/envilder

All 30 skills in this repo
  • Code Review Perspectives

    macalbert/envilder

    Five independent analysis perspectives for code review: correctness, architecture, security, conventions, and complexity.

    138 GitHub stars~1k tokensUpdated 2 days ago
    Auto-check passed
  • Index of Architecture Decision Records (ADRs) for cross-cutting technical decisions.

    138 GitHub stars~1.3k tokensUpdated 2 days ago
    Auto-check passed
  • Common Git

    macalbert/envilder

    Git commit messages, PR workflow, and branching strategy using Conventional Commits and Semantic Versioning.

    138 GitHub stars~991 tokensUpdated 2 days ago
    Auto-check passed
  • Common Testing Conventions

    macalbert/envilder

    Mandatory testing conventions including the narrow diagnostic exception for testing test-only code, AAA pattern, test naming, and assertions across all stacks (.NET, TypeScript, Python).

    138 GitHub stars~1.9k tokensUpdated 2 days ago
    Auto-check passed
  • Doc Maintenance

    macalbert/envilder

    Workflow for maintaining changelogs, READMEs, and documentation files.

    138 GitHub stars~904 tokensUpdated 2 days ago
    Auto-check passed
  • Doc Sync

    macalbert/envilder

    Audit and synchronize documentation across website, READMEs, and docs/.

    138 GitHub stars~1.3k tokensUpdated 2 days ago
    Auto-check passed

Works with

Categories

Questions about Dotnet Testing

What does Dotnet Testing do?

Mandatory testing conventions for .NET (xUnit, AwesomeAssertions). Dotnet Testing is an agent skill from macalbert/envilder.NET (xUnit, AwesomeAssertions).

When should I use Dotnet Testing?

Dotnet Testing fits situations like: acceptance tests with xUnit; tasks that involve Unit testing; tasks that involve Integration testing.

How do I install Dotnet Testing in Claude Code?

Run `npx skills add macalbert/envilder --skill dotnet-testing -a claude-code`. Or copy the skill folder (.github/skills/dotnet-testing in macalbert/envilder) into .claude/skills/dotnet-testing in your project. Claude Code loads it when a task matches its description.

How do I install Dotnet Testing in Codex?

Run `npx skills add macalbert/envilder --skill dotnet-testing -a codex`. Or copy the skill folder (.github/skills/dotnet-testing in macalbert/envilder) into .agents/skills/dotnet-testing in your project. Codex loads it when a task matches its description.

Can I use Dotnet Testing in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add macalbert/envilder --skill dotnet-testing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dotnet-testing, .gemini/skills/dotnet-testing, .github/skills/dotnet-testing and .opencode/skills/dotnet-testing in your project.

What does Dotnet Testing need to run?

Going by SKILL.md and its folder, Dotnet Testing needs the command-line tools its instructions call (dotnet). Our summary lists: Docker.

Does Dotnet Testing access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Dotnet Testing safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Dotnet Testing use?

Dotnet Testing is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Dotnet Testing use?

About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Dotnet Testing?

Skills that share tags, products or a category with Dotnet Testing: Dotnet Testing (novotnyllc/dotnet-artisan, 233 stars), Supercheck Testing QA (supercheck-io/supercheck, 215 stars), Testing Guide (mobazha/mobazha-unified, 165 stars) and Angular Testing (Kilo-Org/kilo-marketplace, 189 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dotnet Testing?

macalbert (a GitHub user) maintains it in macalbert/envilder, which has 138 GitHub stars. The repository holds 30 skills in this directory. The repository was last updated on October 5, 2026.

Source: macalbert/envilder on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.