Agent skill

Tsp Csharp Xunit

by querylenshq in querylenshq/ef-querylens

Comprehensive xUnit testing guide for C projects. An agent skill from querylenshq/ef-querylens.

MITAuto-check passedTesting & QA

Install Tsp Csharp Xunit

skills CLI
$ npx skills add querylenshq/ef-querylens --skill tsp-csharp-xunit -a claude-code

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

GitHub CLI
$ gh skill install querylenshq/ef-querylens tsp-csharp-xunit --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/querylenshq/ef-querylens.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/tsp-csharp-xunit .claude/skills/tsp-csharp-xunit && 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
tsp-csharp-xunit
GitHub stars
225
Token cost
~972 tokens
SKILL.md length
251 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

Comprehensive xUnit testing guide for C projects. An agent skill from querylenshq/ef-querylens.

  • Writing unit tests
  • SKILL.md covers Project Setup, Test Structure, Naming Conventions and Data-Driven Tests, plus 4 more sections
  • Calls dotnet
  • Setting up test projects

What it does

Tsp Csharp Xunit is an agent skill from querylenshq/ef-querylens. Comprehensive xUnit testing guide for C projects. Use when writing unit tests, setting up test projects, creating data-driven tests, mocking dependencies, or organizing test suites.

Its SKILL.md is about 970 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. It works with C#. The repository describes itself as: See the SQL EF Core will generate in real-time while you write LINQ. The licence is MIT.

When your agent uses it

  • Writing unit tests
  • Setting up test projects
  • Creating data-driven tests
  • Mocking dependencies

Example prompts

  • “/tsp-csharp-xunit”

What it can do on your machine

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

Tsp Csharp Xunit loads about 972 tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 251 words of instructions outside code blocks.

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

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 querylenshq/ef-querylens at commit fe73cf3, republished under its MIT licence (© querylenshq). 251 words, ~972 tokens.

