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/kevintsengtw/dotnet-testing-agent-skills/dotnet-testing-xunit-project-setupnpx skills add kevintsengtw/dotnet-testing-agent-skills --skill dotnet-testing-xunit-project-setupgit clone --depth 1 https://github.com/kevintsengtw/dotnet-testing-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/kevintsengtw/dotnet-testing-agent-skills/dotnet-testing-xunit-project-setup)<a href="https://agentmods.dev/skills/kevintsengtw/dotnet-testing-agent-skills/dotnet-testing-xunit-project-setup"><img src="https://agentmods.dev/badge/skills/kevintsengtw/dotnet-testing-agent-skills/dotnet-testing-xunit-project-setup.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.1 | $0.00194 | $0.03951 |
| Opus 5 | $0.00097 | $0.01975 |
| Sonnet 5 | $0.00039 | $0.00790 |
| Haiku 4.5 | $0.00019 | $0.00395 |
Grade A, and why
dotnet-testing-xunit-project-setup 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 6d ago.
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 — 420 lines — stays where its author put it; the contents beside it link to each section on GitHub.
xUnit 測試專案設定指南
專案結構最佳實踐
建議的解決方案結構
MyProject/
├── src/ # 主程式碼目錄
│ └── MyProject.Core/
│ ├── MyProject.Core.csproj
│ ├── Calculator.cs
│ ├── Services/
│ └── Models/
├── tests/ # 測試程式碼目錄
│ └── MyProject.Core.Tests/
│ ├── MyProject.Core.Tests.csproj
│ ├── CalculatorTests.cs
│ ├── Services/
│ └── Models/
└── MyProject.sln
結構原則:
- src 與 tests 分離:清楚區分生產程式碼與測試程式碼
- 命名慣例:測試專案名稱為
{主專案名稱}.Tests - 目錄對應:測試專案的資料夾結構應對應主專案的結構
- 一對一映射:每個主專案應有對應的測試專案
建立 xUnit 測試專案
方法一:使用 .NET CLI(推薦)
步驟 1:建立解決方案與專案
# 建立解決方案
dotnet new sln -n MyProject
# 建立主專案(類別庫)
dotnet new classlib -n MyProject.Core -o src/MyProject.Core
# 建立測試專案(xUnit 範本)
dotnet new xunit -n MyProject.Core.Tests -o tests/MyProject.Core.Tests
# 將專案加入解決方案
dotnet sln add src/MyProject.Core/MyProject.Core.csproj
dotnet sln add tests/MyProject.Core.Tests/MyProject.Core.Tests.csproj
# 建立專案參考(測試專案參考主專案)
dotnet add tests/MyProject.Core.Tests/MyProject.Core.Tests.csproj reference src/MyProject.Core/MyProject.Core.csproj
步驟 2:安裝程式碼覆蓋率工具
# 切換到測試專案目錄
cd tests/MyProject.Core.Tests
# 安裝 coverlet.collector(用於收集程式碼覆蓋率)
dotnet add package coverlet.collector
方法二:使用 Visual Studio
-
建立解決方案
- File → New → Project
- 選擇「Blank Solution」
- 命名為專案名稱
-
加入主專案
- 右鍵解決方案 → Add → New Project
- 選擇「Class Library」
- 命名為
MyProject.Core
-
加入測試專案
- 右鍵解決方案 → Add → New Project
- 搜尋並選擇「xUnit Test Project」
- 命名為
MyProject.Core.Tests
-
設定專案參考
- 右鍵測試專案 → Add → Project Reference
- 勾選主專案
xUnit 測試專案的 csproj 設定
標準 xUnit 測試專案 csproj
請參考同目錄下的 templates/xunit-test-project.csproj 範本檔案。
核心相依套件說明:
-
xunit(2.9.3+)
- xUnit 測試框架的核心套件
- 提供
[Fact]、[Theory]等測試屬性 - 包含
Assert類別與斷言方法
-
xunit.runner.visualstudio(3.0.0+)
- Visual Studio Test Explorer 整合
- 讓測試能在 VS Code、Visual Studio、Rider 中被探索與執行
- 支援測試結果的即時顯示
What ships with it
2 files 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.
- 6d ago First seen · 420 lines · 194 tokens per session scan A ddd9e23f5a0b
dotnet-testing-xunit-project-setup is a skill published in the GitHub repository kevintsengtw/dotnet-testing-agent-skills (28 stars, last pushed 21d ago), licensed MIT. It adds 194 tokens to every session and 3,951 once invoked, about $0.0010 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
inventree-devcontainer-testing
Run the InvenTree Plugin AI Toolkit devcontainer and execute a plugin's test-all.sh. Covers Docker setup, postCreateCommand, server startup, and the lint/unit/integration/frontend-build/E2E layers.
author-test
Generate a test given sample. Parameters: C# SDK repository root; Package name: one of Azure.AI.Projects, Azure.AI.Projects.Agents or Azure.AI.Extensions.OpenAI; the sample to use as a starting point for the test.
test-quality
Write high-quality JUnit 5 tests with AssertJ assertions. Use when user says "add tests", "write tests", "improve test coverage", or when reviewing/creating test classes for Java code.
migrate-xunit-to-xunit-v3
Migrate .NET test projects from xUnit.net v2 to xunit.v3 and fix v3 breaks. Use for package/CPM conversion, OutputType=Exe, preserving the VSTest or MTP runner (including projects currently using YTest.MTP.XUnit2), incompatible TFMs, async void tests, string-to-Type attributes, custom Fact/Theory/BeforeAfterTest…
nunit
Write, run, or repair .NET tests that use NUnit. Use when a repo uses NUnit, [Test], [TestCase], [TestFixture], or NUnit3TestAdapter for VSTest or Microsoft.Testing.Platform execution. USE FOR: writing or reviewing NUnit tests; using [Test], [TestCase], [TestFixture], [SetUp], [TearDown] attributes; configuring…
crap-score
Calculates CRAP (Change Risk Anti-Patterns) for a named .NET method, class, or file. USE FOR: explicit CRAP calculation or coverage-and-complexity risk within that named target, including which tests to prioritize. DO NOT USE FOR: project-wide coverage/CRAP, plateaus, or project-wide blockers/priorities…