dotnet-testing-test-naming-conventions

dotnet-testing-test-naming-conventions is a skill for Claude Code, Codex from kevintsengtw/dotnet-testing-agent-skills. It costs 189 tokens per session (2,496 once invoked), scanned A, original, MIT.

A guide for naming automated tests so each name states the method being tested, the situation, and the expected result. It recommends separating these three parts with underscores and gives English and Chinese examples.

In plain words
What is it for?
Use it to name test methods and test classes consistently, describe normal and boundary cases, and state expected results or exceptions.
Why use it?
Clear names make failing tests easier to understand and help a test suite document its expected behavior.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to name test methods and test classes consistently, describe normal and boundary cases, and state expected results or exceptions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kevintsengtw/dotnet-testing-agent-skills/dotnet-testing-test-naming-conventions
Install

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.

Any agent
npx skills add kevintsengtw/dotnet-testing-agent-skills --skill dotnet-testing-test-naming-conventions
Clone the repo
git clone --depth 1 https://github.com/kevintsengtw/dotnet-testing-agent-skills

Made for: Claude Code, Codex.

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

agentmods badge for dotnet-testing-test-naming-conventions

README.md
[![agentmods](https://agentmods.dev/badge/skills/kevintsengtw/dotnet-testing-agent-skills/dotnet-testing-test-naming-conventions/github.svg)](https://agentmods.dev/skills/kevintsengtw/dotnet-testing-agent-skills/dotnet-testing-test-naming-conventions)
Your own site
<a href="https://agentmods.dev/skills/kevintsengtw/dotnet-testing-agent-skills/dotnet-testing-test-naming-conventions"><img src="https://agentmods.dev/badge/skills/kevintsengtw/dotnet-testing-agent-skills/dotnet-testing-test-naming-conventions/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.

agentmods 80×15 button for dotnet-testing-test-naming-conventions

Your own site · 80×15
<a href="https://agentmods.dev/skills/kevintsengtw/dotnet-testing-agent-skills/dotnet-testing-test-naming-conventions"><img src="https://agentmods.dev/badge/skills/kevintsengtw/dotnet-testing-agent-skills/dotnet-testing-test-naming-conventions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 189 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,496 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00189 $0.02496
Opus 5 $0.00095 $0.01248
Sonnet 5 $0.00038 $0.00499
Haiku 4.5 $0.00019 $0.00250

Measured 9d ago against content hash a92b6e18c58c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

dotnet-testing-test-naming-conventions 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 9d 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.

skills/dotnet-testing-test-naming-conventions/SKILL.md · 283 lines

How it starts

The opening of the file, as written. The whole thing — 283 lines — stays where its author put it; the contents beside it link to each section on GitHub.

.NET 測試命名規範指南

測試方法命名規範

標準格式

使用底線分隔的三段式命名法:

[被測試方法名稱]_[測試情境/輸入條件]_[預期行為/結果]

各段說明

區段 說明 範例
被測試方法名稱 正在測試的方法名稱 AddProcessOrderIsValidEmail
測試情境/輸入條件 描述測試的前置條件或輸入 輸入1和2輸入null輸入有效訂單
預期行為/結果 描述預期的輸出或行為 應回傳3應拋出Exception應回傳True

命名範例對照表

好的命名 vs 不好的命名

三段式命名可以使用中文或英文,依團隊慣例選擇。以下同時展示兩種風格:

不好的命名 中文命名(推薦) 英文命名 原因
TestAdd Add_輸入1和2_應回傳3 Add_WhenGiven1And2_ShouldReturn3 清楚說明測試情境與預期結果
Test1 Add_輸入負數和正數_應回傳正確結果 Add_WhenGivenNegativeAndPositive_ShouldReturnCorrectResult 有意義的描述
EmailTest IsValidEmail_輸入有效Email_應回傳True IsValidEmail_WhenValidEmail_ShouldReturnTrue 完整的三段式命名
OrderTest ProcessOrder_輸入null_應拋出ArgumentNullException ProcessOrder_WhenNull_ShouldThrowArgumentNullException 明確的例外情境

實際範例

基本運算測試

// ✅ 正常路徑測試
[Fact]
public void Add_輸入1和2_應回傳3()

// ✅ 邊界條件測試
[Fact]
public void Add_輸入0和0_應回傳0()

// ✅ 負數測試
[Fact]
public void Add_輸入負數和正數_應回傳正確結果()

驗證邏輯測試

// ✅ 有效輸入測試
[Fact]
public void IsValidEmail_輸入有效Email_應回傳True()

// ✅ 無效輸入 - null
[Fact]
public void IsValidEmail_輸入null值_應回傳False()

// ✅ 無效輸入 - 空字串
[Fact]
public void IsValidEmail_輸入空字串_應回傳False()

// ✅ 無效輸入 - 格式錯誤
[Fact]
public void IsValidEmail_輸入無效Email格式_應回傳False()

業務邏輯測試

// ✅ 處理流程測試
[Fact]
public void ProcessOrder_輸入有效訂單_應回傳處理後訂單()

// ✅ 例外處理測試
[Fact]
public void ProcessOrder_輸入null_應拋出ArgumentNullException()

// ✅ 格式化測試
[Fact]
public void GetOrderNumber_輸入有效訂單_應回傳格式化訂單號碼()

Read the full file on GitHub · 283 lines

Files

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.

Changes

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.

  1. 9d ago First seen · 283 lines · 189 tokens per session scan A a92b6e18c58c

Subscribe to this mod's changes

dotnet-testing-test-naming-conventions is a skill published in the GitHub repository kevintsengtw/dotnet-testing-agent-skills (28 stars, last pushed 24d ago), licensed MIT. It adds 189 tokens to every session and 2,496 once invoked, about $0.0009 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.

Related

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.

jrobelia/inventree-plugin-ai-toolkit · 49 tokens

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.

Azure/azure-sdk-for-net · 68 tokens

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.

decebals/claude-code-java · 45 tokens

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…

managedcode/dotnet-skills · 149 tokens

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…

managedcode/dotnet-skills · 99 tokens

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…

managedcode/dotnet-skills · 146 tokens