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.
npx agentmods add skills/practicalswan/agent-skills/csharp-xunitnpx skills add PracticalSwan/agent-skills --skill csharp-xunitgit clone --depth 1 https://github.com/PracticalSwan/agent-skillsWrote 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.
[](https://agentmods.dev/skills/practicalswan/agent-skills/csharp-xunit)<a href="https://agentmods.dev/skills/practicalswan/agent-skills/csharp-xunit"><img src="https://agentmods.dev/badge/skills/practicalswan/agent-skills/csharp-xunit.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00025 | $0.01473 |
| Opus 5 | $0.00013 | $0.00737 |
| Sonnet 5 | $0.00005 | $0.00295 |
| Haiku 4.5 | $0.00003 | $0.00147 |
Grade A, and why
csharp-xunit 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 today.
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.
How it starts
The opening of the file, as written. The whole thing — 158 lines — stays where its author put it; the contents beside it link to each section on GitHub.
XUnit Best Practices
Optimized for current .NET SDK releases, C# 12+, xUnit 2.x, and FluentAssertions 6+.
Your goal is to help me write effective unit tests with XUnit, covering both standard and data-driven testing approaches.
- Leverage native parallel subagent dispatch and 200k+ context windows where available.
Anti-Patterns
- Treating fixtures as hidden setup: Readers lose sight of the behavior under test when too much state is shared implicitly.
- Asserting only the happy path: Unit tests miss the contract if failure and edge cases are not explicit.
- Using vague test names: A failing test should explain the broken behavior before anyone opens the body.
Verification Protocol
Before claiming "skill applied successfully":
- Pass/fail: The Csharp Xunit implementation names the target runtime, framework version, and affected files.
- Pass/fail: Build, lint, test, or equivalent local validation is run for the changed surface.
- Pass/fail: Edge cases for errors, dependency drift, and environment differences are addressed or explicitly out of scope.
- Pressure-test scenario: Apply the workflow to a change that passes happy-path tests but fails one boundary condition.
- Success metric: Zero untested success claims; every implementation claim maps to a command or artifact.
Before and After Example
// Before
[Fact]
public async Task SavesOrder()
{
var id = await service.SaveAsync(order);
Assert.True(id > 0);
}
// After
[Fact]
public async Task SaveAsync_WhenOrderIsValid_PersistsAndReturnsId()
{
// Arrange
var order = new Order("ORD-42", 3);
// Act
var id = await service.SaveAsync(order);
// Assert
id.Should().BeGreaterThan(0);
}
Moves from a vague assertion to an explicit Arrange-Act-Assert flow with a descriptive name.
Project Setup
- Use a separate test project with naming convention
[ProjectName].Tests - Reference Microsoft.NET.Test.Sdk, xunit, and xunit.runner.visualstudio packages
- Create test classes that match the classes being tested (e.g.,
CalculatorTestsforCalculator) - Use .NET SDK test commands:
dotnet testfor running tests
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- today Changed 185cdd3b7637
- 4d ago First seen · 158 lines · 25 tokens per session scan A 0acf48b54504
csharp-xunit is a skill published in the GitHub repository PracticalSwan/agent-skills (13 stars, last pushed 3d ago), licensed MIT. It adds 25 tokens to every session and 1,473 once invoked, about $0.0001 per session on Opus 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-30.
Other skills, from other repositories
test-driven-development
TDD: enforce RED-GREEN-REFACTOR, tests before code.
plugin-quality
审查和改进 Zhin.js 插件质量(Plugin Runtime)。Use when asked to review plugin code, audit structure, or improve before publishing. 检查 definePlugin、约定目录、发送链与安全。.
plugin-test
为 Zhin.js 插件编写和运行测试(Plugin Runtime)。Use when asked to write tests, add test coverage, or verify defineCommand / definePlugin behavior. 引导编写符合 Runtime 的 Vitest 测试。.
qa-bug-root-cause-analysis
当某个 Bug 频繁复现、线上有缺陷需要做事后分析、或者发现同一类问题反复出现需要根治时使用此技能。从症状出发用 5Why、因果图和鱼骨图等方法系统化定位缺陷根源,区分直接原因、间接原因和系统原因。不要只修症状——根因分析的价值在于找到让同类 Bug 不再发生的系统性改进措施,同时分析漏测原因来优化测试设计。 ⚠️ 本技能示例可能调用外部日志/监控工具,请在受控环境执行。.
qa-bug-lifecycle
Skill "qa-bug-lifecycle" from Kokxi/qa-test-skills, covering 缺陷生命周期管理, 核心原则, 缺陷生命周期, 状态流转 and 状态定义.
qa-bug-reporting
当发现了一个 Bug 需要提交、自己提的 Bug 被开发打回来了、或者团队 Bug 质量参差不齐需要统一规范时使用此技能。一个高质量的 Bug 报告应该让开发看一遍就能复现并定位,不需要来回追问。包含清晰的复现步骤(从环境准备到操作序列到预期/实际结果)、根因推测、影响范围评估和必要附件。 ⚠️ 本技能示例可能调用外部抓包/日志工具,请在受控环境执行。.