Agent skill

Unit Testing

by OpenCoreMMO in OpenCoreMMO/OpenCoreMMO

Write, fix, or review NeoServer unit tests using xUnit and FluentAssertions.

GPL-3.0Auto-check passedTesting & QA

Install Unit Testing

skills CLI
$ npx skills add OpenCoreMMO/OpenCoreMMO --skill unit-testing -a claude-code

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

GitHub CLI
$ gh skill install OpenCoreMMO/OpenCoreMMO unit-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/OpenCoreMMO/OpenCoreMMO.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/unit-testing .claude/skills/unit-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
unit-testing
GitHub stars
481
Token cost
~1.6k tokens
SKILL.md length
430 words
Files
1
Skills in repo
4
Repo updated
First seen
Licence
GPL-3.0

At a glance

Write, fix, or review NeoServer unit tests using xUnit and FluentAssertions.

  • The user wants to create new tests
  • SKILL.md covers Quick Reference, Project-Specific Conventions, Helper Methods — Reusable… and Gotchas, plus 1 more section
  • Calls dotnet
  • Fix failing tests

What it does

Unit Testing is an agent skill from OpenCoreMMO/OpenCoreMMO. Write, fix, or review NeoServer unit tests using xUnit and FluentAssertions. Use this skill when the user wants to create new tests, fix failing tests, or review existing tests — even if they only say "add tests," "fix the test," or mention testing a domain entity (Player, Monster, Item, NPC, Tile), handler, game system, or server component. Covers test helpers, behavioral naming, xUnit traits, and the repository-only mocking policy.

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. Compatibility notes: Requires .NET 10 SDK and dotnet CLI. Designed for NeoServer project conventions.

It sits in Testing & QA, covering Unit testing. It works with .NET. The repository describes itself as: Modern MMORPG server emulator written in C. The licence is GPL-3.0.

