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 skills add kevintsengtw/dotnet-testing-agent-skills --skill dotnet-testing-advanced-tunit-fundamentalsgit 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-advanced-tunit-fundamentals)<a href="https://agentmods.dev/skills/kevintsengtw/dotnet-testing-agent-skills/dotnet-testing-advanced-tunit-fundamentals"><img src="https://agentmods.dev/badge/skills/kevintsengtw/dotnet-testing-agent-skills/dotnet-testing-advanced-tunit-fundamentals/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/kevintsengtw/dotnet-testing-agent-skills/dotnet-testing-advanced-tunit-fundamentals"><img src="https://agentmods.dev/badge/skills/kevintsengtw/dotnet-testing-agent-skills/dotnet-testing-advanced-tunit-fundamentals.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00181 | $0.02588 |
| Opus 5.5 | $0.00072 | $0.01035 |
| Sonnet 5.5 | $0.00036 | $0.00518 |
| Haiku 4.5 | $0.00018 | $0.00259 |
Grade A, and why
dotnet-testing-advanced-tunit-fundamentals 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 2mo 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 — 190 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TUnit 新世代測試框架入門基礎
TUnit 框架核心特色
1. Source Generator 驅動的測試發現
TUnit 與傳統測試框架最大的差異在於使用 Source Generator 在編譯時期完成測試發現,避免反射成本、完全支援 Native AOT、更快的啟動時間。
// TUnit 在編譯時期就透過 Source Generator 產生測試註冊程式碼
public class ModernTests
{
[Test] // 編譯時期就被處理和最佳化
public async Task TestMethod()
{
await Assert.That(true).IsTrue();
}
}
2. AOT (Ahead-of-Time) 編譯支援
傳統 JIT:C# 原始碼 → IL 中間碼 → 執行時期 JIT 編譯 → 機器碼 → 執行
AOT: C# 原始碼 → 編譯時期直接產生 → 機器碼 → 直接執行
AOT 優勢:超快啟動時間、更小的記憶體占用、可預測的效能、更適合容器化部署。大型專案可達 10-30 倍啟動時間改善。
3. Microsoft.Testing.Platform 採用
TUnit 建構在微軟最新的 Microsoft.Testing.Platform 之上,而非傳統的 VSTest 平台。
重要注意事項: TUnit 專案不需要也不應該安裝 Microsoft.NET.Test.Sdk 套件。
4. 預設並行執行
TUnit 將並行執行設為預設,需要時可用 [NotInParallel("GroupName")] 控制特定測試群組依序執行。
TUnit 專案建立
支援手動建立(console 模板 + TUnit 套件)或使用 TUnit Template(dotnet new tunit,推薦)。專案需設定 csproj(TUnit 套件、IsTestProject)與 GlobalUsings.cs。所有測試方法必須是非同步的(async Task)。
完整專案建立步驟與 csproj 範例請參閱 references/project-setup.md
測試屬性與參數化
基本測試 [Test]
TUnit 統一使用 [Test] 屬性,不像 xUnit 區分 [Fact] 和 [Theory]:
[Test]
public async Task Add_輸入1和2_應回傳3()
{
var calculator = new Calculator();
var result = calculator.Add(1, 2);
await Assert.That(result).IsEqualTo(3);
}
參數化測試 [Arguments]
[Test]
[Arguments(1, 2, 3)]
[Arguments(-1, 1, 0)]
[Arguments(0, 0, 0)]
public async Task Add_多組輸入_應回傳正確結果(int a, int b, int expected)
{
var calculator = new Calculator();
var result = calculator.Add(a, b);
await Assert.That(result).IsEqualTo(expected);
}
decimal不是 attribute 常數型別,[Arguments(1.5m)]會編譯失敗(CS0182)。 TUnit 0.60.15 起會把double或string常值自動轉成decimal參數:參數宣告為decimal, 寫[Arguments(1.5)]或[Arguments("19.99")]即可。更早的版本不支援這個轉換, 請改用[MethodDataSource]提供decimal值。
TUnit.Assertions 斷言系統
TUnit 採用流暢式(Fluent)斷言設計,所有斷言都是非同步的。支援相等性、布林值、數值比較、字串、集合、例外等多種斷言,並可透過 And / Or 組合條件。
What ships with it
10 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.
- references/lifecycle-management.md 2.3 KB
- references/project-setup.md 2.4 KB
- references/tunit-assertions-detail.md 3.0 KB
- references/xunit-migration.md 3.2 KB
- templates/assertion-examples.cs 6.0 KB
- templates/basic-test-examples.cs 3.4 KB
- templates/GlobalUsings.cs 462 B
- templates/lifecycle-examples.cs 6.3 KB
- templates/tunit-project.csproj 1.2 KB
- templates/xunit-migration-guide.md 7.5 KB
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.
- 2mo ago Changed · +13 lines · -45 tokens per session 8934b7d4406a
- 3mo ago First seen · 177 lines · 226 tokens per session scan A 99922c5c9862
dotnet-testing-advanced-tunit-fundamentals is a skill published in the GitHub repository kevintsengtw/dotnet-testing-agent-skills (30 stars, last pushed 1mo ago), licensed MIT. It adds 181 tokens to every session and 2,588 once invoked, about $0.0007 per session on Opus 5.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.
dotnet-testing-advanced-tunit-fundamentals compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| dotnet-testing-advanced-tunit-fundamentalskevintsengtw/dotnet-testing-agent-skills | Skill | 30 | 1mo ago | MIT | A | 181 | Claude Code, Codex |
| author-testAzure/azure-sdk-for-net | Skill | 6.1k | today | MIT | A | 68 | Claude Code, Codex |
| migrate-xunit-to-xunit-v3managedcode/dotnet-skills | Skill | 527 | 16d ago | MIT | A | 149 | Claude Code, Codex |
| clean-architecture-dotnetSebastienDegodez/copilot-instructions | Skill | 199 | 24d ago | Apache-2.0 | A | 50 | Claude Code, Codex |
| creating-dotnet-mcp-serversSebastienDegodez/copilot-instructions | Skill | 199 | 24d ago | Apache-2.0 | A | 43 | Claude Code, Codex |
| csharp-xunitPracticalSwan/agent-skills | Skill | 25 | 15d ago | MIT | A | 25 | Codex |
| cratis-specifications-isolate-behaviorCratis/AI | Skill | 4 | today | MIT | A | 46 | Claude Code, Codex |