[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M76SECH121TPWNQF64TJ5DQ4":3,"skill-same:01M76SECH121TPWNQF64TJ5DQ4":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":14,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M76SECH121TPWNQF64TJ5DQ4","test-anti-patterns",null,"Audits existing .NET test code (MSTest, xUnit, NUnit, TUnit) for anti-patterns and quality issues that undermine reliability and diagnostic value — produces a severity-ranked report (Critical \u002F Warning \u002F Info) with concrete code-level fixes and acknowledgement of what the tests do well. INVOKE THIS SKILL when the user asks to audit, review, rank, or find problems in existing tests — including prompts about: \"audit my tests\", \"audit for .NET test anti-patterns\", \"test smell audit\", \"rank by severity\", \"are these tests good\", tests that pass but verify nothing, no\u002Fmissing assertions, swallowed exceptions, always-true \u002F self-comparing \u002F self-referential \u002F tautological assertions, broad exception types, flakiness (Thread.Sleep, DateTime.Now), ordering dependency, shared static state, reflection coupling, duplicated tests, magic values, coverage touching, coverage inflation. DO NOT USE FOR: writing new tests (use writing-mstest-tests); running tests (use run-tests); framework migration (use migration skills).","weiflycc-cmd\u002Fskills","weiflycc-cmd","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F250846518?v=4","01M756C4PFGZJWKK04WFB9S5XF","威飛工作室","01M756C4QJJ66QDXN2RN6SXY87",0,"MIT","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet-test\u002Fskills\u002Ftest-anti-patterns\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: test-anti-patterns\ndescription: >\n  Audits existing .NET test code (MSTest, xUnit, NUnit, TUnit) for\n  anti-patterns and quality issues that undermine reliability and diagnostic\n  value — produces a severity-ranked report (Critical \u002F Warning \u002F Info) with\n  concrete code-level fixes and acknowledgement of what the tests do well.\n  INVOKE THIS SKILL when the user asks to audit, review, rank, or find\n  problems in existing tests — including prompts about: \"audit my tests\",\n  \"audit for .NET test anti-patterns\", \"test smell audit\", \"rank by\n  severity\", \"are these tests good\", tests that pass but verify nothing,\n  no\u002Fmissing assertions, swallowed exceptions, always-true \u002F self-comparing\n  \u002F self-referential \u002F tautological assertions, broad exception types,\n  flakiness (Thread.Sleep, DateTime.Now), ordering dependency, shared\n  static state, reflection coupling, duplicated tests, magic values,\n  coverage touching, coverage inflation.\n  DO NOT USE FOR: writing new tests (use writing-mstest-tests); running\n  tests (use run-tests); framework migration (use migration skills).\nlicense: MIT\n---\n\n# Test Anti-Pattern Detection\n\nQuick, pragmatic analysis of .NET test code for anti-patterns and quality issues that undermine test reliability, maintainability, and diagnostic value.\n\n## When to Use\n\n- User asks to review test quality or find test smells\n- User wants to know why tests are flaky or unreliable\n- User asks \"are my tests good?\" or \"what's wrong with my tests?\"\n- User requests a test audit or test code review\n- User wants to improve existing test code\n\n## When Not to Use\n\n- User wants to write new tests from scratch (use `writing-mstest-tests`)\n- User wants direct implementation fixes in MSTest code rather than a diagnostic review (use `writing-mstest-tests`)\n- User asks to fix swapped `Assert.AreEqual` argument order (use `writing-mstest-tests`)\n- User asks to convert `DynamicData` from `IEnumerable\u003Cobject[]>` to `ValueTuple` (use `writing-mstest-tests`)\n- User wants to run or execute tests (use `run-tests`)\n- User wants to migrate between test frameworks or versions (use migration skills)\n- User wants to measure code coverage (out of scope)\n- User wants a deep formal test smell audit with academic taxonomy and extended catalog (use `test-smell-detection`)\n\n## Inputs\n\n| Input | Required | Description |\n|-------|----------|-------------|\n| Test code | Yes | One or more test files or classes to analyze |\n| Production code | No | The code under test, for context on what tests should verify |\n| Specific concern | No | A focused area like \"flakiness\" or \"naming\" to narrow the review |\n\n## Workflow\n\n### Step 1: Gather the test code\n\nRead the test files the user wants reviewed. If the user points to a directory or project, scan for all test files using the framework-specific markers in the `dotnet-test-frameworks` skill (e.g., `[TestClass]`, `[Fact]`, `[Test]`).\n\nIf production code is available, read it too -- this is critical for detecting tests that are coupled to implementation details rather than behavior.\n\n### Step 2: Scan for anti-patterns\n\nCheck each test file against the anti-pattern catalog below. Report findings grouped by severity.\n\n#### Critical -- Tests that give false confidence\n\n| Anti-Pattern | What to Look For |\n|---|---|\n| **No assertions** | Test methods that execute code but never assert anything. A passing test without assertions proves nothing. |\n| **Coverage touching** | Test class that methodically calls every public method on a type — often in alphabetical or declaration order — without asserting meaningful outcomes. Each test typically does `var result = sut.MethodName(...)` with no assertion, or only a trivial `Assert.IsNotNull(result)`. The intent is to inflate code-coverage metrics rather than verify behavior. Distinct from a single assertion-free test: the pattern is *systematic* coverage of the surface area with no real verification. |\n| **Self-referential assertion** | Asserts that the output of an operation equals its input when the operation is expected to be an identity or no-op, e.g. `Assert.AreEqual(input, Parse(input.ToString()))` or `Assert.AreEqual(x, Identity(x))`. The test is tautological — it can only fail if the round-trip is broken, but it never verifies that a *transformation* actually happened. Also catches `Assert.AreEqual(dto.Name, dto.Name)` (asserting a field against itself). |\n| **Swallowed exceptions** | `try { ... } catch { }` or `catch (Exception)` without rethrowing or asserting. Failures are silently hidden. |\n| **Assert in catch block only** | `try { Act(); } catch (Exception ex) { Assert.Fail(ex.Message); }` -- use `Assert.ThrowsException` or equivalent instead. The test passes when no exception is thrown even if the result is wrong. |\n| **Always-true assertions** | `Assert.IsTrue(true)`, `Assert.AreEqual(x, x)`, or conditions that can never fail. |\n| **Commented-out assertions** | Assertions that were disabled but the test still runs, giving the illusion of coverage. |\n\n#### High -- Tests likely to cause pain\n\n| Anti-Pattern | What to Look For |\n|---|---|\n| **Flakiness indicators** | `Thread.Sleep(...)`, `Task.Delay(...)` for synchronization, `DateTime.Now`\u002F`DateTime.UtcNow` without abstraction, `Random` without a seed, environment-dependent paths. |\n| **Test ordering dependency** | Static mutable fields modified across tests, `[TestInitialize]` that doesn't fully reset state, tests that fail when run individually but pass in suite (or vice versa). |\n| **Over-mocking** | More mock setup lines than actual test logic. Verifying exact call sequences on mocks rather than outcomes. Mocking types the test owns. For a deep mock audit, use `exp-mock-usage-analysis`. |\n| **Implementation coupling** | Testing private methods via reflection, asserting on internal state, verifying exact method call counts on collaborators instead of observable behavior. |\n| **Broad exception assertions** | `Assert.ThrowsException\u003CException>(...)` instead of the specific exception type. Also: `[ExpectedException(typeof(Exception))]`. |\n\n#### Medium -- Maintainability and clarity issues\n\n| Anti-Pattern | What to Look For |\n|---|---|\n| **Poor naming** | Test names like `Test1`, `TestMethod`, names that don't describe the scenario or expected outcome. Good: `Add_NegativeNumber_ThrowsArgumentException`. |\n| **Magic values** | Unexplained numbers or strings in arrange\u002Fassert: `Assert.AreEqual(42, result)` -- what does 42 mean? |\n| **Duplicate tests** | Three or more test methods with near-identical bodies that differ only in a single input value. Should be data-driven (`[DataRow]`, `[Theory]`, `[TestCase]`). For a detailed duplication analysis, use `exp-test-maintainability`. Note: Two tests covering distinct boundary conditions (e.g., zero vs. negative) are NOT duplicates -- separate tests for different edge cases provide clearer failure diagnostics and are a valid practice. |\n| **Giant tests** | Test methods exceeding ~30 lines or testing multiple behaviors at once. Hard to diagnose when they fail. |\n| **Assertion messages that repeat the assertion** | `Assert.AreEqual(expected, actual, \"Expected and actual are not equal\")` adds no information. Messages should describe the business meaning. |\n| **Missing AAA separation** | Arrange, Act, Assert phases are interleaved or indistinguishable. |\n\n#### Low -- Style and hygiene\n\n| Anti-Pattern | What to Look For |\n|---|---|\n| **Unused test infrastructure** | `[TestInitialize]`\u002F`[SetUp]` that does nothing, test helper methods that are never called. |\n| **IDisposable not disposed** | Test creates `HttpClient`, `Stream`, or other disposable objects without `using` or cleanup. |\n| **Console.WriteLine debugging** | Leftover `Console.WriteLine` or `Debug.WriteLine` statements used during test development. |\n| **Inconsistent naming convention** | Mix of naming styles in the same test class (e.g., some use `Method_Scenario_Expected`, others use `ShouldDoSomething`). |\n\n### Step 3: Calibrate severity honestly\n\nBefore reporting, re-check each finding against these severity rules:\n\n- **Critical\u002FHigh**: Only for issues that cause tests to give false confidence or be unreliable. A test that always passes regardless of correctness is Critical. Flaky shared state is High.\n- **Medium**: Only for issues that actively harm maintainability -- 5+ nearly-identical tests, truly meaningless names like `Test1`.\n- **Low**: Cosmetic naming mismatches, minor style preferences, assertion messages that could be better. When in doubt, rate Low.\n- **Not an issue**: Separate tests for distinct boundary conditions (zero vs. negative vs. null). Explicit per-test setup instead of `[TestInitialize]` (this *improves* isolation). Tests that are short and clear but could theoretically be consolidated.\n\nIMPORTANT: If the tests are well-written, say so clearly up front. Do not inflate severity to justify the review. A review that finds zero Critical\u002FHigh issues and only minor Low suggestions is a valid and valuable outcome. Lead with what the tests do well.\n\n### Step 4: Report findings\n\nPresent findings in this structure:\n\n1. **Summary** -- Total issues found, broken down by severity (Critical \u002F High \u002F Medium \u002F Low). If tests are well-written, lead with that assessment.\n2. **Critical and High findings** -- List each with:\n   - The anti-pattern name\n   - The specific location (file, method name, line)\n   - A brief explanation of why it's a problem\n   - A concrete fix (show before\u002Fafter code when helpful)\n3. **Medium and Low findings** -- Summarize in a table unless the user wants full detail\n4. **Positive observations** -- Call out things the tests do well (sealed class, specific exception types, data-driven tests, clear AAA structure, proper use of fakes, good naming). Don't only report negatives.\n\n### Step 5: Prioritize recommendations\n\nIf there are many findings, recommend which to fix first:\n\n1. **Critical** -- Fix immediately, these tests may be giving false confidence\n2. **High** -- Fix soon, these cause flakiness or maintenance burden\n3. **Medium\u002FLow** -- Fix opportunistically during related edits\n\n## Validation\n\n- [ ] Every finding includes a specific location (not just a general warning)\n- [ ] Every Critical\u002FHigh finding includes a concrete fix\n- [ ] Report covers all categories (assertions, isolation, naming, structure)\n- [ ] Positive observations are included alongside problems\n- [ ] Recommendations are prioritized by severity\n\n## Common Pitfalls\n\n| Pitfall | Solution |\n|---------|----------|\n| Reporting style issues as critical | Naming and formatting are Medium\u002FLow, never Critical |\n| Suggesting rewrites instead of targeted fixes | Show minimal diffs -- change the assertion, not the whole test |\n| Flagging intentional design choices | If `Thread.Sleep` is in an integration test testing actual timing, that's not an anti-pattern. Consider context. |\n| Inventing false positives on clean code | If tests follow best practices, say so. A review finding \"0 Critical, 0 High, 1 Low\" is perfectly valid. Don't inflate findings to justify the review. |\n| Flagging separate boundary tests as duplicates | Two tests for zero and negative inputs test different edge cases. Only flag as duplicates when 3+ tests have truly identical bodies differing by a single value. |\n| Rating cosmetic issues as Medium | Naming mismatches (e.g., method name says `ArgumentException` but asserts `ArgumentOutOfRangeException`) are Low, not Medium -- the test still works correctly. |\n| Ignoring the test framework | xUnit uses `[Fact]`\u002F`[Theory]`, NUnit uses `[Test]`\u002F`[TestCase]`, MSTest uses `[TestMethod]`\u002F`[DataRow]` -- use correct terminology |\n| Missing the forest for the trees | If 80% of tests have no assertions, lead with that systemic issue rather than listing every instance |\n","# Test Anti-Pattern Detection\n\nQuick, pragmatic analysis of .NET test code for anti-patterns and quality issues that undermine test reliability, maintainability, and diagnostic value.\n\n## When to Use\n\n- User asks to review test quality or find test smells\n- User wants to know why tests are flaky or unreliable\n- User asks \"are my tests good?\" or \"what's wrong with my tests?\"\n- User requests a test audit or test code review\n- User wants to improve existing test code\n\n## When Not to Use\n\n- User wants to write new tests from scratch (use `writing-mstest-tests`)\n- User wants direct implementation fixes in MSTest code rather than a diagnostic review (use `writing-mstest-tests`)\n- User asks to fix swapped `Assert.AreEqual` argument order (use `writing-mstest-tests`)\n- User asks to convert `DynamicData` from `IEnumerable\u003Cobject[]>` to `ValueTuple` (use `writing-mstest-tests`)\n- User wants to run or execute tests (use `run-tests`)\n- User wants to migrate between test frameworks or versions (use migration skills)\n- User wants to measure code coverage (out of scope)\n- User wants a deep formal test smell audit with academic taxonomy and extended catalog (use `test-smell-detection`)\n\n## Inputs\n\n| Input | Required | Description |\n|-------|----------|-------------|\n| Test code | Yes | One or more test files or classes to analyze |\n| Production code | No | The code under test, for context on what tests should verify |\n| Specific concern | No | A focused area like \"flakiness\" or \"naming\" to narrow the review |\n\n## Workflow\n\n### Step 1: Gather the test code\n\nRead the test files the user wants reviewed. If the user points to a directory or project, scan for all test files using the framework-specific markers in the `dotnet-test-frameworks` skill (e.g., `[TestClass]`, `[Fact]`, `[Test]`).\n\nIf production code is available, read it too -- this is critical for detecting tests that are coupled to implementation details rather than behavior.\n\n### Step 2: Scan for anti-patterns\n\nCheck each test file against the anti-pattern catalog below. Report findings grouped by severity.\n\n#### Critical -- Tests that give false confidence\n\n| Anti-Pattern | What to Look For |\n|---|---|\n| **No assertions** | Test methods that execute code but never assert anything. A passing test without assertions proves nothing. |\n| **Coverage touching** | Test class that methodically calls every public method on a type — often in alphabetical or declaration order — without asserting meaningful outcomes. Each test typically does `var result = sut.MethodName(...)` with no assertion, or only a trivial `Assert.IsNotNull(result)`. The intent is to inflate code-coverage metrics rather than verify behavior. Distinct from a single assertion-free test: the pattern is *systematic* coverage of the surface area with no real verification. |\n| **Self-referential assertion** | Asserts that the output of an operation equals its input when the operation is expected to be an identity or no-op, e.g. `Assert.AreEqual(input, Parse(input.ToString()))` or `Assert.AreEqual(x, Identity(x))`. The test is tautological — it can only fail if the round-trip is broken, but it never verifies that a *transformation* actually happened. Also catches `Assert.AreEqual(dto.Name, dto.Name)` (asserting a field against itself). |\n| **Swallowed exceptions** | `try { ... } catch { }` or `catch (Exception)` without rethrowing or asserting. Failures are silently hidden. |\n| **Assert in catch block only** | `try { Act(); } catch (Exception ex) { Assert.Fail(ex.Message); }` -- use `Assert.ThrowsException` or equivalent instead. The test passes when no exception is thrown even if the result is wrong. |\n| **Always-true assertions** | `Assert.IsTrue(true)`, `Assert.AreEqual(x, x)`, or conditions that can never fail. |\n| **Commented-out assertions** | Assertions that were disabled but the test still runs, giving the illusion of coverage. |\n\n#### High -- Tests likely to cause pain\n\n| Anti-Pattern | What to Look For |\n|---|---|\n| **Flakiness indicators** | `Thread.Sleep(...)`, `Task.Delay(...)` for synchronization, `DateTime.Now`\u002F`DateTime.UtcNow` without abstraction, `Random` without a seed, environment-dependent paths. |\n| **Test ordering dependency** | Static mutable fields modified across tests, `[TestInitialize]` that doesn't fully reset state, tests that fail when run individually but pass in suite (or vice versa). |\n| **Over-mocking** | More mock setup lines than actual test logic. Verifying exact call sequences on mocks rather than outcomes. Mocking types the test owns. For a deep mock audit, use `exp-mock-usage-analysis`. |\n| **Implementation coupling** | Testing private methods via reflection, asserting on internal state, verifying exact method call counts on collaborators instead of observable behavior. |\n| **Broad exception assertions** | `Assert.ThrowsException\u003CException>(...)` instead of the specific exception type. Also: `[ExpectedException(typeof(Exception))]`. |\n\n#### Medium -- Maintainability and clarity issues\n\n| Anti-Pattern | What to Look For |\n|---|---|\n| **Poor naming** | Test names like `Test1`, `TestMethod`, names that don't describe the scenario or expected outcome. Good: `Add_NegativeNumber_ThrowsArgumentException`. |\n| **Magic values** | Unexplained numbers or strings in arrange\u002Fassert: `Assert.AreEqual(42, result)` -- what does 42 mean? |\n| **Duplicate tests** | Three or more test methods with near-identical bodies that differ only in a single input value. Should be data-driven (`[DataRow]`, `[Theory]`, `[TestCase]`). For a detailed duplication analysis, use `exp-test-maintainability`. Note: Two tests covering distinct boundary conditions (e.g., zero vs. negative) are NOT duplicates -- separate tests for different edge cases provide clearer failure diagnostics and are a valid practice. |\n| **Giant tests** | Test methods exceeding ~30 lines or testing multiple behaviors at once. Hard to diagnose when they fail. |\n| **Assertion messages that repeat the assertion** | `Assert.AreEqual(expected, actual, \"Expected and actual are not equal\")` adds no information. Messages should describe the business meaning. |\n| **Missing AAA separation** | Arrange, Act, Assert phases are interleaved or indistinguishable. |\n\n#### Low -- Style and hygiene\n\n| Anti-Pattern | What to Look For |\n|---|---|\n| **Unused test infrastructure** | `[TestInitialize]`\u002F`[SetUp]` that does nothing, test helper methods that are never called. |\n| **IDisposable not disposed** | Test creates `HttpClient`, `Stream`, or other disposable objects without `using` or cleanup. |\n| **Console.WriteLine debugging** | Leftover `Console.WriteLine` or `Debug.WriteLine` statements used during test development. |\n| **Inconsistent naming convention** | Mix of naming styles in the same test class (e.g., some use `Method_Scenario_Expected`, others use `ShouldDoSomething`). |\n\n### Step 3: Calibrate severity honestly\n\nBefore reporting, re-check each finding against these severity rules:\n\n- **Critical\u002FHigh**: Only for issues that cause tests to give false confidence or be unreliable. A test that always passes regardless of correctness is Critical. Flaky shared state is High.\n- **Medium**: Only for issues that actively harm maintainability -- 5+ nearly-identical tests, truly meaningless names like `Test1`.\n- **Low**: Cosmetic naming mismatches, minor style preferences, assertion messages that could be better. When in doubt, rate Low.\n- **Not an issue**: Separate tests for distinct boundary conditions (zero vs. negative vs. null). Explicit per-test setup instead of `[TestInitialize]` (this *improves* isolation). Tests that are short and clear but could theoretically be consolidated.\n\nIMPORTANT: If the tests are well-written, say so clearly up front. Do not inflate severity to justify the review. A review that finds zero Critical\u002FHigh issues and only minor Low suggestions is a valid and valuable outcome. Lead with what the tests do well.\n\n### Step 4: Report findings\n\nPresent findings in this structure:\n\n1. **Summary** -- Total issues found, broken down by severity (Critical \u002F High \u002F Medium \u002F Low). If tests are well-written, lead with that assessment.\n2. **Critical and High findings** -- List each with:\n   - The anti-pattern name\n   - The specific location (file, method name, line)\n   - A brief explanation of why it's a problem\n   - A concrete fix (show before\u002Fafter code when helpful)\n3. **Medium and Low findings** -- Summarize in a table unless the user wants full detail\n4. **Positive observations** -- Call out things the tests do well (sealed class, specific exception types, data-driven tests, clear AAA structure, proper use of fakes, good naming). Don't only report negatives.\n\n### Step 5: Prioritize recommendations\n\nIf there are many findings, recommend which to fix first:\n\n1. **Critical** -- Fix immediately, these tests may be giving false confidence\n2. **High** -- Fix soon, these cause flakiness or maintenance burden\n3. **Medium\u002FLow** -- Fix opportunistically during related edits\n\n## Validation\n\n- [ ] Every finding includes a specific location (not just a general warning)\n- [ ] Every Critical\u002FHigh finding includes a concrete fix\n- [ ] Report covers all categories (assertions, isolation, naming, structure)\n- [ ] Positive observations are included alongside problems\n- [ ] Recommendations are prioritized by severity\n\n## Common Pitfalls\n\n| Pitfall | Solution |\n|---------|----------|\n| Reporting style issues as critical | Naming and formatting are Medium\u002FLow, never Critical |\n| Suggesting rewrites instead of targeted fixes | Show minimal diffs -- change the assertion, not the whole test |\n| Flagging intentional design choices | If `Thread.Sleep` is in an integration test testing actual timing, that's not an anti-pattern. Consider context. |\n| Inventing false positives on clean code | If tests follow best practices, say so. A review finding \"0 Critical, 0 High, 1 Low\" is perfectly valid. Don't inflate findings to justify the review. |\n| Flagging separate boundary tests as duplicates | Two tests for zero and negative inputs test different edge cases. Only flag as duplicates when 3+ tests have truly identical bodies differing by a single value. |\n| Rating cosmetic issues as Medium | Naming mismatches (e.g., method name says `ArgumentException` but asserts `ArgumentOutOfRangeException`) are Low, not Medium -- the test still works correctly. |\n| Ignoring the test framework | xUnit uses `[Fact]`\u002F`[Theory]`, NUnit uses `[Test]`\u002F`[TestCase]`, MSTest uses `[TestMethod]`\u002F`[DataRow]` -- use correct terminology |\n| Missing the forest for the trees | If 80% of tests have no assertions, lead with that systemic issue rather than listing every instance |\n",{"name":5,"license":15,"description":24},"Audits existing .NET test code (MSTest, xUnit, NUnit, TUnit) for anti-patterns and quality issues that undermine reliability and diagnostic value — produces a severity-ranked report (Critical \u002F Warning \u002F Info) with concrete code-level fixes and acknowledgement of what the tests do well. INVOKE THIS SKILL when the user asks to audit, review, rank, or find problems in existing tests — including prompts about: \"audit my tests\", \"audit for .NET test anti-patterns\", \"test smell audit\", \"rank by severity\", \"are these tests good\", tests that pass but verify nothing, no\u002Fmissing assertions, swallowed exceptions, always-true \u002F self-comparing \u002F self-referential \u002F tautological assertions, broad exception types, flakiness (Thread.Sleep, DateTime.Now), ordering dependency, shared static state, reflection coupling, duplicated tests, magic values, coverage touching, coverage inflation. DO NOT USE FOR: writing new tests (use writing-mstest-tests); running tests (use run-tests); framework migration (use migration skills).\n","main","5810d492c9b301d8227f932bf87b5c954c4fa4d6","plugins\u002Fdotnet-test\u002Fskills\u002Ftest-anti-patterns","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd","weiflycc.com","2026-11-10 03:26:55",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add weiflycc-cmd\u002Fskills --skill test-anti-patterns",{"tool":38,"command":39},"bunx","bunx skills add weiflycc-cmd\u002Fskills --skill test-anti-patterns",{"tool":41,"command":42},"pnpm","pnpm dlx skills add weiflycc-cmd\u002Fskills --skill test-anti-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet-test\u002Fskills\u002Ftest-anti-patterns\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M76SGT4WG5682JQJ0V3NSK6X","system-text-json-net11","Provides guidance on new System.Text.Json APIs introduced in .NET 11. It covers typed JsonTypeInfo access via GetTypeInfo\u003CT> and TryGetTypeInfo\u003CT> on JsonSerializerOptions, and the new JsonNamingPolicy.PascalCase static property. Use when serializing or deserializing JSON in .NET 11 applications and needing typed metadata access or PascalCase property naming.","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet11\u002Fskills\u002Fsystem-text-json-net11\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M76SGPNZYYV9BCZJW7BF7J8A","nuget-trusted-publishing","Set up NuGet trusted publishing (OIDC) on a GitHub Actions repo — replaces long-lived API keys with short-lived tokens. USE FOR: trusted publishing, NuGet OIDC, keyless NuGet publish, migrate from NuGet API key, NuGet\u002Flogin, secure NuGet publishing. DO NOT USE FOR: publishing to private feeds or Azure Artifacts (OIDC is nuget.org only). INVOKES: shell (powershell or bash), edit, create, ask_user for guided repo setup.","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet\u002Fskills\u002Fnuget-trusted-publishing\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M76SGHVNBNVM1DMVDYTMAE5G","dotnet-pinvoke","Correctly call native (C\u002FC++) libraries from .NET using P\u002FInvoke and LibraryImport. Covers function signatures, string marshalling, memory lifetime, SafeHandle, and cross-platform patterns. USE FOR: writing new P\u002FInvoke or LibraryImport declarations, reviewing or debugging existing native interop code, wrapping a C or C++ library for use in .NET, diagnosing crashes, memory leaks, or corruption at the managed\u002Fnative boundary. DO NOT USE FOR: COM interop, C++\u002FCLI mixed-mode assemblies, or pure managed code with no native dependencies.","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet\u002Fskills\u002Fdotnet-pinvoke\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M76SGDB9Z3GSB1CFW314NC84","csharp-scripts","Run file-based C# apps with the .NET CLI when the user explicitly wants C#\u002F.NET code without creating a project. Use for C# language\u002FAPI experiments, one-file C# apps, small multi-file C# apps composed with `#:include`\u002F`#:exclude`, or C# file-based apps linked with `#:ref`. Do not use for language-agnostic throwaway scripts, generic computations, Python\u002FPowerShell-style automation, full projects, or existing app integration.","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet\u002Fskills\u002Fcsharp-scripts\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M76SG805T8W764WAKB1NP3CJ","thread-abort-migration","Guides migration of .NET Framework Thread.Abort usage to cooperative cancellation in modern .NET. USE FOR: modernizing code that calls Thread.Abort, catching ThreadAbortException, replacing Thread.ResetAbort, replacing Thread.Interrupt for thread termination, resolving PlatformNotSupportedException or SYSLIB0006 after retargeting to .NET 6+, migrating ASP.NET Response.End or Response.Redirect(url, true) which internally call Thread.Abort. DO NOT USE FOR: code that only uses Thread.Join, Thread.Sleep, or Thread.Start without any abort, interrupt, or ThreadAbortException usage — these APIs work identically in modern .NET and need no migration. Also not for projects staying on .NET Framework, or Thread.Abort usage inside third-party libraries you do not control.","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet-upgrade\u002Fskills\u002Fthread-abort-migration\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M76SG2588ZJBE5C51HYJJSKV","migrate-nullable-references","Enable nullable reference types in a C# project and systematically resolve all warnings. USE FOR: adopting NRTs in existing codebases, file-by-file or project-wide migration, fixing CS8602\u002FCS8618\u002FCS86xx warnings, annotating APIs for nullability, cleaning up null-forgiving operators, upgrading dependencies with new nullable annotations. DO NOT USE FOR: projects already fully migrated with zero warnings (unless auditing suppressions), fixing a handful of nullable warnings in code that already has NRTs enabled, suppressing warnings without fixing them, C# 7.3 or earlier projects. INVOKES: Get-NullableReadiness.ps1 scanner script.","https:\u002F\u002Fgithub.com\u002Fweiflycc-cmd\u002Fskills\u002Fblob\u002Fmain\u002Fplugins\u002Fdotnet-upgrade\u002Fskills\u002Fmigrate-nullable-references\u002FSKILL.md",[],[]]