When your agent uses it

  • The user wants to create new tests
  • Fix failing tests
  • Review existing tests — even if they only say add tests
  • Mention testing a domain entity (Player

Example prompts

  • “add tests,”
  • “fix the test,”
  • “/unit-testing”

Requirements

  • Compatibility (from SKILL.md): Requires .NET 10 SDK and dotnet CLI. Designed for NeoServer project conventions.

What it can do on your machine

Read from SKILL.md and the folder at commit 1d485f7. 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.

  • Compatibility

    Requires .NET 10 SDK and dotnet CLI. Designed for NeoServer project conventions.

    From compatibility in the SKILL.md frontmatter.

Context cost

Unit Testing loads about 1.6k tokens when it runs. Until then it costs about 113 tokens; SKILL.md has 430 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~113
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 OpenCoreMMO/OpenCoreMMO at commit 1d485f7, republished under its GPL-3.0 licence (© OpenCoreMMO). 430 words, ~1,598 tokens.

Download SKILL.mdSave it as .claude/skills/unit-testing/SKILL.md (or your agent's skills folder).
name
unit-testing
description
Write, fix, or review NeoServer unit tests using xUnit and FluentAssertions. Use this skill when the user wants to create new tests, fix failing tests, or review existing tests — even if they only say "add tests," "fix the test," or mention testing a domain entity (Player, Monster, Item, NPC, Tile), handler, game system, or server component. Covers test helpers, behavioral naming, xUnit traits, and the repository-only mocking policy.
compatibility
Requires .NET 10 SDK and dotnet CLI. Designed for NeoServer project conventions.

Quick Reference

Workflow
  • 1. Identify behavior — one behavior per test
  • 2. Write the test using AAA structure with the template below
  • 3. Use existing helpers (PlayerTestDataBuilder, ItemTestDataBuilder, MapTestDataBuilder, etc.) instead of building from scratch
  • 4. Tag with trait: [Trait("Category", "<value>")]
  • 5. Run: dotnet test tests/<project>
  • 6. Fix any failures and re-run until green
Test Template
csharp
[Fact]
[Trait("Category", "<HappyPath|Validation|EdgeCase|ErrorCondition|Integration>")]
public void {Actor}_does_{something}_when_{condition}()
{
    // Arrange
    var player = PlayerTestDataBuilder.Build();
    // ... use existing builders; mock only I*Repository

    // Act
    player.DoSomething();

    // Assert
    result.Should().Be(expected);
}

Project-Specific Conventions

Test Framework & Mocking
  • xUnit with FluentAssertions (Should().BeTrue(), .BeEquivalentTo(), etc.)
  • Do NOT mock domain entities, services, or commands — use real implementations
  • Only mock infrastructure interfaces: I*Repository, IConnection, IEventAggregator
  • Use Moq for mocks when needed
Naming
{Actor}_does_{something}_when_{condition}

Examples: Player_gets_disconnected_when_game_is_stopped, World_replaces_tile_when_new_tile_provided, Player_cannot_push_null_creature.

Test Isolation

Each [Fact] creates its own instances. Never share objects between tests — no static state, no class-level fixtures. Tests that need serialized execution use [ThreadBlocking].

Traits

Only [Trait("Category", "<value>")] is used. Valid values:

ValueWhen to Use
HappyPathCore positive/expected behavior
ValidationInput validation, null checks, rejection
EdgeCaseBoundary conditions, corner cases
ErrorConditionError state handling (login fails, etc.)
IntegrationMulti-component interaction (real objects, mock only repos)
PathFindingPathfinding algorithm tests
ProximityDistance/proximity checks
TileTile occupation/state tests
Custom Attributes
  • [SkipOnGitHubActionsFact] — skips test in CI (for tests needing real DB)
  • [ThreadBlocking] — serializes test execution via semaphore

Helper Methods — Reusable Builders

All helpers live in tests/NeoServer.Domain.Tests/Helpers/ and use optional parameters with sensible defaults:

Core Builders
BuilderLocationKey Method
PlayerTestDataBuilderHelpers/Player/Build(id, name, hp, mana, skills, inventoryMap, vocationType, ...)
ItemTestDataBuilderHelpers/CreateContainer(...), CreateCumulativeItem(...), CreateWeaponItem(...) (27 methods)
MonsterTestDataBuilderHelpers/Build(maxHealth, speed, isHostile, flags, ...)
MapTestDataBuilderHelpers/Map/Build(fromX, toX, fromY, toY, fromZ, toZ, ...) — rectangular grid
NpcTestDataBuilderHelpers/Build(name, npcType)
InventoryTestDataBuilderHelpers/Player/Build(player, inventoryMap, ...)
PartyTestDataBuilderHelpers/Build(partyInviteService, players)
Show full SKILL.md (172 more words)Show less
Server Test Builders

Located in tests/NeoServer.Domain.Tests/Server/:

BuilderPurpose
GameServerTestBuilderCreates IGameServer with map
ItemTypeStoreTestBuilderCreates ItemTypeStore from items
ItemFactoryTestBuilderCreates IItemFactory with type store
DecayableItemManagerTestBuilderCreates DecayableItemManager
ScriptManagerTestBuilderCreates IScriptManager
ServerTestHelperStarts game server threads
TestSetupFull DI container boot (in NeoServer.Server.Tests)
Event Helpers
HelperPurpose
EventAggregatorTestHelperSetupEventAggregator<TEvent>(handler) — wires handler to fire on publish
EventAssertHelperFluent extensions: WithArgs<T>(Expression)
EventSubscriptionCleanUpCleanUp<T>(eventName) — tears down subscriptions between tests
Pattern
csharp
// Simple in-file helper
private static Location CreateLocation(ushort x = 100, ushort y = 100, byte z = 7)
    => new(x, y, z);

// Compose from existing builders
private static IPlayer CreatePlayerWithFullInventory()
{
    var player = PlayerTestDataBuilder.Build();
    var inventory = InventoryTestDataBuilder.Build(player);
    return player;
}

Gotchas

  • Mock only infrastructure: Never mock domain entities (IPlayer, IMonster, IItem), services, or commands — use real implementations. Only mock I*Repository, IConnection, IEventAggregator.
  • No shared state: Each [Fact] must create everything from scratch. Static or class-level state causes test pollution.
  • One behavior per test: Multiple assertions for different behaviors belong in separate [Fact] methods.
  • Always use FluentAssertions: result.Should().BeTrue(), not Assert.True(result).
  • Handler null guards: Event handlers must guard with if (@event is null) return;.
  • Builders are in Helpers/: Look in tests/NeoServer.Domain.Tests/Helpers/ for *TestDataBuilder classes before writing new setup code.
  • Data-driven tests: Use [InlineData] for simple cases, [MemberData] for complex parameter sets, [ClassData] for reusable data classes.

Running Tests

sh
# All tests
dotnet test tests/

# Specific project
dotnet test tests/NeoServer.Domain.Tests

# Specific category
dotnet test tests/ --filter "Category=HappyPath"

# Code coverage
dotnet test tests/ --collect:"XPlat Code Coverage" --results-directory testresults

# Build before test
dotnet build src/Standalone --configuration Release

© OpenCoreMMO, GPL-3.0. 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 .agents/skills/unit-testing of OpenCoreMMO/OpenCoreMMO.

Open the folder on GitHubat commit 1d485f7

Compare with similar skills

Unit 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.

Unit Testing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Unit Testing this skillOpenCoreMMO/OpenCoreMMO481—~1.6kAutomated safety check: PassGPL-3.0
New Event Sourceaws/aws-lambda-dotnet1.7k—~3kAutomated safety check: PassApache-2.0
ScottPlot Test RunnerScottPlot/ScottPlot6.8k—~308Automated safety check: PassMIT
Aspire Integration TestingDevBetterCom/DevBetterWeb1572 repos~2.3kAutomated safety check: PassNone
Vstest Build Testmicrosoft/vstest969—~1.9kAutomated safety check: PassMIT
Coverage Analysisrunceel/ReactiveProperty944—~5.9kAutomated safety check: WarnMIT

Similar skills

  • New Event Source

    aws/aws-lambda-dotnet

    Official

    Add a new AWS event source attribute (e.g., Kinesis, Kafka, MQ) to the Lambda .NET Annotations framework, including the attribute class, source generator integration, CloudFormation writer, unit…

    1.7k GitHub stars~3k tokensUpdated today
    Testing & QAAuto-check passed
  • ScottPlot Test Runner

    ScottPlot/ScottPlot

    Run or add ScottPlot 5 tests. Use for unit-test and cookbook-test work; unless explicitly asked otherwise, restrict manual test execution to the Unit Tests…

    6.8k GitHub stars~308 tokensUpdated 1 mo ago
    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
  • Vstest Build Test

    microsoft/vstest

    Official

    Build, test, and validate changes in the vstest repository. An agent skill from microsoft/vstest.

    969 GitHub stars~1.9k tokensUpdated today
    Testing & QAAuto-check passed
  • Coverage Analysis

    runceel/ReactiveProperty

    Automated, project-wide code coverage and CRAP (Change Risk Anti-Patterns) score analysis for .NET projects with existing unit tests.

    944 GitHub stars~5.9k tokensUpdated 1 mo ago
    Testing & QAAuto-check: warnings
  • Akka.NET Testing Patterns

    Aaronontheweb/dotnet-skills

    Shows how to test Akka.NET actors with Akka.Hosting.TestKit: swapping services for fakes, using TestProbes, and checking persistence, plus when the older TestKit still fits.

    1.2k GitHub starsUsed in 1 repo~2.4k tokens
    Testing & QAAuto-check passed

More from OpenCoreMMO/OpenCoreMMO

  • Functional Testing

    OpenCoreMMO/OpenCoreMMO

    Write, fix, or review NeoServer functional tests that start from the network handler and run against the real server stack.

    481 GitHub stars~1.1k tokensUpdated 15 days ago
    Auto-check passed
  • Pull Request

    OpenCoreMMO/OpenCoreMMO

    Create a pull request for OpenCoreMMO following the project's PR template.

    481 GitHub stars~814 tokensUpdated 15 days ago
    Auto-check passed
  • Code Review

    OpenCoreMMO/OpenCoreMMO

    Review pull requests and code changes for OpenCoreMMO against the project's architecture, conventions, and style defined in AGENTS.md.

    481 GitHub stars~3.9k tokensUpdated 15 days ago
    Auto-check passed

Works with

Categories

Questions about Unit Testing

What does Unit Testing do?

Write, fix, or review NeoServer unit tests using xUnit and FluentAssertions. Unit Testing is an agent skill from OpenCoreMMO/OpenCoreMMO. Write, fix, or review NeoServer unit tests using xUnit and FluentAssertions.

When should I use Unit Testing?

Unit Testing fits situations like: the user wants to create new tests; fix failing tests; review existing tests — even if they only say add tests; mention testing a domain entity (Player.

How do I install Unit Testing in Claude Code?

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

How do I install Unit Testing in Codex?

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

Can I use Unit 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 OpenCoreMMO/OpenCoreMMO --skill unit-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/unit-testing, .gemini/skills/unit-testing, .github/skills/unit-testing and .opencode/skills/unit-testing in your project.

What does Unit Testing need to run?

Going by SKILL.md and its folder, Unit Testing needs the command-line tools its instructions call (dotnet). Compatibility (from SKILL.md): Requires .NET 10 SDK and dotnet CLI. Designed for NeoServer project conventions..

Does Unit 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 Unit 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 Unit Testing use?

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

How many tokens does Unit Testing use?

About 1.6k tokens (SKILL.md is roughly 6.4k 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 Unit Testing?

Skills that share tags, products or a category with Unit Testing: New Event Source (aws/aws-lambda-dotnet, 1.7k stars), ScottPlot Test Runner (ScottPlot/ScottPlot, 6.8k stars), Aspire Integration Testing (DevBetterCom/DevBetterWeb, 157 stars) and Vstest Build Test (microsoft/vstest, 969 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Unit Testing?

OpenCoreMMO (a GitHub organization) maintains it in OpenCoreMMO/OpenCoreMMO, which has 481 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on September 22, 2026.

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