test-tagging
できること
このスキルは、既存のテストに標準的なカテゴリのラベル(トレイト)を付け、テストスイートの分布を報告します。正常系と異常系など、テストの構成を見たいチーム向けです。
使う場面
- ✓スイート内のすべてのテストに、標準的なカテゴリの属性を付けたいとき。
- ✓テストが正常系と異常系にどう分かれているかの要約がほしいとき。
- ✓重要な経路に十分なテストがあるかを確認したいとき。
スキルのリンク
https://github.com/dotnet/skills/blob/main/plugins/dotnet-test/skills/test-tagging/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“すべてのテストに標準的なカテゴリを付け、正常系と異常系がそれぞれ何件あるかを示してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントはテスト名と本体を読み、各テストのトレイトで分類します。分類が明らかな箇所には標準の属性を付け、その分布を報告します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Test Trait Tagging
Analyze an existing test suite in any supported language and apply a standardized set of trait tags to each test method, giving teams visibility into their test distribution (positive vs. negative, critical-path coverage, smoke tests, etc.).
Language-specific guidance: Read the caller-provided or runtime-listed
test-analysis-extensionscatalog and its matching language file. The helper is reference-only, not an invocable skill. If absent, continue with the built-in framework table below and report the limitation.
When to Use
- Auditing a test project to understand the mix of test types
- Adding trait attributes to untagged tests
- Generating a summary report of trait distribution across a test suite
- Reviewing whether critical paths have sufficient coverage
When Not to Use
- Writing new tests from scratch (use
code-testingfor any language, orwriting-mstest-testsfor MSTest) - Running or filtering tests (use
run-testsfor .NET; equivalent native runners elsewhere) - Migrating between test frameworks
- General quality, smell, flakiness, or assertion audits (use
test-anti-patternsor the matching analysis skill) - Diagnostic .NET executed line/branch/Cobertura interpretation or project-wide CRAP risk (use
coverage-analysis); raw coverage collection (userun-testsfor .NET, native tooling otherwise) - CRAP analysis for a named method, class, or file (use
crap-score) - Behavioral gaps where a test would survive broken production logic (use
test-gap-analysis)
Inputs
| Input | Required | Description |
|---|---|---|
| Test project or files | No | Path to the test project, folder, or specific test files. Discover from the current workspace when omitted. |
| Scope | No | Infer from the verb: tag/apply edits, audit/classify/report is report-only, and both applies only when both are requested. If ambiguous, default to audit to avoid unrequested edits. Frameworks declared report-only always emit a report; convention-based frameworks edit only after the user confirms the convention. |
| Framework | No | Auto-detected. Override when detection fails. |
Trait Taxonomy
Use exactly these trait names and values. Do not invent new trait values outside this table.
| Trait Value | Meaning | Heuristics |
|---|---|---|
positive |
Verifies expected behavior under normal/valid conditions | Asserts success, valid output, expected state, no exceptions for valid input |
negative |
Verifies correct handling of invalid input, errors, or edge cases | Asserts exceptions, error codes, validation failures, rejects bad input |
boundary |
Tests limits, thresholds, empty/null/None/nil inputs, min/max values | Operates on 0, -1, int.MaxValue / sys.maxsize / Number.MAX_SAFE_INTEGER / math.MaxInt64 / i32::MAX, empty string, null/None/nil/undefined, empty collection, boundary of valid range |
critical-path |
Core workflow that must never break; breakage blocks users | Tests the primary success scenario of a key public API or user-facing feature |
smoke |
Quick sanity check that the system is operational | Fast, no complex setup, verifies basic wiring (e.g., service resolves, endpoint returns 200) |
regression |
Reproduces a specific previously-reported bug | References a bug ID, issue number, or describes a fix in its name or comments |
integration |
Crosses process, network, or persistence boundaries | Uses real database, HTTP client, file system, external service, or multi-component setup |
end-to-end |
Full user workflow spanning the entire application stack | Exercises a complete scenario from entry point to final result, distinct from single-boundary integration |
performance |
Validates timing, throughput, or resource consumption | Asserts on elapsed time, memory, allocations, or uses benchmark harness (BenchmarkDotNet, pytest-benchmark, benchmark.js, JMH, go test -bench, criterion.rs, XCTMetric, kotlinx-benchmark, Google Benchmark) |
security |
Verifies authentication, authorization, input sanitization, or secrets handling | Tests for SQL injection, XSS, CSRF, unauthorized access, token validation, permission checks |
concurrency |
Validates thread safety, parallelism, or async correctness | Uses Task.WhenAll / Parallel.ForEach / SemaphoreSlim (.NET); asyncio.gather / threading.Lock / multiprocessing (Python); Promise.all / worker threads |
よくある質問
テストを変更しますか?
標準の属性は、分類が明らかな場合にだけ付けます。それ以外は分類結果を報告するだけです。
テストを実行しますか?
いいえ。分類して報告します。テストの実行は別のスキルで扱います。
コードカバレッジの話ですか?
正確には違います。テストの種類の構成を示すもので、カバレッジは実行された行と分岐を扱います。
詳細
作者による元の説明
Classifies existing tests by standard traits and reports their distribution. USE FOR: tagging all tests with category attributes, categorizing/tagging/ labeling each test, compare happy vs error paths, audit the test mix, describe coverage shape by test type, or tag then verify the project builds. Read bodies when names mislead. Apply canonical attributes; otherwise report only. DO NOT USE FOR: requests owned by test-anti-patterns, coverage-analysis, crap-score, test-gap-analysis, code-testing, or migration skills.
repo: dotnet/skills
人気
- GitHubのスター
- 5.8k
- ランキング
- #14640
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
create-custom-agent
5.8kVisual Studio Codeのカスタムエージェントのファイルを、独自のツール、指示、ほかのエージェントへの引き継ぎとともに作るようエージェントを支援します。
create-skill
5.8k有効な名前、明確な発動の説明、規格に従うSKILL.mdファイルを持つ、新しいエージェントのスキルを作るようエージェントを支援します。
csharp-scripts
5.8k.NETのコマンドラインツールを使って、完全なプロジェクトを作らずに、小さなC#のプログラムを一つのファイルとして実行するようエージェントを支援します。
dotnet-pinvoke
5.8k署名、文字列の扱い、メモリ、安全なハンドルを含めて、ネイティブのC言語またはC++のライブラリを.NETから正しく呼び出すようエージェントを支援します。
似ているスキル
test-driven-development
311k機能や修正を作る前に、まず失敗するテストを書き、それが失敗するのを確認してから、合格させる最小のコードを書くようエージェントに教えます。
verification-before-completion
311kタスク、修正、ビルドが完了した、または合格したと主張する前に、実際のチェックを実行し、その出力を読むようエージェントに教えます。
migrate-to-shoehorn
310kテストファイル内の危険な型キャストを、shoehornライブラリに置き換え、テストが部分的なデータを使いつつ型チェックを通るようにします。