[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79YAXKQ954HMP8K5CDNXW5M":3,"skill-same:01M79YAXKQ954HMP8K5CDNXW5M":48},{"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":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M79YAXKQ954HMP8K5CDNXW5M","test-anti-patterns",null,"Audits an existing test file or suite in any language for pragmatic anti-patterns and quality issues, producing a severity-ranked report. Use when asked to review tests, find false-confidence assertions, investigate flakiness or order dependence, identify duplication or magic values, or judge whether assertions repeatedly verify only one facet of behavior. DO NOT USE FOR: writing or running tests, coverage\u002FCRAP metrics, behavioral gap analysis, full assertion-diversity metrics, an academic smell catalog, or fixing the tests it audits (report-only).","Blind-Striker\u002Fagent-skills-and-plugins","Blind-Striker","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1965259?v=4","01M79WFXTE5PH0C1VB7B54ANMN","Deniz İrgin","01M79WFXV5KZ5GST1K8G035DM5",1,"MIT","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fplugins\u002Fdeniz-dotnet-general\u002Fskills\u002Ftest-anti-patterns\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: test-anti-patterns\ndescription: >\n  Audits an existing test file or suite in any language for pragmatic\n  anti-patterns and quality issues, producing a severity-ranked report. Use when\n  asked to review tests, find false-confidence assertions, investigate flakiness\n  or order dependence, identify duplication or magic values, or judge whether\n  assertions repeatedly verify only one facet of behavior. DO NOT USE FOR:\n  writing or running tests, coverage\u002FCRAP metrics, behavioral gap analysis, full\n  assertion-diversity metrics, an academic smell catalog, or fixing the tests it\n  audits (report-only).\nlicense: MIT\nuser-invocable: false\n---\n\n# Test Anti-Pattern Detection\n\nQuick, pragmatic analysis of test code in any supported language for anti-patterns and quality issues that undermine test reliability, maintainability, and diagnostic value.\n\n> **Language-specific guidance**: Load the `deniz-dotnet-general:test-analysis-extensions` skill and read its extension file matching the target codebase (e.g., `extensions\u002Fdotnet.md`, `extensions\u002Fpython.md`, `extensions\u002Ftypescript.md`, `extensions\u002Fgo.md`). The extension file tells you which sleep \u002F time \u002F random \u002F skip \u002F setup-teardown \u002F mystery-guest APIs to look for in that language. If its files are absent, use the built-in framework rules below.\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 diagnostic findings before deciding what to improve\n\n## When Not to Use\n\n- User wants to write new tests from scratch (out of scope; the user can invoke `\u002Fdeniz-dotnet-general:code-testing`)\n- User wants direct implementation fixes rather than a diagnostic review (use the relevant write\u002Fedit skill)\n- User wants to run or execute tests (use `run-tests` for .NET)\n- User wants to migrate between test frameworks or versions (use migration skills)\n- User wants coverage collection or coverage\u002FCRAP metrics\n- User asks whether tests would catch a bug or wants behavioral\u002Fpseudo-mutation gaps (use `test-gap-analysis`)\n- User wants test-mix or trait\u002Fcategory distributions\n- User wants a deep formal test-smell audit with an academic taxonomy\n\n## Inputs\n\n| Input | Required | Description |\n|-------|----------|-------------|\n| Test scope | No | Test files, classes, directory, or project to analyze. Discover from the current workspace when omitted. |\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: Detect language and load extension\n\nResolve the named test path from the current workspace before asking for input.\nWhen no path is supplied, discover test files under the current directory using\nthe repository manifests and conventional test markers. The skill context's\n`Base directory` is documentation storage, not the user's workspace; never\nresolve target files relative to it.\n\nIf one reader says a path is missing but a workspace glob\u002Fsearch finds it,\nnormalize that exact path and retry. Use a shell text reader (`sed`\u002F`cat` on\nUnix, `Get-Content` on PowerShell) only for a confirmed reader availability,\ntransport, or path-normalization failure and only after verifying the canonical\npath remains inside the current workspace. Stop on content-exclusion,\npermission\u002Fpolicy, workspace-boundary, or unknown failures. Audit any discovered\nfile that a permitted reader can access; never ask the user to paste it. If\nevery permitted reader fails, report the exact blocker without bypassing\nsecurity boundaries.\n\nIdentify the language and framework. Load the `deniz-dotnet-general:test-analysis-extensions`\nskill and read its extension file that matches them, resolving the filename\nrelative to that skill. Check only that skill's folder, never other installation\ndirectories. If it is unavailable, use the catalog below and report the\nreference limitation.\n\n### Step 2: Gather the test code\n\nInventory the resolved scope before reading bodies. For one file or class, read\nthat scope directly. For a project or suite, discover test files once, batch\nindependent reads where tools allow, and stop when every discovered test and\nclass-level fixture has a ledger disposition.\n\nUse extension discovery markers when loaded; otherwise use the built-in markers\nin this skill (attributes such as `[TestClass]`\u002F`[Fact]`\u002F`[Test]`,\n`test_*.py`, `*.test.*`, `*_test.go`, `*_spec.rb`, `#[test]`,\n`*.Tests.ps1`, `TEST(...)`, and `TEST_CASE(...)`).\n\nDo not read unrelated production code wholesale. Open the production symbol\ncorresponding to every suspicious test needed to decide whether an assertion,\ntransformation, identity contract, or adjacent gap is real. For a systematic\nfacade\u002Fsurface-area pattern, every invoked member is relevant: read the entire\nsmall production type or inspect each invoked member, then map each weak test to\nthe exact observable result, exception, state change, or boundary it should\nverify.\n\n### Step 3: Scan for anti-patterns\n\nCheck each test file against the anti-pattern catalog below. Report findings\ngrouped by severity. Use extension mappings when loaded; otherwise use the\ncross-framework examples in the catalog.\n\nBefore drafting the report, make a private completeness ledger with one row for\nevery test method and every class-level fixture\u002Fresource. Record its oracle (or\nabsence), exception handling, state\u002Ftime dependencies, concurrency safety,\nprecondition\u002Fassertion order, and disposition. Do not publish until every row is\neither attached to a finding or explicitly judged sound. In particular:\n\n- `actual != oldValue` is a weak mutation oracle: it accepts every wrong new\n  value. Require the exact expected value.\n- Include unused or undisposed class-level resources; method-only scans miss\n  fields such as a static `HttpClient`.\n- Treat an unsynchronized static\u002Fglobal collection as both order-coupled and\n  parallel-unsafe when tests read and write it. Also flag dereferencing a\n  nullable result before the assertion intended to prove it non-null.\n- When production code is supplied, note obvious untested contracts adjacent to\n  a finding, but do not perform exhaustive branch or mutation analysis. Route\n  that broader question to `test-gap-analysis`.\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. In .NET look for missing `Assert.*`; in pytest a function with no `assert` and no `pytest.raises`; in Jest no `expect(...)`; in JUnit no `assert*`\u002F`assertThat`; in Go a test that never calls `t.Error*`, `t.Fatal*`, or testify; in RSpec a block with no `expect`; in Pester no `Should`. Mock-call verifications (`verify(mock)`, `expect(mock).toHaveBeenCalled`, `Should -Invoke`) are real assertions. |\n| **Trivial-only assertions** | Tests whose only checks are null\u002Fpresence\u002Ftruthiness guards or constants, with no assertion on the value, state, structure, error, or side effect that defines the behavior. A guard followed by a meaningful assertion is not trivial-only. |\n| **Missing await on async assertions (JS\u002FTS, .NET, Python, Kotlin, Swift)** | `expect(promise).resolves.toBe(x)` without `await`\u002F`return`, `pytest-asyncio` test with un-awaited coroutine, `async Task` xUnit test calling `Assert.ThrowsAsync` without `await`, Kotest suspending test without `runTest`, Swift Testing async test without `await`. These tests silently pass even when the underlying assertion would have failed. |\n| **Coverage touching** | Test class that methodically calls every public member on a type — often in alphabetical or declaration order — without asserting meaningful outcomes. Each test typically does `var result = sut.MethodName(...)` (or `result = sut.method_name(...)`, `sut.methodName()`, `sut.MethodName(t)`) with no assertion, or only a trivial null\u002FNone\u002Fnil check. 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** | The expected value is computed from the same actual value, such as `Assert.AreEqual(dto.Name, dto.Name)`, `Assert.AreEqual(result, result)`, or equivalents. Do not apply this label merely because a valid identity, clone, serialization, or round-trip contract compares output with input: those assertions can fail. Instead check whether the input exercises a transformation and whether independently known representation, field, reference-identity, or invalid-input assertions are missing. |\n| **Swallowed exceptions** | `try { ... } catch { }`, `catch (Exception)` without rethrowing or asserting (.NET); bare `except:` or `except Exception:` with `pass` (Python); `try { ... } catch (e) {}` (JS\u002FTS\u002FJava); `defer recover()` without re-panic and no assertion (Go); `rescue StandardError` with no assertion (Ruby); `Result::unwrap_or(...)` swallowing errors in a test (Rust); empty `catch` block (Kotlin\u002FSwift). |\n| **Assert in catch block only** | `try { Act(); } catch (Exception ex) { Assert.Fail(ex.Message); }` (and equivalents in other languages) -- use `Assert.ThrowsException` \u002F `pytest.raises` \u002F `expect(fn).toThrow` \u002F `assertThrows` \u002F `assert.Error(t, err)` \u002F `#[should_panic]` \u002F `Should -Throw` \u002F `EXPECT_THROW` 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)`, `assert True`, `expect(true).toBe(true)`, `assert.True(t, true)`, `assert!(true)`, 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** | Wall-clock sleeps\u002Fwaits used for synchronization: `Thread.Sleep` \u002F `Task.Delay` (.NET), `time.sleep` (Python), `setTimeout` \u002F `await new Promise(r => setTimeout(...))` (JS\u002FTS), `Thread.sleep` (Java\u002FKotlin), `time.Sleep` (Go), `sleep` (Ruby\u002FBash), `std::thread::sleep` (Rust), `Start-Sleep` (Pester), `std::this_thread::sleep_for` (C++). Wall-clock reads without abstraction: `DateTime.Now`\u002F`UtcNow`, `datetime.now()`\u002F`datetime.utcnow()`, `Date.now()` \u002F `new Date()`, `System.currentTimeMillis()`, `time.Now()`, `Time.now`, `Instant::now()`, `Date()`\u002F`Date.now`, `Get-Date`, `std::chrono::system_clock::now`. Unseeded randomness: `new Random()`, `random.random()`\u002F`random.randint()`, `Math.random()`, `new Random()` (Java\u002FKotlin), `rand.Int()` without seed, `rand` (Ruby), `rand::random()` (Rust). Environment-dependent paths (hard-coded `C:\\...`, `\u002Ftmp\u002F...`, network hosts). |\n| **Test ordering dependency** | Static\u002Fglobal mutable state modified across tests; setup that doesn't fully reset state (`[TestInitialize]`, `setUp`, `beforeEach`, `before(:each)`, `BeforeEach`, `t.Cleanup`); tests that fail when run individually but pass in suite (or vice versa). Examples per language: `static` fields (.NET\u002FJava), module-level globals (Python), top-level `let`\u002F`const` in test file (JS\u002FTS), `var` package globals (Go), class variables (Ruby), `static mut`\u002F`lazy_static!`\u002F`OnceCell` (Rust), `$script:` variables (PowerShell). |\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. Per language: Moq\u002FNSubstitute\u002FFakeItEasy (.NET), `unittest.mock` \u002F `pytest-mock` (Python), Jest auto-mocks \u002F Sinon (JS\u002FTS), Mockito\u002FPowerMock (Java), gomock\u002Ftestify mock (Go), RSpec mocks\u002Fmocha (Ruby), `mockall` (Rust), MockK (Kotlin), `Mock` cmdlet (Pester), gmock (C++). |\n| **Implementation coupling** | Testing private methods via reflection (`MethodInfo.Invoke`, `getattr` in Python, `(thing as any)` in TS, `Field.setAccessible(true)` in Java, `Object#send` in Ruby, internal `pub(crate)` access in Rust). Asserting on internal state instead of observable behavior. Verifying exact method call counts on collaborators instead of business outcomes. |\n| **Broad exception assertions** | `Assert.ThrowsException\u003CException>(...)` (.NET) \u002F `pytest.raises(Exception)` \u002F `expect(fn).toThrow(Error)` without a message matcher \u002F `assertThrows(Exception.class, ...)` (Java) \u002F `assert.Error(t, err)` without checking the kind \u002F `expect { ... }.to raise_error` without class (RSpec) \u002F `#[should_panic]` without `expected = \"...\"` \u002F `Should -Throw` without `-ExpectedMessage` \u002F `EXPECT_ANY_THROW` instead of `EXPECT_THROW(stmt, SpecificType)`. |\n| **Weak transformation oracle** | A normalization, casing, trimming, mapping, or conversion test supplies an input already in the expected form, so a no-op implementation passes even though the assertion may catch other defects. Use an input that must change and assert an independently derived expected value. A producer\u002Fconsumer round trip is useful but does not replace an independent format assertion when both sides could share the same defect. |\n\n#### Medium -- Maintainability and clarity issues\n\n| Anti-Pattern | What to Look For |\n|---|---|\n| **Poor naming** | Test names like `Test1`, `TestMethod`, or `test` that don't describe the scenario or outcome. Use the loaded extension when available; otherwise follow the existing naming convention in the same suite. |\n| **Magic values** | Unexplained numbers or strings in arrange\u002Fassert: `Assert.AreEqual(42, result)` \u002F `assert result == 42` \u002F `expect(result).toBe(42)` -- 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 parametrized: `[DataRow]`\u002F`[Theory]`\u002F`[TestCase]` (.NET), `@pytest.mark.parametrize` (pytest), `test.each` \u002F `it.each` (Jest\u002FVitest), `@ParameterizedTest` + `@ValueSource` (JUnit 5), `@DataProvider` (TestNG), Go table-driven tests, `where` \u002F shared examples (RSpec), `#[rstest]` (Rust), `@ParameterizedTest` + `@MethodSource` (Kotlin), `-ForEach` \u002F `-TestCases` (Pester), `INSTANTIATE_TEST_SUITE_P` (GoogleTest), `SECTION` \u002F `GENERATE` (Catch2), `TEST_CASE_TEMPLATE` (doctest). 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| **Single-facet assertion pattern** | Across a related test group, every test repeatedly verifies only one facet while relevant state transitions, structure, errors, or side effects remain unchecked. Report qualitatively with concrete missing facets; do not compute an assertion-diversity score. |\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\")` \u002F `assert x == y, \"x is not equal to y\"` \u002F `assertEquals(x, y, \"values not equal\")` add no information. Messages should describe the business meaning. |\n| **Missing AAA \u002F Given-When-Then separation** | Arrange\u002FAct\u002FAssert (or Given\u002FWhen\u002FThen for BDD frameworks like RSpec, Kotest behavior specs, Pester) phases are interleaved or indistinguishable. |\n\n#### Low -- Style and hygiene\n\n| Anti-Pattern | What to Look For |\n|---|---|\n| **Unused test infrastructure** | Setup\u002Fteardown hooks that do nothing — `[TestInitialize]`\u002F`[SetUp]`\u002F`[BeforeEach]`, `setUp`\u002F`@BeforeEach`\u002F`@BeforeAll`, `beforeEach`\u002F`beforeAll`, `before(:each)`\u002F`before(:all)`, `BeforeEach`\u002F`BeforeAll` (Pester), `setUpWithError` (XCTest) — and test helper methods that are never called. |\n| **Unmanaged resources** | Test creates disposable\u002Fcloseable resources without cleanup: `HttpClient`\u002F`Stream` without `using` (.NET), file\u002Fconnection without `with` block or `try\u002Ffinally` (Python), `FileInputStream` without `try-with-resources` (Java), `defer file.Close()` missing (Go), connection without `ensure` (Ruby), `Drop` not relied on \u002F forgotten `close` (Rust), missing teardown for temp files \u002F DBs in any language. |\n| **Print debugging** | Leftover `Console.WriteLine` \u002F `Debug.WriteLine` \u002F `print()` \u002F `console.log` \u002F `System.out.println` \u002F `fmt.Println` \u002F `puts` \u002F `dbg!` \u002F `Write-Host` \u002F `std::cout` statements used during test development. |\n| **Inconsistent naming convention** | Mix of naming styles in the same test class\u002Fmodule\u002Ffile (e.g., some use `Method_Scenario_Expected`, others use `ShouldDoSomething`). |\n\n### Step 4: 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. Shared mutable state is High when it is a latent isolation risk, but **Critical when the user reports actual order-dependent failures or the code proves one test requires another to run first**. Missing-await on async assertions is Critical (silent pass).\n- **Medium**: Only for issues that actively harm maintainability -- 5+ nearly-identical tests, truly meaningless names like `Test1` \u002F `test` \u002F `it1`.\n- **Low**: Cosmetic naming mismatches, minor style preferences, assertion messages that could be better. When in doubt, rate Low.\n- **Use the caller's severity vocabulary consistently.** If the caller asks for\n  Critical \u002F Warning \u002F Info, map latent reliability risks to Warning and\n  maintenance\u002Fcosmetic concerns to Info. Keep a demonstrated false-confidence\n  or current order-dependency root cause Critical; do not downgrade it merely to\n  make every requested tier non-empty. Severity describes the demonstrated\n  failure mode, not how much prose a finding receives.\n- **Separate a systemic finding from its instances.** Coverage touching across a\n  facade is one Critical systemic finding whose evidence lists every affected\n  test. All assertion-free instances, including the last facade method, retain\n  the same false-confidence severity. Report `1 finding \u002F 6 affected tests`, not\n  six findings plus a seventh summary finding, and do not downgrade one instance\n  merely to manufacture multiple tiers.\n- **Do not severity-rank ordinary missing cases as anti-patterns.** Adjacent\n  untested branches, exception paths, and boundaries may be useful coverage\n  opportunities, but list them separately from the anti-pattern counts unless a\n  weak existing test specifically creates the gap. They are not Critical merely\n  because the suite has a systemic Critical issue.\n- **Not an issue** (per-language nuance):\n  - Go and Rust **table-driven loops** with sub-tests (`t.Run` \u002F `for case in cases { ... }`) are *idiomatic*, not \"Conditional Test Logic\". Do NOT flag.\n  - pytest **bare `assert`** is the canonical assertion form, not a missing assertion library. Do NOT flag.\n  - Go tests use `if got != want { t.Errorf(...) }` as canonical equality. Do NOT flag as ad-hoc.\n  - Separate tests for distinct boundary conditions (zero vs. negative vs. null). Do NOT flag as duplicates.\n  - Explicit per-test setup instead of `[TestInitialize]` \u002F `beforeEach` (this *improves* isolation).\n  - Tests that are short and clear but could theoretically be consolidated.\n  - Round-trip or serialization equality with non-trivial input. It is valid\n    metamorphic evidence, not a self-comparison; still recommend one independent\n    representation when producer and consumer could share a defect.\n  - A transformation tested only with an already-transformed input. Keep it out\n    of the tautology count, but report the weak oracle when removing the\n    transformation would still pass. Use an input that must change and pin its\n    independently expected output.\n  - Clone value equality. Keep it, and add distinct-reference or mutation-\n    independence evidence when the contract promises a deep copy.\n  - A validator or accessor returning the original value when pass-through is the\n    production contract. Missing invalid-input cases are a coverage gap, not proof\n    that the existing assertion is tautological.\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 5: Report findings\n\n**Depth bar — a tidy report that is shallower than an unassisted review is a failure.** Before writing, satisfy all six:\n\n1. **Account for every test in scope.** Build the complete method\u002Ffield inventory\n   before summarizing. For a systematic pattern such as coverage touching,\n   enumerate every affected test at least once rather than giving representative\n   examples. A finding table that silently skips tests (or fixtures like an\n   unused `static HttpClient` field) is incomplete. State the number reviewed.\n2. **Verify the production contract and calibrate assertion depth.** Inspect the\n   actual transformation, DTO fields, and promised identity\u002Fclone semantics.\n   Distinguish assertion-free, trivial-only, and meaningful assertions; name a\n   missing facet only when production behavior makes it relevant. Never invent\n   fields or require lossless round-tripping when production is intentionally\n   lossy.\n   For every suspicious equality, write down the independently known oracle\n   before assigning a finding. If the assertion compares a transformed output\n   with non-trivial input, clone state, snapshot, mock verification, or a\n   framework-native assertion context, explain why it can fail before calling it\n   tautological or assertion-free. Conversely, when a transformation test uses\n   an already-normalized input, call out that the input cannot distinguish the\n   real transformation from a no-op and provide a changing input plus exact\n   expected output. For paired producer\u002Fconsumer APIs, retain the round-trip test\n   and add one independent representation oracle rather than replacing valid\n   metamorphic evidence.\n3. **Make every Critical\u002FHigh fix complete and specific.** Give the replacement assertion with the *exact expected value* (the computed discount, the exact CSV line, the full expected object), not a `\u002F\u002F assert something here` placeholder.\n4. **Name obvious adjacent gaps without widening into mutation analysis** —\n   when production code is supplied, note directly related untested throws,\n   null results, boundary values, and round-trip\u002Fculture-sensitivity risks in an\n   **Adjacent coverage gaps** section. Use `test-gap-analysis` for exhaustive\n   branch-by-branch behavioral gaps.\n5. **Keep the report internally consistent.** Summary counts must equal the enumerated findings. Publish a settled conclusion: do all reconsidering before you write, and never leave \"wait, that's wrong\" \u002F \"this should fail but doesn't\" reasoning in the output.\n6. **Make non-findings decisive.** For a clean or mostly clean small suite, name\n   the suspicious constructs you cleared and the framework rule that makes each\n   valid. Do not bury a clean verdict under a generic checklist or speculative\n   improvements.\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\nBefore publishing, assign each finding a stable identity. A grouped row counts\nas one finding regardless of how many methods it lists; separate rows count\nseparately. Recompute the summary from those rows. Keep `affected tests` as a\ndifferent number so a bundled finding cannot create a hidden count mismatch.\n\n### Step 6: 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 test method in scope is accounted for (reviewed count stated; none silently skipped)\n- [ ] Identity and round-trip findings match the production contract and use only real fields\n- [ ] Every finding includes a specific location (not just a general warning)\n- [ ] Every Critical\u002FHigh finding includes a concrete fix with exact expected values\n- [ ] When production code is supplied, directly related untested error paths and boundary values are listed under Adjacent coverage gaps\n- [ ] Summary counts match the enumerated findings\n- [ ] Grouped findings distinguish finding count from affected-test count\n- [ ] Adjacent coverage opportunities are not inflated into Critical anti-pattern findings\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` \u002F `time.sleep` \u002F `time.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 | Use the terminology of the framework you loaded from the language extension; don't describe a pytest suite in MSTest terms. |\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| Trading depth for tidiness | A severity table and positive observations do not substitute for coverage of every test, exact expected values in fixes, and the adjacent error-path\u002Fboundary gaps |\n| Contradicting yourself in the report | Reason first, then write one settled verdict per finding — never emit \"wait, that's wrong\" \u002F \"should fail but doesn't\" reconsiderations |\n| Counts that don't add up | The summary's per-severity totals must match the findings you listed |\n","# Test Anti-Pattern Detection\n\nQuick, pragmatic analysis of test code in any supported language for anti-patterns and quality issues that undermine test reliability, maintainability, and diagnostic value.\n\n> **Language-specific guidance**: Load the `deniz-dotnet-general:test-analysis-extensions` skill and read its extension file matching the target codebase (e.g., `extensions\u002Fdotnet.md`, `extensions\u002Fpython.md`, `extensions\u002Ftypescript.md`, `extensions\u002Fgo.md`). The extension file tells you which sleep \u002F time \u002F random \u002F skip \u002F setup-teardown \u002F mystery-guest APIs to look for in that language. If its files are absent, use the built-in framework rules below.\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 diagnostic findings before deciding what to improve\n\n## When Not to Use\n\n- User wants to write new tests from scratch (out of scope; the user can invoke `\u002Fdeniz-dotnet-general:code-testing`)\n- User wants direct implementation fixes rather than a diagnostic review (use the relevant write\u002Fedit skill)\n- User wants to run or execute tests (use `run-tests` for .NET)\n- User wants to migrate between test frameworks or versions (use migration skills)\n- User wants coverage collection or coverage\u002FCRAP metrics\n- User asks whether tests would catch a bug or wants behavioral\u002Fpseudo-mutation gaps (use `test-gap-analysis`)\n- User wants test-mix or trait\u002Fcategory distributions\n- User wants a deep formal test-smell audit with an academic taxonomy\n\n## Inputs\n\n| Input | Required | Description |\n|-------|----------|-------------|\n| Test scope | No | Test files, classes, directory, or project to analyze. Discover from the current workspace when omitted. |\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: Detect language and load extension\n\nResolve the named test path from the current workspace before asking for input.\nWhen no path is supplied, discover test files under the current directory using\nthe repository manifests and conventional test markers. The skill context's\n`Base directory` is documentation storage, not the user's workspace; never\nresolve target files relative to it.\n\nIf one reader says a path is missing but a workspace glob\u002Fsearch finds it,\nnormalize that exact path and retry. Use a shell text reader (`sed`\u002F`cat` on\nUnix, `Get-Content` on PowerShell) only for a confirmed reader availability,\ntransport, or path-normalization failure and only after verifying the canonical\npath remains inside the current workspace. Stop on content-exclusion,\npermission\u002Fpolicy, workspace-boundary, or unknown failures. Audit any discovered\nfile that a permitted reader can access; never ask the user to paste it. If\nevery permitted reader fails, report the exact blocker without bypassing\nsecurity boundaries.\n\nIdentify the language and framework. Load the `deniz-dotnet-general:test-analysis-extensions`\nskill and read its extension file that matches them, resolving the filename\nrelative to that skill. Check only that skill's folder, never other installation\ndirectories. If it is unavailable, use the catalog below and report the\nreference limitation.\n\n### Step 2: Gather the test code\n\nInventory the resolved scope before reading bodies. For one file or class, read\nthat scope directly. For a project or suite, discover test files once, batch\nindependent reads where tools allow, and stop when every discovered test and\nclass-level fixture has a ledger disposition.\n\nUse extension discovery markers when loaded; otherwise use the built-in markers\nin this skill (attributes such as `[TestClass]`\u002F`[Fact]`\u002F`[Test]`,\n`test_*.py`, `*.test.*`, `*_test.go`, `*_spec.rb`, `#[test]`,\n`*.Tests.ps1`, `TEST(...)`, and `TEST_CASE(...)`).\n\nDo not read unrelated production code wholesale. Open the production symbol\ncorresponding to every suspicious test needed to decide whether an assertion,\ntransformation, identity contract, or adjacent gap is real. For a systematic\nfacade\u002Fsurface-area pattern, every invoked member is relevant: read the entire\nsmall production type or inspect each invoked member, then map each weak test to\nthe exact observable result, exception, state change, or boundary it should\nverify.\n\n### Step 3: Scan for anti-patterns\n\nCheck each test file against the anti-pattern catalog below. Report findings\ngrouped by severity. Use extension mappings when loaded; otherwise use the\ncross-framework examples in the catalog.\n\nBefore drafting the report, make a private completeness ledger with one row for\nevery test method and every class-level fixture\u002Fresource. Record its oracle (or\nabsence), exception handling, state\u002Ftime dependencies, concurrency safety,\nprecondition\u002Fassertion order, and disposition. Do not publish until every row is\neither attached to a finding or explicitly judged sound. In particular:\n\n- `actual != oldValue` is a weak mutation oracle: it accepts every wrong new\n  value. Require the exact expected value.\n- Include unused or undisposed class-level resources; method-only scans miss\n  fields such as a static `HttpClient`.\n- Treat an unsynchronized static\u002Fglobal collection as both order-coupled and\n  parallel-unsafe when tests read and write it. Also flag dereferencing a\n  nullable result before the assertion intended to prove it non-null.\n- When production code is supplied, note obvious untested contracts adjacent to\n  a finding, but do not perform exhaustive branch or mutation analysis. Route\n  that broader question to `test-gap-analysis`.\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. In .NET look for missing `Assert.*`; in pytest a function with no `assert` and no `pytest.raises`; in Jest no `expect(...)`; in JUnit no `assert*`\u002F`assertThat`; in Go a test that never calls `t.Error*`, `t.Fatal*`, or testify; in RSpec a block with no `expect`; in Pester no `Should`. Mock-call verifications (`verify(mock)`, `expect(mock).toHaveBeenCalled`, `Should -Invoke`) are real assertions. |\n| **Trivial-only assertions** | Tests whose only checks are null\u002Fpresence\u002Ftruthiness guards or constants, with no assertion on the value, state, structure, error, or side effect that defines the behavior. A guard followed by a meaningful assertion is not trivial-only. |\n| **Missing await on async assertions (JS\u002FTS, .NET, Python, Kotlin, Swift)** | `expect(promise).resolves.toBe(x)` without `await`\u002F`return`, `pytest-asyncio` test with un-awaited coroutine, `async Task` xUnit test calling `Assert.ThrowsAsync` without `await`, Kotest suspending test without `runTest`, Swift Testing async test without `await`. These tests silently pass even when the underlying assertion would have failed. |\n| **Coverage touching** | Test class that methodically calls every public member on a type — often in alphabetical or declaration order — without asserting meaningful outcomes. Each test typically does `var result = sut.MethodName(...)` (or `result = sut.method_name(...)`, `sut.methodName()`, `sut.MethodName(t)`) with no assertion, or only a trivial null\u002FNone\u002Fnil check. 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** | The expected value is computed from the same actual value, such as `Assert.AreEqual(dto.Name, dto.Name)`, `Assert.AreEqual(result, result)`, or equivalents. Do not apply this label merely because a valid identity, clone, serialization, or round-trip contract compares output with input: those assertions can fail. Instead check whether the input exercises a transformation and whether independently known representation, field, reference-identity, or invalid-input assertions are missing. |\n| **Swallowed exceptions** | `try { ... } catch { }`, `catch (Exception)` without rethrowing or asserting (.NET); bare `except:` or `except Exception:` with `pass` (Python); `try { ... } catch (e) {}` (JS\u002FTS\u002FJava); `defer recover()` without re-panic and no assertion (Go); `rescue StandardError` with no assertion (Ruby); `Result::unwrap_or(...)` swallowing errors in a test (Rust); empty `catch` block (Kotlin\u002FSwift). |\n| **Assert in catch block only** | `try { Act(); } catch (Exception ex) { Assert.Fail(ex.Message); }` (and equivalents in other languages) -- use `Assert.ThrowsException` \u002F `pytest.raises` \u002F `expect(fn).toThrow` \u002F `assertThrows` \u002F `assert.Error(t, err)` \u002F `#[should_panic]` \u002F `Should -Throw` \u002F `EXPECT_THROW` 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)`, `assert True`, `expect(true).toBe(true)`, `assert.True(t, true)`, `assert!(true)`, 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** | Wall-clock sleeps\u002Fwaits used for synchronization: `Thread.Sleep` \u002F `Task.Delay` (.NET), `time.sleep` (Python), `setTimeout` \u002F `await new Promise(r => setTimeout(...))` (JS\u002FTS), `Thread.sleep` (Java\u002FKotlin), `time.Sleep` (Go), `sleep` (Ruby\u002FBash), `std::thread::sleep` (Rust), `Start-Sleep` (Pester), `std::this_thread::sleep_for` (C++). Wall-clock reads without abstraction: `DateTime.Now`\u002F`UtcNow`, `datetime.now()`\u002F`datetime.utcnow()`, `Date.now()` \u002F `new Date()`, `System.currentTimeMillis()`, `time.Now()`, `Time.now`, `Instant::now()`, `Date()`\u002F`Date.now`, `Get-Date`, `std::chrono::system_clock::now`. Unseeded randomness: `new Random()`, `random.random()`\u002F`random.randint()`, `Math.random()`, `new Random()` (Java\u002FKotlin), `rand.Int()` without seed, `rand` (Ruby), `rand::random()` (Rust). Environment-dependent paths (hard-coded `C:\\...`, `\u002Ftmp\u002F...`, network hosts). |\n| **Test ordering dependency** | Static\u002Fglobal mutable state modified across tests; setup that doesn't fully reset state (`[TestInitialize]`, `setUp`, `beforeEach`, `before(:each)`, `BeforeEach`, `t.Cleanup`); tests that fail when run individually but pass in suite (or vice versa). Examples per language: `static` fields (.NET\u002FJava), module-level globals (Python), top-level `let`\u002F`const` in test file (JS\u002FTS), `var` package globals (Go), class variables (Ruby), `static mut`\u002F`lazy_static!`\u002F`OnceCell` (Rust), `$script:` variables (PowerShell). |\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. Per language: Moq\u002FNSubstitute\u002FFakeItEasy (.NET), `unittest.mock` \u002F `pytest-mock` (Python), Jest auto-mocks \u002F Sinon (JS\u002FTS), Mockito\u002FPowerMock (Java), gomock\u002Ftestify mock (Go), RSpec mocks\u002Fmocha (Ruby), `mockall` (Rust), MockK (Kotlin), `Mock` cmdlet (Pester), gmock (C++). |\n| **Implementation coupling** | Testing private methods via reflection (`MethodInfo.Invoke`, `getattr` in Python, `(thing as any)` in TS, `Field.setAccessible(true)` in Java, `Object#send` in Ruby, internal `pub(crate)` access in Rust). Asserting on internal state instead of observable behavior. Verifying exact method call counts on collaborators instead of business outcomes. |\n| **Broad exception assertions** | `Assert.ThrowsException\u003CException>(...)` (.NET) \u002F `pytest.raises(Exception)` \u002F `expect(fn).toThrow(Error)` without a message matcher \u002F `assertThrows(Exception.class, ...)` (Java) \u002F `assert.Error(t, err)` without checking the kind \u002F `expect { ... }.to raise_error` without class (RSpec) \u002F `#[should_panic]` without `expected = \"...\"` \u002F `Should -Throw` without `-ExpectedMessage` \u002F `EXPECT_ANY_THROW` instead of `EXPECT_THROW(stmt, SpecificType)`. |\n| **Weak transformation oracle** | A normalization, casing, trimming, mapping, or conversion test supplies an input already in the expected form, so a no-op implementation passes even though the assertion may catch other defects. Use an input that must change and assert an independently derived expected value. A producer\u002Fconsumer round trip is useful but does not replace an independent format assertion when both sides could share the same defect. |\n\n#### Medium -- Maintainability and clarity issues\n\n| Anti-Pattern | What to Look For |\n|---|---|\n| **Poor naming** | Test names like `Test1`, `TestMethod`, or `test` that don't describe the scenario or outcome. Use the loaded extension when available; otherwise follow the existing naming convention in the same suite. |\n| **Magic values** | Unexplained numbers or strings in arrange\u002Fassert: `Assert.AreEqual(42, result)` \u002F `assert result == 42` \u002F `expect(result).toBe(42)` -- 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 parametrized: `[DataRow]`\u002F`[Theory]`\u002F`[TestCase]` (.NET), `@pytest.mark.parametrize` (pytest), `test.each` \u002F `it.each` (Jest\u002FVitest), `@ParameterizedTest` + `@ValueSource` (JUnit 5), `@DataProvider` (TestNG), Go table-driven tests, `where` \u002F shared examples (RSpec), `#[rstest]` (Rust), `@ParameterizedTest` + `@MethodSource` (Kotlin), `-ForEach` \u002F `-TestCases` (Pester), `INSTANTIATE_TEST_SUITE_P` (GoogleTest), `SECTION` \u002F `GENERATE` (Catch2), `TEST_CASE_TEMPLATE` (doctest). 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| **Single-facet assertion pattern** | Across a related test group, every test repeatedly verifies only one facet while relevant state transitions, structure, errors, or side effects remain unchecked. Report qualitatively with concrete missing facets; do not compute an assertion-diversity score. |\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\")` \u002F `assert x == y, \"x is not equal to y\"` \u002F `assertEquals(x, y, \"values not equal\")` add no information. Messages should describe the business meaning. |\n| **Missing AAA \u002F Given-When-Then separation** | Arrange\u002FAct\u002FAssert (or Given\u002FWhen\u002FThen for BDD frameworks like RSpec, Kotest behavior specs, Pester) phases are interleaved or indistinguishable. |\n\n#### Low -- Style and hygiene\n\n| Anti-Pattern | What to Look For |\n|---|---|\n| **Unused test infrastructure** | Setup\u002Fteardown hooks that do nothing — `[TestInitialize]`\u002F`[SetUp]`\u002F`[BeforeEach]`, `setUp`\u002F`@BeforeEach`\u002F`@BeforeAll`, `beforeEach`\u002F`beforeAll`, `before(:each)`\u002F`before(:all)`, `BeforeEach`\u002F`BeforeAll` (Pester), `setUpWithError` (XCTest) — and test helper methods that are never called. |\n| **Unmanaged resources** | Test creates disposable\u002Fcloseable resources without cleanup: `HttpClient`\u002F`Stream` without `using` (.NET), file\u002Fconnection without `with` block or `try\u002Ffinally` (Python), `FileInputStream` without `try-with-resources` (Java), `defer file.Close()` missing (Go), connection without `ensure` (Ruby), `Drop` not relied on \u002F forgotten `close` (Rust), missing teardown for temp files \u002F DBs in any language. |\n| **Print debugging** | Leftover `Console.WriteLine` \u002F `Debug.WriteLine` \u002F `print()` \u002F `console.log` \u002F `System.out.println` \u002F `fmt.Println` \u002F `puts` \u002F `dbg!` \u002F `Write-Host` \u002F `std::cout` statements used during test development. |\n| **Inconsistent naming convention** | Mix of naming styles in the same test class\u002Fmodule\u002Ffile (e.g., some use `Method_Scenario_Expected`, others use `ShouldDoSomething`). |\n\n### Step 4: 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. Shared mutable state is High when it is a latent isolation risk, but **Critical when the user reports actual order-dependent failures or the code proves one test requires another to run first**. Missing-await on async assertions is Critical (silent pass).\n- **Medium**: Only for issues that actively harm maintainability -- 5+ nearly-identical tests, truly meaningless names like `Test1` \u002F `test` \u002F `it1`.\n- **Low**: Cosmetic naming mismatches, minor style preferences, assertion messages that could be better. When in doubt, rate Low.\n- **Use the caller's severity vocabulary consistently.** If the caller asks for\n  Critical \u002F Warning \u002F Info, map latent reliability risks to Warning and\n  maintenance\u002Fcosmetic concerns to Info. Keep a demonstrated false-confidence\n  or current order-dependency root cause Critical; do not downgrade it merely to\n  make every requested tier non-empty. Severity describes the demonstrated\n  failure mode, not how much prose a finding receives.\n- **Separate a systemic finding from its instances.** Coverage touching across a\n  facade is one Critical systemic finding whose evidence lists every affected\n  test. All assertion-free instances, including the last facade method, retain\n  the same false-confidence severity. Report `1 finding \u002F 6 affected tests`, not\n  six findings plus a seventh summary finding, and do not downgrade one instance\n  merely to manufacture multiple tiers.\n- **Do not severity-rank ordinary missing cases as anti-patterns.** Adjacent\n  untested branches, exception paths, and boundaries may be useful coverage\n  opportunities, but list them separately from the anti-pattern counts unless a\n  weak existing test specifically creates the gap. They are not Critical merely\n  because the suite has a systemic Critical issue.\n- **Not an issue** (per-language nuance):\n  - Go and Rust **table-driven loops** with sub-tests (`t.Run` \u002F `for case in cases { ... }`) are *idiomatic*, not \"Conditional Test Logic\". Do NOT flag.\n  - pytest **bare `assert`** is the canonical assertion form, not a missing assertion library. Do NOT flag.\n  - Go tests use `if got != want { t.Errorf(...) }` as canonical equality. Do NOT flag as ad-hoc.\n  - Separate tests for distinct boundary conditions (zero vs. negative vs. null). Do NOT flag as duplicates.\n  - Explicit per-test setup instead of `[TestInitialize]` \u002F `beforeEach` (this *improves* isolation).\n  - Tests that are short and clear but could theoretically be consolidated.\n  - Round-trip or serialization equality with non-trivial input. It is valid\n    metamorphic evidence, not a self-comparison; still recommend one independent\n    representation when producer and consumer could share a defect.\n  - A transformation tested only with an already-transformed input. Keep it out\n    of the tautology count, but report the weak oracle when removing the\n    transformation would still pass. Use an input that must change and pin its\n    independently expected output.\n  - Clone value equality. Keep it, and add distinct-reference or mutation-\n    independence evidence when the contract promises a deep copy.\n  - A validator or accessor returning the original value when pass-through is the\n    production contract. Missing invalid-input cases are a coverage gap, not proof\n    that the existing assertion is tautological.\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 5: Report findings\n\n**Depth bar — a tidy report that is shallower than an unassisted review is a failure.** Before writing, satisfy all six:\n\n1. **Account for every test in scope.** Build the complete method\u002Ffield inventory\n   before summarizing. For a systematic pattern such as coverage touching,\n   enumerate every affected test at least once rather than giving representative\n   examples. A finding table that silently skips tests (or fixtures like an\n   unused `static HttpClient` field) is incomplete. State the number reviewed.\n2. **Verify the production contract and calibrate assertion depth.** Inspect the\n   actual transformation, DTO fields, and promised identity\u002Fclone semantics.\n   Distinguish assertion-free, trivial-only, and meaningful assertions; name a\n   missing facet only when production behavior makes it relevant. Never invent\n   fields or require lossless round-tripping when production is intentionally\n   lossy.\n   For every suspicious equality, write down the independently known oracle\n   before assigning a finding. If the assertion compares a transformed output\n   with non-trivial input, clone state, snapshot, mock verification, or a\n   framework-native assertion context, explain why it can fail before calling it\n   tautological or assertion-free. Conversely, when a transformation test uses\n   an already-normalized input, call out that the input cannot distinguish the\n   real transformation from a no-op and provide a changing input plus exact\n   expected output. For paired producer\u002Fconsumer APIs, retain the round-trip test\n   and add one independent representation oracle rather than replacing valid\n   metamorphic evidence.\n3. **Make every Critical\u002FHigh fix complete and specific.** Give the replacement assertion with the *exact expected value* (the computed discount, the exact CSV line, the full expected object), not a `\u002F\u002F assert something here` placeholder.\n4. **Name obvious adjacent gaps without widening into mutation analysis** —\n   when production code is supplied, note directly related untested throws,\n   null results, boundary values, and round-trip\u002Fculture-sensitivity risks in an\n   **Adjacent coverage gaps** section. Use `test-gap-analysis` for exhaustive\n   branch-by-branch behavioral gaps.\n5. **Keep the report internally consistent.** Summary counts must equal the enumerated findings. Publish a settled conclusion: do all reconsidering before you write, and never leave \"wait, that's wrong\" \u002F \"this should fail but doesn't\" reasoning in the output.\n6. **Make non-findings decisive.** For a clean or mostly clean small suite, name\n   the suspicious constructs you cleared and the framework rule that makes each\n   valid. Do not bury a clean verdict under a generic checklist or speculative\n   improvements.\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\nBefore publishing, assign each finding a stable identity. A grouped row counts\nas one finding regardless of how many methods it lists; separate rows count\nseparately. Recompute the summary from those rows. Keep `affected tests` as a\ndifferent number so a bundled finding cannot create a hidden count mismatch.\n\n### Step 6: 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 test method in scope is accounted for (reviewed count stated; none silently skipped)\n- [ ] Identity and round-trip findings match the production contract and use only real fields\n- [ ] Every finding includes a specific location (not just a general warning)\n- [ ] Every Critical\u002FHigh finding includes a concrete fix with exact expected values\n- [ ] When production code is supplied, directly related untested error paths and boundary values are listed under Adjacent coverage gaps\n- [ ] Summary counts match the enumerated findings\n- [ ] Grouped findings distinguish finding count from affected-test count\n- [ ] Adjacent coverage opportunities are not inflated into Critical anti-pattern findings\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` \u002F `time.sleep` \u002F `time.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 | Use the terminology of the framework you loaded from the language extension; don't describe a pytest suite in MSTest terms. |\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| Trading depth for tidiness | A severity table and positive observations do not substitute for coverage of every test, exact expected values in fixes, and the adjacent error-path\u002Fboundary gaps |\n| Contradicting yourself in the report | Reason first, then write one settled verdict per finding — never emit \"wait, that's wrong\" \u002F \"should fail but doesn't\" reconsiderations |\n| Counts that don't add up | The summary's per-severity totals must match the findings you listed |\n",{"name":5,"license":15,"description":24,"user-invocable":20},"Audits an existing test file or suite in any language for pragmatic anti-patterns and quality issues, producing a severity-ranked report. Use when asked to review tests, find false-confidence assertions, investigate flakiness or order dependence, identify duplication or magic values, or judge whether assertions repeatedly verify only one facet of behavior. DO NOT USE FOR: writing or running tests, coverage\u002FCRAP metrics, behavioral gap analysis, full assertion-diversity metrics, an academic smell catalog, or fixing the tests it audits (report-only).\n","master","b30b1c1908dbc56a8184128f18803053d762ccb5","plugins\u002Fdeniz-dotnet-general\u002Fskills\u002Ftest-anti-patterns",0,"https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins","https:\u002F\u002Fgithub.com\u002FBlind-Striker","denizirgin.com","VP of Engineering - \r\n@armutcom @homeruntech @prontopro\r\n |  Speaker \r\n@CodeFiction\r\n, http:\u002F\u002Fcodefiction.tech | Developer, gamer, blogger, maiden iron fan","2026-11-13 00:23:18",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add Blind-Striker\u002Fagent-skills-and-plugins --skill test-anti-patterns",{"tool":40,"command":41},"bunx","bunx skills add Blind-Striker\u002Fagent-skills-and-plugins --skill test-anti-patterns",{"tool":43,"command":44},"pnpm","pnpm dlx skills add Blind-Striker\u002Fagent-skills-and-plugins --skill test-anti-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fplugins\u002Fdeniz-dotnet-general\u002Fskills\u002Ftest-anti-patterns\u002FSKILL.md",true,[],[49,56,63,70,77,84],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M79YGWBJ52PHMSTKJ3RJ3AWR","writing-tunit-tests","Write tests in TUnit — the attributes, the async assertion model, data-driven cases, lifecycle hooks, and the parallelism rules. USE FOR writing or fixing a test in a TUnit project, translating a test idea into TUnit syntax, or reviewing TUnit test code for API mistakes. DO NOT USE FOR deciding what to test, judging whether a test is any good, or running tests.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-dotnet-general\u002Fwriting-tunit-tests\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M79YGR3Y9RCRS6TD71D0KKP8","dotnet-walls","Walls for a .NET change in a repository without its own quality gates — pinned, ephemeral analyzer, format, clone and scanner commands for the verify step, their identity ratchet, and the build traps. Use during a walls preflight, or when a worker's verify step needs .NET quality gates.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-dotnet-general\u002Fdotnet-walls\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M79YGFNJBST7D803NQW3SBYM","csharp-15","Write, review and modernize C# 15 (.NET 11) code correctly. Covers every C# 15 feature - collection expression arguments (`[with(...), ...]`), union types (`union`, `[Union]`, `IUnion`, custom unions), closed class hierarchies (`closed`), extension indexers, labeled `break`\u002F`continue`, non-virtual static interface members on runtimes without default interface methods, and the preview memory-safety model (`unsafe(expr)`, `safe`, requires-unsafe members). Use when code targets net11.0 or LangVersion 15\u002Fpreview, when the user mentions any of these features, when replacing marker interfaces, OneOf-style results, `goto`\u002Fflag loop exits or capacity\u002Fcomparer boilerplate, or when the build reports CS8121, CS8509, CS8655, CS8510, CS0121\u002FCS0411 on a `with(...)` element, CS9370, CS9380 or CS9363.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-dotnet-general\u002Fcsharp-15\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M79YGAV031473HSX6FN87ENH","verified-waves","Run one task as verified multi-agent waves. Plans the fan-out, sends findings to fresh skeptics, keeps a ledger, and reports N of M done; small tasks stay solo.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-coordination\u002Fverified-waves\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M79YG6QXNND4WRPP3GATSY8J","harness","The bundled dispatch harness, which runs a task file on worker models through OpenCode or Codex, fences their writes, escalates their asks to the operator, settles each result from git and its verify commands, and records every step in a ledger. Its commands, task file, modes and write fence, configuration, runs and their recovery, ledger and exit codes.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-coordination\u002Fharness\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M79YG2P5S91SDTA5912XJ4FV","delegating-to-worker-models","Use when you hand off implementation, a plan, research a decision will rely on, or a review, and you brief the worker and check what comes back. A subagent that searches, reads in parallel, or keeps your context small is ordinary tool use. Covers what stays with you, the mechanism, assigning work by strength, the walls preflight, prompts without contradictions, the worker contract and model profiles, evidence from your own run, review, and the fix-up loop.","https:\u002F\u002Fgithub.com\u002FBlind-Striker\u002Fagent-skills-and-plugins\u002Fblob\u002Fmaster\u002Fskills\u002Fdeniz-coordination\u002Fdelegating-to-worker-models\u002FSKILL.md",[],[]]