Download SKILL.mdSave it as .claude/skills/tsp-csharp-xunit/SKILL.md (or your agent's skills folder).
name
tsp-csharp-xunit
description
Comprehensive xUnit testing guide for C# projects. Use when writing unit tests, setting up test projects, creating data-driven tests, mocking dependencies, or organizing test suites.

xUnit Testing — TSP Standards

Project Setup

  • Test project name: {ProjectName}.Tests
  • Required packages: Microsoft.NET.Test.Sdk, xunit, xunit.runner.visualstudio
  • Recommended: FluentAssertions, NSubstitute (or Moq)
  • Run tests: dotnet test (use --filter for targeted runs)

Test Structure

  • No test class attribute required (unlike MSTest/NUnit)
  • Use constructor for per-test setup; implement IDisposable for teardown
  • Use IClassFixture<T> for shared context within a test class
  • Use ICollectionFixture<T> for shared context across test classes
  • Use IAsyncLifetime for async setup/teardown
csharp
public class OrderServiceTests : IClassFixture<DatabaseFixture>, IDisposable
{
    private readonly DatabaseFixture _db;

    public OrderServiceTests(DatabaseFixture db)
    {
        _db = db;
    }

    [Fact]
    public void CreateOrder_WithValidItems_ReturnsOrderId()
    {
        // Arrange
        var service = new OrderService(_db.Context);
        var items = new[] { new OrderItem("SKU-1", 2) };

        // Act
        var result = service.CreateOrder(items);

        // Assert
        result.Should().BeGreaterThan(0);
    }

    public void Dispose() { /* cleanup */ }
}

Naming Conventions

  • Test class: {ClassUnderTest}Tests
  • Test method: {Method}_{Scenario}_{ExpectedResult}
  • Examples:
    • GetUser_WhenIdIsInvalid_ReturnsNotFound
    • CalculateTotal_WithDiscount_AppliesPercentage
    • SaveAsync_WhenCancelled_ThrowsOperationCancelled

Data-Driven Tests

  • [Theory] + [InlineData] for simple inline values
  • [Theory] + [MemberData] for method/property-based data
  • [Theory] + [ClassData] for reusable data generators
  • Use meaningful parameter names that describe the scenario
csharp
[Theory]
[InlineData(0, false)]
[InlineData(5, true)]
[InlineData(-1, false)]
public void IsValidQuantity_ReturnsExpected(int quantity, bool expected)
{
    var result = OrderValidator.IsValidQuantity(quantity);

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

Assertions

  • Prefer FluentAssertions when available:
    • result.Should().Be(expected)
    • collection.Should().HaveCount(3).And.Contain(x => x.IsActive)
    • act.Should().ThrowAsync<InvalidOperationException>()
  • Built-in xUnit assertions as fallback:
    • Assert.Equal, Assert.True, Assert.Throws<T>
    • Assert.Contains / Assert.DoesNotContain for collections
  • One logical behavior per test — multiple assertions are fine if testing one concept

Mocking

  • Prefer NSubstitute for readability; Moq is also acceptable
  • Mock interfaces, not concrete classes
  • Verify interactions only when the interaction IS the behavior being tested
  • Avoid over-mocking — if you're mocking more than 3 dependencies, the class may need refactoring
csharp
var repo = Substitute.For<IOrderRepository>();
repo.GetByIdAsync(42, Arg.Any<CancellationToken>())
    .Returns(new Order { Id = 42 });

var service = new OrderService(repo);
var result = await service.GetOrderAsync(42, CancellationToken.None);

result.Should().NotBeNull();
result.Id.Should().Be(42);

Test Organization

  • Group tests by feature or component
  • Use [Trait("Category", "Integration")] for categorization
  • Skip tests with Skip = "reason" when conditionally disabled
  • Use ITestOutputHelper for diagnostic output (not Console.WriteLine)

Rules

  • Tests must run in any order and in parallel — no shared mutable state
  • Avoid disk I/O — use in-memory alternatives or mocks
  • No Thread.Sleep — use Task.Delay with cancellation tokens in async tests
  • Every new or changed public API must have corresponding tests

© querylenshq, 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/tsp-csharp-xunit of querylenshq/ef-querylens.

Open the folder on GitHubat commit fe73cf3

Compare with similar skills

Tsp Csharp Xunit 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.

Tsp Csharp Xunit compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Tsp Csharp Xunit this skillquerylenshq/ef-querylens225—~972Automated safety check: PassMIT
ScottPlot Test RunnerScottPlot/ScottPlot6.8k—~308Automated safety check: PassMIT
Gdunit DriverRandallLiuXin/GodotMaker5491 repos~3.3kAutomated safety check: PassCustom licence
Verifyvaldisiljuconoks/LocalizationProvider180—~159Automated safety check: PassApache-2.0
Unit TestsWildGums/Orc.LicenseManager108—~2.1kAutomated safety check: PassCustom licence
Csharp Testingaffaan-m/ECC275k1 repos~2.2kAutomated safety check: PassMIT

Similar skills

  • 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
  • Gdunit Driver

    RandallLiuXin/GodotMaker

    Run gdUnit4 unit tests and parse results into structured output.

    549 GitHub starsUsed in 1 repo~3.3k tokens
    Testing & QAAuto-check passed
  • Verify

    valdisiljuconoks/LocalizationProvider

    Build the solution and run unit tests to verify changes are correct.

    180 GitHub stars~159 tokensUpdated 3 mo ago
    Testing & QAAuto-check passed
  • Unit Tests

    WildGums/Orc.LicenseManager

    Write unit tests for this repository using NUnit following repository best practices.

    108 GitHub stars~2.1k tokensUpdated today
    Testing & QAAuto-check passed
  • Csharp Testing

    affaan-m/ECC

    C and .NET testing patterns with xUnit, FluentAssertions, mocking, integration tests, and test organization best practices.

    275k GitHub starsUsed in 1 repo~2.2k tokens
    Testing & QAAuto-check passed
  • Csharp Mstest

    github/awesome-copilot

    Official

    Get best practices for MSTest 3.x/4.x unit testing, including modern assertion APIs and data-driven tests

    40k GitHub starsUsed in 1 repo~3.5k tokens
    Testing & QAAuto-check passed

More from querylenshq/ef-querylens

  • Tsp Csharp

    querylenshq/ef-querylens

    Comprehensive C and .NET development skill for TSP projects.

    225 GitHub stars~1.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Release

    querylenshq/ef-querylens

    A skill your agent uses when: creating a release, publishing a version, cutting a release, tagging a release, releasing plugin, release workflow, prepare release, create git tag, create GitHub…

    225 GitHub stars~887 tokensUpdated 1 mo ago
    Auto-check passed

Works with

Categories

Questions about Tsp Csharp Xunit

What does Tsp Csharp Xunit do?

Comprehensive xUnit testing guide for C projects. An agent skill from querylenshq/ef-querylens. Tsp Csharp Xunit is an agent skill from querylenshq/ef-querylens. Comprehensive xUnit testing guide for C projects.

When should I use Tsp Csharp Xunit?

Tsp Csharp Xunit fits situations like: writing unit tests; setting up test projects; creating data-driven tests; mocking dependencies.

How do I install Tsp Csharp Xunit in Claude Code?

Run `npx skills add querylenshq/ef-querylens --skill tsp-csharp-xunit -a claude-code`. Or copy the skill folder (.github/skills/tsp-csharp-xunit in querylenshq/ef-querylens) into .claude/skills/tsp-csharp-xunit in your project. Claude Code loads it when a task matches its description.

How do I install Tsp Csharp Xunit in Codex?

Run `npx skills add querylenshq/ef-querylens --skill tsp-csharp-xunit -a codex`. Or copy the skill folder (.github/skills/tsp-csharp-xunit in querylenshq/ef-querylens) into .agents/skills/tsp-csharp-xunit in your project. Codex loads it when a task matches its description.

Can I use Tsp Csharp Xunit 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 querylenshq/ef-querylens --skill tsp-csharp-xunit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tsp-csharp-xunit, .gemini/skills/tsp-csharp-xunit, .github/skills/tsp-csharp-xunit and .opencode/skills/tsp-csharp-xunit in your project.

What does Tsp Csharp Xunit need to run?

Going by SKILL.md and its folder, Tsp Csharp Xunit needs the command-line tools its instructions call (dotnet).

Does Tsp Csharp Xunit 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 Tsp Csharp Xunit 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 Tsp Csharp Xunit use?

Tsp Csharp Xunit 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 Tsp Csharp Xunit use?

About 972 tokens (SKILL.md is roughly 3.9k 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 Tsp Csharp Xunit?

Skills that share tags, products or a category with Tsp Csharp Xunit: ScottPlot Test Runner (ScottPlot/ScottPlot, 6.8k stars), Gdunit Driver (RandallLiuXin/GodotMaker, 549 stars), Verify (valdisiljuconoks/LocalizationProvider, 180 stars) and Unit Tests (WildGums/Orc.LicenseManager, 108 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Tsp Csharp Xunit?

querylenshq (a GitHub organization) maintains it in querylenshq/ef-querylens, which has 225 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on September 3, 2026.

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