From 7edce2ef78940357c3fa606c806ffc1297149e27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Fri, 26 Jun 2026 11:03:18 +0200 Subject: [PATCH 1/2] Add MSTest deflection to assertion-quality and test-anti-patterns skills The writing-mstest-tests skill failed to activate in the plugin arm for six MSTest-specific scenarios (fix swapped Assert.AreEqual, modernize legacy patterns, type/string assertions, DynamicData with ValueTuples) because sibling skills captured the routing. assertion-quality and test-anti-patterns matched these prompts but lacked explicit deflection to writing-mstest-tests. Add DO NOT USE entries pointing MSTest test writing/fixing/modernizing to writing-mstest-tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- plugins/dotnet-test/skills/assertion-quality/SKILL.md | 2 +- plugins/dotnet-test/skills/test-anti-patterns/SKILL.md | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/dotnet-test/skills/assertion-quality/SKILL.md b/plugins/dotnet-test/skills/assertion-quality/SKILL.md index 6f9c6ad7f9..dbd1241e95 100644 --- a/plugins/dotnet-test/skills/assertion-quality/SKILL.md +++ b/plugins/dotnet-test/skills/assertion-quality/SKILL.md @@ -1,6 +1,6 @@ --- name: assertion-quality -description: "Analyzes the variety and depth of assertions across test suites in any language. Use when the user asks to evaluate assertion quality, find shallow tests, identify assertion-free tests (no assertions or only trivial ones like Assert.IsNotNull / toBeTruthy()), flag self-referential or tautological assertions, measure assertion diversity, or audit whether tests verify different facets of behavior. Polyglot: .NET, Python, TS/JS, Java, Go, Ruby, Rust, Swift, Kotlin, PowerShell, C++. DO NOT USE FOR: writing new tests (use code-testing-agent / writing-mstest-tests), mutation reasoning about whether tests would catch a bug (use test-gap-analysis), or a general severity-ranked anti-pattern audit (use test-anti-patterns); fixing assertions." +description: "Analyzes the variety and depth of assertions across test suites in any language. Use when the user asks to evaluate assertion quality, find shallow tests, identify assertion-free tests (no assertions or only trivial ones like Assert.IsNotNull / toBeTruthy()), flag self-referential or tautological assertions, measure assertion diversity, or audit whether tests verify different facets of behavior. Polyglot: .NET, Python, TS/JS, Java, Go, Ruby, Rust, Swift, Kotlin, PowerShell, C++. DO NOT USE FOR: writing new tests (use code-testing-agent / writing-mstest-tests), mutation reasoning about whether tests would catch a bug (use test-gap-analysis), or a general severity-ranked anti-pattern audit (use test-anti-patterns); or writing, fixing, or modernizing MSTest tests, assertions, or attributes (use writing-mstest-tests)." license: MIT --- diff --git a/plugins/dotnet-test/skills/test-anti-patterns/SKILL.md b/plugins/dotnet-test/skills/test-anti-patterns/SKILL.md index e262a89b1d..310e9584b7 100644 --- a/plugins/dotnet-test/skills/test-anti-patterns/SKILL.md +++ b/plugins/dotnet-test/skills/test-anti-patterns/SKILL.md @@ -13,7 +13,8 @@ description: > USE FOR: writing new tests (use code-testing-agent); running tests (use run-tests); migration; assertion-diversity metrics (use assertion-quality); coverage/CRAP metrics (use coverage-analysis); the testsmells.org academic - catalog (use test-smell-detection). + catalog (use test-smell-detection); fixing or modernizing MSTest tests, + assertions, attributes, or lifecycle (use writing-mstest-tests). license: MIT --- From b9982a6b391d1343623eb8d4bbc6b1d1e1b024bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Fri, 26 Jun 2026 11:20:54 +0200 Subject: [PATCH 2/2] Address review: restore general assertion-fix deflection, align test-anti-patterns - assertion-quality: restore the general 'fixing or rewriting assertions' deflection (dropped in the prior edit) alongside the MSTest deflection, and fix punctuation to use comma-separated DO NOT USE items. - test-anti-patterns: align the 'writing new tests' deflection to also point MSTest test-writing to writing-mstest-tests, matching the body guidance. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- plugins/dotnet-test/skills/assertion-quality/SKILL.md | 2 +- plugins/dotnet-test/skills/test-anti-patterns/SKILL.md | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/dotnet-test/skills/assertion-quality/SKILL.md b/plugins/dotnet-test/skills/assertion-quality/SKILL.md index dbd1241e95..a77e41fcfa 100644 --- a/plugins/dotnet-test/skills/assertion-quality/SKILL.md +++ b/plugins/dotnet-test/skills/assertion-quality/SKILL.md @@ -1,6 +1,6 @@ --- name: assertion-quality -description: "Analyzes the variety and depth of assertions across test suites in any language. Use when the user asks to evaluate assertion quality, find shallow tests, identify assertion-free tests (no assertions or only trivial ones like Assert.IsNotNull / toBeTruthy()), flag self-referential or tautological assertions, measure assertion diversity, or audit whether tests verify different facets of behavior. Polyglot: .NET, Python, TS/JS, Java, Go, Ruby, Rust, Swift, Kotlin, PowerShell, C++. DO NOT USE FOR: writing new tests (use code-testing-agent / writing-mstest-tests), mutation reasoning about whether tests would catch a bug (use test-gap-analysis), or a general severity-ranked anti-pattern audit (use test-anti-patterns); or writing, fixing, or modernizing MSTest tests, assertions, or attributes (use writing-mstest-tests)." +description: "Analyzes the variety and depth of assertions across test suites in any language. Use when the user asks to evaluate assertion quality, find shallow tests, identify assertion-free tests (no assertions or only trivial ones like Assert.IsNotNull / toBeTruthy()), flag self-referential or tautological assertions, measure assertion diversity, or audit whether tests verify different facets of behavior. Polyglot: .NET, Python, TS/JS, Java, Go, Ruby, Rust, Swift, Kotlin, PowerShell, C++. DO NOT USE FOR: writing new tests (use code-testing-agent / writing-mstest-tests), mutation reasoning about whether tests would catch a bug (use test-gap-analysis), or a general severity-ranked anti-pattern audit (use test-anti-patterns), fixing or rewriting assertions, or writing, fixing, or modernizing MSTest tests, assertions, or attributes (use writing-mstest-tests)." license: MIT --- diff --git a/plugins/dotnet-test/skills/test-anti-patterns/SKILL.md b/plugins/dotnet-test/skills/test-anti-patterns/SKILL.md index 310e9584b7..cdcabca43d 100644 --- a/plugins/dotnet-test/skills/test-anti-patterns/SKILL.md +++ b/plugins/dotnet-test/skills/test-anti-patterns/SKILL.md @@ -10,7 +10,8 @@ description: > coverage-touching tests, broad exceptions, flaky or order-dependent tests (Thread.Sleep, DateTime.Now, shared state), duplicated tests, or magic values — in .NET, Python/pytest, TS/Jest, Java, Go, Ruby or C++. DO NOT - USE FOR: writing new tests (use code-testing-agent); running tests (use + USE FOR: writing new tests (use code-testing-agent, or writing-mstest-tests + for MSTest); running tests (use run-tests); migration; assertion-diversity metrics (use assertion-quality); coverage/CRAP metrics (use coverage-analysis); the testsmells.org academic catalog (use test-smell-detection); fixing or modernizing MSTest tests,