[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77MVR9XNXR99S5CPRQCXKJY":3,"skill-same:01M77MVR9XNXR99S5CPRQCXKJY":50},{"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":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":33,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M77MVR9XNXR99S5CPRQCXKJY","test-value",null,"What makes a test worth keeping: where each expected value must come from, when call-count and database checks are legitimate, and the can't-fail and change-detector taxonomy keyed to testing:audit rule ids. Use when writing, reviewing or fixing tests, or asking 'is this test worth keeping', 'where should the expected value come from', 'is this test tautological', 'should I assert this mock call'.","melodic-software\u002Fclaude-code-plugins","melodic-software","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F58273638?v=4","01M77JVQTXNGKCE4MDFY2BC936","Melodic Software","01M77JVQVN9QDWKAH6W03ANP76",30,"MIT","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Ftesting\u002Fskills\u002Ftest-value\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\ndescription: \"What makes a test worth keeping: where each expected value must come from, when call-count and database checks are legitimate, and the can't-fail and change-detector taxonomy keyed to testing:audit rule ids. Use when writing, reviewing or fixing tests, or asking 'is this test worth keeping', 'where should the expected value come from', 'is this test tautological', 'should I assert this mock call'.\"\nuser-invocable: false\ndisable-model-invocation: false\nmetadata:\n  workflow-stage: test\n  summary: Where expected values come from and which tests earn their keep\n---\n\n# Test value\n\nA test is worth keeping when it fails for the bug it guards and passes for any correct\nimplementation. `\u002Ftdd:principles` (when the `tdd` plugin is enabled) carries the wider Beck and\nKhorikov doctrine.\n\n## 1. Every expected value names its independent source\n\nBefore writing an assertion, name where its expected value comes from:\n\n- a literal the requirement states (`280 characters accepted, 281 rejected`);\n- a worked example from the spec, the issue or the API contract;\n- the bug report, for a regression test (the value the reporter expected);\n- a value computed by hand, outside the code under test;\n- a known fixture whose content the test did not derive from the code.\n\nIf the only way to get the value is to run the code under test or repeat its algorithm in the\ntest, there is no independent source and no unit test to write. Test at a level that has one (a\nproperty, a round trip against a specified format, an end-to-end outcome), or leave the code\nuntested and say so. Never copy the code's actual output into the expected value: that records\nwhatever the code did.\n\n### A test you wrote from code you just wrote\n\nIts expected value has no independent source unless it comes from the list above. Reading your\nown code to pick the value copies its output by another route.\n\nVerification record. Claim: LLM-generated test oracles mainly capture the code's actual behavior\nrather than its expected behavior, and can validate bugs (the first paper also finds them better at\ndetecting faults than EvoSuite's). Basis: https:\u002F\u002Farxiv.org\u002Fabs\u002F2410.21136,\nhttps:\u002F\u002Farxiv.org\u002Fabs\u002F2412.14137, https:\u002F\u002Farxiv.org\u002Fabs\u002F2607.22883 (abstracts read). Measured on\nLLM test generators run on benchmark repositories; the transfer to an agent writing tests mid-task\nis inferred. Recheck when a study measures an interactive coding agent's own\ntests, or one of the three papers is revised.\n\n### A property is stated before it runs\n\nA property is a source only when it comes from the spec, requirement, docstring or issue and is\nwritten down before it runs against the code. A property found by watching what the code does is a\nrecording, and one that re-implements the code (`add(a, b) === a + b`) is the restated expectation\nthis section rules out. A new property needs evidence that it can fail: a mutant it kills\n(`\u002Fmutation-testing:audit --exercised`, when that plugin is enabled) or a known-bad input marked\nexpected-fail, such as Hypothesis `@example(...).xfail()`.\n\nVerification record. Claim: a material share of LLM-written property tests are unsound or\nsuperficial (a wrong implementation also satisfies them), and Hypothesis documents expected-failing\nexamples as a check that a test does fail on some inputs. Basis:\nhttps:\u002F\u002Faclanthology.org\u002F2026.findings-acl.683\u002F, https:\u002F\u002Farxiv.org\u002Fabs\u002F2307.04346,\nhttps:\u002F\u002Fhypothesis.readthedocs.io\u002Fen\u002Flatest\u002Freference\u002Fapi.html. Measured on Python libraries and\nbenchmark functions.\n\n### In a rewrite, the old code is the source and the test is a pin\n\nWhen code is replaced, migrated or ported, or pinned before a refactor, the old implementation or\noutput recorded from it is the independent source for the new code, so copying that output is\nallowed. Such a test is a pin: it proves sameness, not correctness, and keeps any bug the old code\nhad. Name it a pin, and before trusting it break the code under test on purpose and watch it\nfail. The record is in §4.\n\n### A canned response names its source\n\nA stub, fake or recording standing in for an unmanaged dependency (§2) feeds values the code acts\non, so each canned response names its source: a recorded real response replayed read-only in CI,\nthe provider's published schema or sandbox, or a contract test both sides run. A response written\nfrom the same guess about the API as the code passes on the shared mistake. A recording is\nindependent only while the implementer cannot rewrite it; a re-recorded or hand-edited one is a new\nclaim to review. Consumer-driven contract tools such as Pact need the\nprovider to run them too, which rules them out for public third-party APIs.\n\nVerification record. Claim: a contract test checks that calls to a test double return what the\nreal service would; Pact's docs say it does not fit APIs whose provider will not also use Pact or\nwhose consumers cannot be identified, such as public APIs; vcrpy records real responses once and\nits `none` record mode errors on any unrecorded request. Basis:\nhttps:\u002F\u002Fmartinfowler.com\u002Fbliki\u002FContractTest.html,\nhttps:\u002F\u002Fdocs.pact.io\u002Fgetting_started\u002Fwhat_is_pact_good_for,\nhttps:\u002F\u002Fvcrpy.readthedocs.io\u002Fen\u002Flatest\u002Fusage.html.\n\n## 2. Call counts are legitimate at unmanaged, state-changing boundaries\n\nAsserting that a call happened, and how often, is correct when the dependency is **unmanaged**\n(out-of-process, observable by other systems: a payment API, an email gateway, a message bus) and\nthe call **changes its state**: there the call is the behavior, and verifying that the charge\nrequest was sent once (`Times.Once`) is the test to write. On an internal collaborator, a managed\ndependency or a query call the same assertion pins the implementation and breaks on refactor.\n\nVerification record. Claim: only unmanaged dependencies should be mocked, and interactions with\nthem (calls that change their state) are observable behavior to verify. Basis:\nhttps:\u002F\u002Fenterprisecraftsmanship.com\u002Fposts\u002Fwhen-to-mock\u002F.\n\n## 3. A managed database is real, and reading it back is state verification\n\nA database only your application touches is a **managed** dependency: test against a real\ninstance (a container, LocalDB), not a mock or an in-memory fake. After the act step, reading the\nresulting row directly (`context.Blogs.SingleAsync(...)`, `SELECT ... WHERE id = ?`) is legitimate\nstate verification. What makes such a test weak is its oracle, not the read: `expect(row)\n.toBeDefined()` passes for wrong data; assert the fields.\n\nThe named exception is the EF Core carve-out: mocking `DbContext` is acceptable for non-query\nwrites (verifying that code called `Add` or `SaveChanges()`). Never mock `DbSet` for queries; LINQ\nover an in-memory collection does not behave like the provider.\n\nPointer: [Choosing a testing strategy § Mocking or stubbing DbContext and DbSet](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fef\u002Fcore\u002Ftesting\u002Fchoosing-a-testing-strategy#mocking-or-stubbing-dbcontext-and-dbset)\nand its [Summary](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fef\u002Fcore\u002Ftesting\u002Fchoosing-a-testing-strategy#summary).\n\n## 4. Refactoring stays inside the loop\n\nRed, green, then refactor, every cycle, one test at a time. Refactoring is not a phase after all\nthe tests are written, and writing every listed test before any implementation is a mistake: bulk\ntests check imagined behavior. Keep the test list; turn one item into a test at a time.\n\nVerification record. Claim: Canon TDD is five steps (list, one test, make it pass, \"Optionally\nrefactor to improve the implementation design\", repeat until the list is empty), and \"copying\nactual, computed values & pasting them into the expected values of the test ... defeats double\nchecking\". Basis: https:\u002F\u002Fnewsletter.kentbeck.com\u002Fp\u002Fcanon-tdd (redirected from\ntidyfirst.substack.com; published 2023-12-11).\n\nA rewrite pin (§1) is not the copying Beck rules out: its values come from a second\nimplementation, the old one, so the check is double, but on sameness only.\n\nVerification record. Claim: a characterization test documents a system's actual behavior rather\nthan its desired behavior; temporarily sabotaging the code under test confirms each\ncharacterization assertion can fail; Jest says to fix a bug before regenerating snapshots so the\nsnapshot does not record it. Basis: https:\u002F\u002Fmichaelfeathers.silvrback.com\u002Fcharacterization-testing,\nhttps:\u002F\u002Fblog.ploeh.dk\u002F2025\u002F11\u002F03\u002Fempirical-characterization-testing\u002F,\nhttps:\u002F\u002Fjestjs.io\u002Fdocs\u002Fsnapshot-testing.\n\n## Next\n\n- The suite needs checking for the shapes in the taxonomy below: \u002Ftesting:audit.\n- A folder of low-value tests needs rewriting or pruning: \u002Ftesting:cleanup \u003Cfolder>.\n\n## 5. Taxonomy, keyed to `\u002Ftesting:audit` rule ids\n\n**Cannot fail** (green whatever the code does):\n\n| Rule | Shape | Fix |\n|---|---|---|\n| `rule-zero-assertion` | a test body with no assertion | assert the behavior |\n| `rule-recomputed-expectation` | both sides the same expression: `expect(LIMIT).toBe(LIMIT)` | take the expected side from §1 |\n| `rule-inert-assertion` | an assertion that never runs: unawaited `toBeVisible()`, `assert (x == 1, \"msg\")`, `m.called_once_with(...)`, bare `.Should();`, `Assert.True(true)`, `Assert.NotNull(typeof(T))` | await it, fix the tuple, use `assert_called_once_with`, assert a value the code computes |\n| `rule-conditional-assertion` | every assertion inside an `if`, a `catch` or a loop over the result; a C# `return;` before every assertion | assert unconditionally; check the length first; skip the test instead of returning |\n| `rule-flaky-passes-suite`, `rule-only-not-forbidden` | Playwright retries without `failOnFlakyTests`; no `forbidOnly` | set both in the config |\n\n**Checks little** (can fail, but misses most wrong answers):\n\n| Rule | Shape | Fix |\n|---|---|---|\n| `rule-mock-only-oracle` | every assertion is a mock interaction | assert a result or state, unless §2 applies |\n| `rule-recomputed-derived` | expected rebuilt the way the code computes it: `expect(add(a, b)).toBe(a + b)`, `items.reduce(...)`; passes when test and code share a mistake, and proves no specified value | a hand-computed literal (§1) |\n| `rule-weak-oracle` | `toBeDefined`, `is not None`, `toThrow()` alone | assert the value or the exception type |\n| `rule-throw-only-oracle` | `var w = new Widget(); Assert.NotNull(w);`: only a throwing constructor fails it | assert what the constructor sets; `cant-fail-ok: \u003Cwhy>` for a smoke test kept to prove wiring |\n| `rule-snapshot-only` | a snapshot is the only oracle | review it as code; scrub volatile values (times, ids, seeds) with the tool's matcher or scrubber; when your own change breaks it, fix the bug or confirm the diff is intended before regenerating, never re-approve blind (§4) |\n\n**Change detectors** (fail on any edit, prove no behavior):\n\n| Rule | Shape | Fix |\n|---|---|---|\n| `rule-constant-restatement` | `expect(X_POST_CHARACTER_LIMIT).toBe(280)` | test the boundary (280 accepted, 281 rejected); `cant-fail-ok: \u003Cwhy>` for an external contract literal |\n| `rule-source-text-read` | reading a `.tsx` file and asserting `indexOf` order | render or call it |\n\n**Judgment only** (no rule; the reviewer decides): a stub of a platform API that hides its error\nmodes (`vi.stubGlobal('AudioContext', ...)`); mocking an internal collaborator; testing a private\nmethod; a test that breaks on a behavior-preserving refactor; a name that says how, not what; a\nsnapshot written by hand the same way the code computes it; all tests written before any code.\nAlso judgment only:\n\n- a negative test that passes for an unrelated reason: the rejection comes from a different guard,\n  or from an input the production path never reaches;\n- a fixture that supplies the outcome the code should produce (the receipt, the ordering, the\n  callback), or a store asserted on that the path under test never writes;\n- a mock that implements the behavior the test asserts, or one mock standing in for different\n  APIs;\n- a name that promises more than the assertions check, such as \"clears the cache\" asserting the\n  cache still holds the entry: judge the assertions, not the name;\n- a hand-copied inventory (an export list, a manifest, declared capability flags) compared to the\n  source: a change detector, unless the list is an external contract (`cant-fail-ok: \u003Cwhy>`), and a\n  capability flag is tested by exercising what it promises;\n- an exact error message asserted where no caller or user reads it (`toThrow('name is required')`,\n  `pytest.raises(ParseError, match=\"empty\")`, `Assert.That(ex.Message, Is.EqualTo(...))`): a\n  change detector that fails on rewording, since the error type callers branch on is the contract.\n  Fix: assert the type. When the message is user-facing text or a published error string, it is\n  the contract: keep the assertion and mark it `cant-fail-ok: \u003Cwhy>`;\n- a test kept alive only to preserve an export, global or wrapper that no production caller uses;\n- an absence check with no paired presence case: every assertion checks that a value the subject\n  returns or changes is empty or missing (`toEqual([])`, `toBeUndefined`, `is None`,\n  `Assert.Empty`), and no case in the test (or its table) shows the same code producing it for\n  another input, so a do-nothing implementation passes. Fix: add the paired case, where a different\n  input produces the value and the test asserts it exactly, such as\n  `expect(validateOrder(valid).errors).toEqual([])` beside\n  `expect(validateOrder(noSku).errors).toEqual(['sku required'])`, where the error text is what\n  the order form shows the user, so the message is the contract. When the absence is the contract\n  and a paired presence case already exists, keep the test; do not delete or rewrite an absence\n  assertion for its shape alone. A mock-interaction absence stays under `rule-mock-only-oracle` and\n  §2;\n- assertions that never reach the subject: the subject is never called, or it is called but every\n  assertion reads only values the test built (its own literals, fixtures or mocks). Fix: assert what\n  the subject returns or changes. `\u002Ftesting:write`'s hollow-out run shows it: swap the subject's\n  functions for ones that return nothing and expect red.\n","# Test value\n\nA test is worth keeping when it fails for the bug it guards and passes for any correct\nimplementation. `\u002Ftdd:principles` (when the `tdd` plugin is enabled) carries the wider Beck and\nKhorikov doctrine.\n\n## 1. Every expected value names its independent source\n\nBefore writing an assertion, name where its expected value comes from:\n\n- a literal the requirement states (`280 characters accepted, 281 rejected`);\n- a worked example from the spec, the issue or the API contract;\n- the bug report, for a regression test (the value the reporter expected);\n- a value computed by hand, outside the code under test;\n- a known fixture whose content the test did not derive from the code.\n\nIf the only way to get the value is to run the code under test or repeat its algorithm in the\ntest, there is no independent source and no unit test to write. Test at a level that has one (a\nproperty, a round trip against a specified format, an end-to-end outcome), or leave the code\nuntested and say so. Never copy the code's actual output into the expected value: that records\nwhatever the code did.\n\n### A test you wrote from code you just wrote\n\nIts expected value has no independent source unless it comes from the list above. Reading your\nown code to pick the value copies its output by another route.\n\nVerification record. Claim: LLM-generated test oracles mainly capture the code's actual behavior\nrather than its expected behavior, and can validate bugs (the first paper also finds them better at\ndetecting faults than EvoSuite's). Basis: https:\u002F\u002Farxiv.org\u002Fabs\u002F2410.21136,\nhttps:\u002F\u002Farxiv.org\u002Fabs\u002F2412.14137, https:\u002F\u002Farxiv.org\u002Fabs\u002F2607.22883 (abstracts read). Measured on\nLLM test generators run on benchmark repositories; the transfer to an agent writing tests mid-task\nis inferred. Recheck when a study measures an interactive coding agent's own\ntests, or one of the three papers is revised.\n\n### A property is stated before it runs\n\nA property is a source only when it comes from the spec, requirement, docstring or issue and is\nwritten down before it runs against the code. A property found by watching what the code does is a\nrecording, and one that re-implements the code (`add(a, b) === a + b`) is the restated expectation\nthis section rules out. A new property needs evidence that it can fail: a mutant it kills\n(`\u002Fmutation-testing:audit --exercised`, when that plugin is enabled) or a known-bad input marked\nexpected-fail, such as Hypothesis `@example(...).xfail()`.\n\nVerification record. Claim: a material share of LLM-written property tests are unsound or\nsuperficial (a wrong implementation also satisfies them), and Hypothesis documents expected-failing\nexamples as a check that a test does fail on some inputs. Basis:\nhttps:\u002F\u002Faclanthology.org\u002F2026.findings-acl.683\u002F, https:\u002F\u002Farxiv.org\u002Fabs\u002F2307.04346,\nhttps:\u002F\u002Fhypothesis.readthedocs.io\u002Fen\u002Flatest\u002Freference\u002Fapi.html. Measured on Python libraries and\nbenchmark functions.\n\n### In a rewrite, the old code is the source and the test is a pin\n\nWhen code is replaced, migrated or ported, or pinned before a refactor, the old implementation or\noutput recorded from it is the independent source for the new code, so copying that output is\nallowed. Such a test is a pin: it proves sameness, not correctness, and keeps any bug the old code\nhad. Name it a pin, and before trusting it break the code under test on purpose and watch it\nfail. The record is in §4.\n\n### A canned response names its source\n\nA stub, fake or recording standing in for an unmanaged dependency (§2) feeds values the code acts\non, so each canned response names its source: a recorded real response replayed read-only in CI,\nthe provider's published schema or sandbox, or a contract test both sides run. A response written\nfrom the same guess about the API as the code passes on the shared mistake. A recording is\nindependent only while the implementer cannot rewrite it; a re-recorded or hand-edited one is a new\nclaim to review. Consumer-driven contract tools such as Pact need the\nprovider to run them too, which rules them out for public third-party APIs.\n\nVerification record. Claim: a contract test checks that calls to a test double return what the\nreal service would; Pact's docs say it does not fit APIs whose provider will not also use Pact or\nwhose consumers cannot be identified, such as public APIs; vcrpy records real responses once and\nits `none` record mode errors on any unrecorded request. Basis:\nhttps:\u002F\u002Fmartinfowler.com\u002Fbliki\u002FContractTest.html,\nhttps:\u002F\u002Fdocs.pact.io\u002Fgetting_started\u002Fwhat_is_pact_good_for,\nhttps:\u002F\u002Fvcrpy.readthedocs.io\u002Fen\u002Flatest\u002Fusage.html.\n\n## 2. Call counts are legitimate at unmanaged, state-changing boundaries\n\nAsserting that a call happened, and how often, is correct when the dependency is **unmanaged**\n(out-of-process, observable by other systems: a payment API, an email gateway, a message bus) and\nthe call **changes its state**: there the call is the behavior, and verifying that the charge\nrequest was sent once (`Times.Once`) is the test to write. On an internal collaborator, a managed\ndependency or a query call the same assertion pins the implementation and breaks on refactor.\n\nVerification record. Claim: only unmanaged dependencies should be mocked, and interactions with\nthem (calls that change their state) are observable behavior to verify. Basis:\nhttps:\u002F\u002Fenterprisecraftsmanship.com\u002Fposts\u002Fwhen-to-mock\u002F.\n\n## 3. A managed database is real, and reading it back is state verification\n\nA database only your application touches is a **managed** dependency: test against a real\ninstance (a container, LocalDB), not a mock or an in-memory fake. After the act step, reading the\nresulting row directly (`context.Blogs.SingleAsync(...)`, `SELECT ... WHERE id = ?`) is legitimate\nstate verification. What makes such a test weak is its oracle, not the read: `expect(row)\n.toBeDefined()` passes for wrong data; assert the fields.\n\nThe named exception is the EF Core carve-out: mocking `DbContext` is acceptable for non-query\nwrites (verifying that code called `Add` or `SaveChanges()`). Never mock `DbSet` for queries; LINQ\nover an in-memory collection does not behave like the provider.\n\nPointer: [Choosing a testing strategy § Mocking or stubbing DbContext and DbSet](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fef\u002Fcore\u002Ftesting\u002Fchoosing-a-testing-strategy#mocking-or-stubbing-dbcontext-and-dbset)\nand its [Summary](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fef\u002Fcore\u002Ftesting\u002Fchoosing-a-testing-strategy#summary).\n\n## 4. Refactoring stays inside the loop\n\nRed, green, then refactor, every cycle, one test at a time. Refactoring is not a phase after all\nthe tests are written, and writing every listed test before any implementation is a mistake: bulk\ntests check imagined behavior. Keep the test list; turn one item into a test at a time.\n\nVerification record. Claim: Canon TDD is five steps (list, one test, make it pass, \"Optionally\nrefactor to improve the implementation design\", repeat until the list is empty), and \"copying\nactual, computed values & pasting them into the expected values of the test ... defeats double\nchecking\". Basis: https:\u002F\u002Fnewsletter.kentbeck.com\u002Fp\u002Fcanon-tdd (redirected from\ntidyfirst.substack.com; published 2023-12-11).\n\nA rewrite pin (§1) is not the copying Beck rules out: its values come from a second\nimplementation, the old one, so the check is double, but on sameness only.\n\nVerification record. Claim: a characterization test documents a system's actual behavior rather\nthan its desired behavior; temporarily sabotaging the code under test confirms each\ncharacterization assertion can fail; Jest says to fix a bug before regenerating snapshots so the\nsnapshot does not record it. Basis: https:\u002F\u002Fmichaelfeathers.silvrback.com\u002Fcharacterization-testing,\nhttps:\u002F\u002Fblog.ploeh.dk\u002F2025\u002F11\u002F03\u002Fempirical-characterization-testing\u002F,\nhttps:\u002F\u002Fjestjs.io\u002Fdocs\u002Fsnapshot-testing.\n\n## Next\n\n- The suite needs checking for the shapes in the taxonomy below: \u002Ftesting:audit.\n- A folder of low-value tests needs rewriting or pruning: \u002Ftesting:cleanup \u003Cfolder>.\n\n## 5. Taxonomy, keyed to `\u002Ftesting:audit` rule ids\n\n**Cannot fail** (green whatever the code does):\n\n| Rule | Shape | Fix |\n|---|---|---|\n| `rule-zero-assertion` | a test body with no assertion | assert the behavior |\n| `rule-recomputed-expectation` | both sides the same expression: `expect(LIMIT).toBe(LIMIT)` | take the expected side from §1 |\n| `rule-inert-assertion` | an assertion that never runs: unawaited `toBeVisible()`, `assert (x == 1, \"msg\")`, `m.called_once_with(...)`, bare `.Should();`, `Assert.True(true)`, `Assert.NotNull(typeof(T))` | await it, fix the tuple, use `assert_called_once_with`, assert a value the code computes |\n| `rule-conditional-assertion` | every assertion inside an `if`, a `catch` or a loop over the result; a C# `return;` before every assertion | assert unconditionally; check the length first; skip the test instead of returning |\n| `rule-flaky-passes-suite`, `rule-only-not-forbidden` | Playwright retries without `failOnFlakyTests`; no `forbidOnly` | set both in the config |\n\n**Checks little** (can fail, but misses most wrong answers):\n\n| Rule | Shape | Fix |\n|---|---|---|\n| `rule-mock-only-oracle` | every assertion is a mock interaction | assert a result or state, unless §2 applies |\n| `rule-recomputed-derived` | expected rebuilt the way the code computes it: `expect(add(a, b)).toBe(a + b)`, `items.reduce(...)`; passes when test and code share a mistake, and proves no specified value | a hand-computed literal (§1) |\n| `rule-weak-oracle` | `toBeDefined`, `is not None`, `toThrow()` alone | assert the value or the exception type |\n| `rule-throw-only-oracle` | `var w = new Widget(); Assert.NotNull(w);`: only a throwing constructor fails it | assert what the constructor sets; `cant-fail-ok: \u003Cwhy>` for a smoke test kept to prove wiring |\n| `rule-snapshot-only` | a snapshot is the only oracle | review it as code; scrub volatile values (times, ids, seeds) with the tool's matcher or scrubber; when your own change breaks it, fix the bug or confirm the diff is intended before regenerating, never re-approve blind (§4) |\n\n**Change detectors** (fail on any edit, prove no behavior):\n\n| Rule | Shape | Fix |\n|---|---|---|\n| `rule-constant-restatement` | `expect(X_POST_CHARACTER_LIMIT).toBe(280)` | test the boundary (280 accepted, 281 rejected); `cant-fail-ok: \u003Cwhy>` for an external contract literal |\n| `rule-source-text-read` | reading a `.tsx` file and asserting `indexOf` order | render or call it |\n\n**Judgment only** (no rule; the reviewer decides): a stub of a platform API that hides its error\nmodes (`vi.stubGlobal('AudioContext', ...)`); mocking an internal collaborator; testing a private\nmethod; a test that breaks on a behavior-preserving refactor; a name that says how, not what; a\nsnapshot written by hand the same way the code computes it; all tests written before any code.\nAlso judgment only:\n\n- a negative test that passes for an unrelated reason: the rejection comes from a different guard,\n  or from an input the production path never reaches;\n- a fixture that supplies the outcome the code should produce (the receipt, the ordering, the\n  callback), or a store asserted on that the path under test never writes;\n- a mock that implements the behavior the test asserts, or one mock standing in for different\n  APIs;\n- a name that promises more than the assertions check, such as \"clears the cache\" asserting the\n  cache still holds the entry: judge the assertions, not the name;\n- a hand-copied inventory (an export list, a manifest, declared capability flags) compared to the\n  source: a change detector, unless the list is an external contract (`cant-fail-ok: \u003Cwhy>`), and a\n  capability flag is tested by exercising what it promises;\n- an exact error message asserted where no caller or user reads it (`toThrow('name is required')`,\n  `pytest.raises(ParseError, match=\"empty\")`, `Assert.That(ex.Message, Is.EqualTo(...))`): a\n  change detector that fails on rewording, since the error type callers branch on is the contract.\n  Fix: assert the type. When the message is user-facing text or a published error string, it is\n  the contract: keep the assertion and mark it `cant-fail-ok: \u003Cwhy>`;\n- a test kept alive only to preserve an export, global or wrapper that no production caller uses;\n- an absence check with no paired presence case: every assertion checks that a value the subject\n  returns or changes is empty or missing (`toEqual([])`, `toBeUndefined`, `is None`,\n  `Assert.Empty`), and no case in the test (or its table) shows the same code producing it for\n  another input, so a do-nothing implementation passes. Fix: add the paired case, where a different\n  input produces the value and the test asserts it exactly, such as\n  `expect(validateOrder(valid).errors).toEqual([])` beside\n  `expect(validateOrder(noSku).errors).toEqual(['sku required'])`, where the error text is what\n  the order form shows the user, so the message is the contract. When the absence is the contract\n  and a paired presence case already exists, keep the test; do not delete or rewrite an absence\n  assertion for its shape alone. A mock-interaction absence stays under `rule-mock-only-oracle` and\n  §2;\n- assertions that never reach the subject: the subject is never called, or it is called but every\n  assertion reads only values the test built (its own literals, fixtures or mocks). Fix: assert what\n  the subject returns or changes. `\u002Ftesting:write`'s hollow-out run shows it: swap the subject's\n  functions for ones that return nothing and expect red.\n",{"metadata":24,"description":7,"user-invocable":20,"disable-model-invocation":20},{"summary":25,"workflow-stage":26},"Where expected values come from and which tests earn their keep","test","main","5aff8ba54896bc54fd0eb46e4a954099449cf67d","plugins\u002Ftesting\u002Fskills\u002Ftest-value",7,"https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins","https:\u002F\u002Fgithub.com\u002Fmelodic-software","https:\u002F\u002Fmelodicsoftware.com","Independent software studio building developer tools, automation, and application services, with roots in music.","2026-11-15 05:15:06",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add melodic-software\u002Fclaude-code-plugins --skill test-value",{"tool":42,"command":43},"bunx","bunx skills add melodic-software\u002Fclaude-code-plugins --skill test-value",{"tool":45,"command":46},"pnpm","pnpm dlx skills add melodic-software\u002Fclaude-code-plugins --skill test-value","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Ftesting\u002Fskills\u002Ftest-value\u002FSKILL.md",true,[],[51,58,65,72,77,84],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":19},"01M7DYYDG31B9YX7N9MB9QW2GW","track","Backlog reads through the bound tracker: search open and closed items, view one item with its comments and state history. Use when another skill searches or reads tracker items.","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fsession-flow\u002Fevals\u002Frecall-still-reports-reopened-bug\u002Fwork-items-stub\u002Fskills\u002Ftrack\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M7DYXVBAVG3NV30PA7GKW9Q6","reviewer-media","Reviewer media for one pull request: decides whether it needs a narrated walkthrough, builds the storyboard from \u002Freview:explain-change's digest, has \u002Fexplainer-video:produce render it and hands the manifest to \u002Fsource-control:pull-request media. Use when asked for 'reviewer media', 'a walkthrough video for this PR', 'a produced video of this change', or when pull-request ready or monitor hands a PR over.","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Freview\u002Fskills\u002Freviewer-media\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7DYRZ5YD44AMYH26YR25GZ8","route","Model and effort per agent role (orchestrator, worker, verifier, retrieval) for a multi-agent run, resolved through the bundled defaults and the user, team and personal override config layers into fenced JSON with single-agent and fan-out variants and the layer behind each value. Use when asked 'which model for the subagents', 'route the roles' or 'model routing', or before a skill passes a role's model on a spawn.","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fdiscovery\u002Fevals\u002Fex-model-pin-without-override\u002Fmulti-agent-stub\u002Fskills\u002Froute\u002FSKILL.md",[],[],{"skillNo":73,"name":67,"nameZh":6,"description":68,"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},"01M7DYRTVT4FWTGDJY0HCCFJMZ","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fdiscovery\u002Fevals\u002Fex-model-override-from-route\u002Fmulti-agent-stub\u002Fskills\u002Froute\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},"01M7DYNZC8PNW3T27V2ADKECKJ","principles","Module-design vocabulary for architecture findings, and the checks built on it. Use when: 'what is a deep module', 'what is a seam', 'deep vs shallow module', 'what is the deletion test', 'leverage and locality', 'module design vocabulary', 'which word do we use for X in architecture findings'. Scanning a codebase for friction is \u002Farchitecture:improve.","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Farchitecture\u002Fskills\u002Fprinciples\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},"01M7DYNMCZNEWBFHV9KTSS6H60","write","Structured five-field bug report (title, steps to reproduce, expected vs actual, justified severity, suggested fix location) from an informal description, read-only. Use when the user names a defect they observed, or asks for one written up ('report a bug', 'file a bug', 'write this up as a bug').","https:\u002F\u002Fgithub.com\u002Fmelodic-software\u002Fclaude-code-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Farchitecture\u002Fevals\u002Fdeepening-defect-goes-to-bugs-write\u002Fbugs-stub\u002Fskills\u002Fwrite\u002FSKILL.md",[],[]]