[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7E5E6C4FZ1PSSGMCV88MEQ2":3,"skill-same:01M7E5E6C4FZ1PSSGMCV88MEQ2":50},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":28,"updatedAt":29,"install":30,"resources":43},"01M7E5E6C4FZ1PSSGMCV88MEQ2","test-audit",null,"Invoke whenever writing, changing, reviewing, or sweeping tests. Authoring gate for new tests plus audit workflow for low-value, implementation-coupled, or duplicative tests and the test-only production seams they demand.","hasegama\u002Fpstack-claude","hasegama","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F40445443?v=4","01M7E58WENS57JDNDXCV1QVSP9","01M7E58WF9D5V2CNS2ZNF62AXD",0,"MIT","https:\u002F\u002Fgithub.com\u002Fhasegama\u002Fpstack-claude\u002Fblob\u002Fmain\u002Fplugins\u002Fpstack-claude\u002Fskills\u002Ftest-audit\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: test-audit\ndescription: \"Invoke whenever writing, changing, reviewing, or sweeping tests. Authoring gate for new tests plus audit workflow for low-value, implementation-coupled, or duplicative tests and the test-only production seams they demand.\"\n---\n\n# Test Audit\n\nThree modes, one value bar. Authoring mode gates every new or changed test at\nwrite time. Audit mode runs focused sweeps of tests that re-assert source,\nduplicate stronger proof, couple behavior to implementation, or keep test-only\nproduction seams alive. Continue broad audits as separate coherent follow-up\nPRs; optimize for confidence, not deletion count. Campaign mode prunes one\nwhole subsystem's test surface (every test file a plugin or core area owns);\nbefore starting one, read [CAMPAIGN.md](CAMPAIGN.md).\n\n## Authoring gate\n\nBefore adding any test, answer four questions; a missing answer means do not\nadd it yet:\n\n1. What observable behavior, invariant, or independent contract does it protect?\n2. What credible regression makes it fail?\n3. Why does existing coverage not already catch that failure? Each contract has\n   one primary test owner at the strongest boundary; another layer needs its\n   own distinct risk, such as a transport or lifecycle failure the owner cannot\n   reach. Prefer extending a table-driven case or shared fixture over a\n   near-duplicate test; consolidate duplicated setup in the same change.\n4. Does it need a production seam (export, flag, wrapper, injection hook) that no\n   production caller needs? If yes, move the test to the real boundary instead.\n\nThen check the test against every [junk pattern](#junk-patterns); a match fails\nthe gate unless the [retention bar](#retention-bar) names the contract it\nindependently guards. A test that would break under behavior-preserving\nrefactoring is asserting implementation, not behavior; rewrite it at the\nowning boundary before landing it.\n\nBug regression tests must fail on the pre-fix code for the intended reason and\npass after the owner-boundary repair. A regression test that never demonstrably\nfailed proves the mock, not the fix. One regression at the owner boundary\ncovers the bug; do not replay the same scenario at every layer it crosses.\n\n## Junk patterns\n\nThe shared checklist for both modes: the authoring gate rejects a new test that\nmatches one, and audits hunt for existing tests that do.\n\n- assertion-free coverage probes;\n- self-comparisons and identity copiers;\n- copied fixtures, inventories, manifests, or export lists;\n- exact source, import, or string greps;\n- private predicate or call-shape tests duplicated at real boundaries;\n- duplicate invocations of the same contract;\n- provider-local replays of shared helpers;\n- tests whose only purpose is preserving test-only exports, globals, or wrappers;\n- dead production code whose only callers are tests;\n- expected values produced by the helper or renderer under test;\n- mocks that implement the asserted behavior, or one identical mock standing in\n  for different APIs;\n- fixtures that supply the receipt, admission, or callback ordering the owner\n  should produce, or persistence asserted against a store the path never writes;\n- capability tests that restate declared flags instead of exercising the\n  delivery or acknowledgement the flag promises;\n- negative controls that pass for an unrelated reason, such as a denial from a\n  different guard or a rejection the production path never reaches;\n- names or fixtures that promise more than the input exercises, such as a\n  \"retires the window\" test asserting the window was not cleared.\n\n## Value bar\n\nTests justify their maintenance cost by protecting behavior, a credible\nregression, or an independently meaningful contract. In an audit, an existing\ntest that must change for behavior-preserving source reorganization is suspect,\nnot automatically deletable; the authoring gate still rejects new ones.\n\nBefore judging a candidate, read the complete test and production owner, its\nentry point, callers, callees, sibling implementations, overlapping tests, CI\nrouting, and relevant history. Read root and scoped `AGENTS.md` files first.\nWhen the test claims dependency-backed behavior, inspect the dependency source\nor types directly.\n\n## Discovery\n\nKeep discovery read-only and report evidence before editing. For broad scope,\nrun parallel discovery lanes when available:\n\n- core and packages (`src\u002F`, `packages\u002F`);\n- plugins (`extensions\u002F`);\n- UI, apps, scripts, and tooling;\n- a cross-cutting pattern sweep.\n\nOutside campaign mode, prefer a few high-confidence candidates over a large\nspeculative inventory. Hunt for the [junk patterns](#junk-patterns).\n\n## Retention bar\n\nKeep a test when it independently enforces a public API, plugin SDK, protocol,\nconfig, migration, storage, security, platform, default, prompt-byte, generated\ncross-language, package, release, or architecture contract. Also keep:\n\n- call ordering when order is observable behavior;\n- regressions with a credible failure mode;\n- source inspection when it is the cheapest independent guard: it fails when\n  the contract changes (the user-facing key, byte, or path) and survives an\n  identifier-only refactor;\n- a retained test that fails on the baseline: treat it as a possible product\n  bug, reproduce it, and repair the owner rather than deleting it.\n\nStatic or slow is not a deletion reason. A test that resembles implementation\nmay still be the independent contract; prove otherwise before removing it.\n\n## Candidate evidence\n\nRecord every field below before editing. A missing field means the candidate is\nnot ready for deletion:\n\n- exact test name and location;\n- what failure it can actually detect;\n- non-test callers of the covered production or support seam;\n- stronger remaining owner-boundary proof, or why no proof is needed;\n- relevant history and the reason the test or seam exists;\n- production or test-support deletion unlocked;\n- risk and the focused validation command.\n\n## Edit shape\n\nChoose one coherent owner-boundary batch. Delete obsolete test-only exports,\nglobals, wrappers, and dead production paths instead of preserving aliases.\nMove retained regressions to their canonical owners. Consolidate repeated\npackage or dependency assertions into one generic contract.\n\nPrefer net-negative production LOC. Do not add replacement tests that restate\nthe same implementation, and do not convert uncertain candidates into cleanup\nto increase deletion counts.\n\n## Validation\n\nNever edit source or tests while Vitest is running in the checkout. Follow\n`$openclaw-testing`; route heavy proof through its `$crabbox` rules.\n\n1. Run the smallest owner and sibling tests with\n   `node scripts\u002Frun-vitest.mjs \u003Cpath-or-filter>`.\n2. For removed source greps or plan assertions, run the executable script or\n   dry-run that owns the real contract.\n3. Run targeted formatting, then `git diff --check`.\n4. Classify with\n   `node scripts\u002Fcheck-changed.mjs --dry-run -- \u003Cchanged-paths>`, then run the\n   actual changed gate required by repository policy.\n5. Inspect `git diff --numstat`; report production\u002Ftooling separately from\n   tests and test support.\n6. After final audit edits, run mandatory `$autoreview`.\n\n## Landing and continuation\n\nCommit, push, open a PR, or land only when authorized. Use\n`$openclaw-pr-maintainer` and the repository `scripts\u002Fpr` flow. Land one\ncoherent PR at a time; after landing, refresh from current `main` and rerun\nread-only discovery for the next high-confidence batch.\n\n## Handoff\n\nReport:\n\n- root cause and removed low-value categories;\n- production owner simplifications;\n- retained false positives and why they remain valuable;\n- focused and full proof actually run;\n- production versus test LOC;\n- PR and merge state;\n- named follow-ups.\n","# Test Audit\n\nThree modes, one value bar. Authoring mode gates every new or changed test at\nwrite time. Audit mode runs focused sweeps of tests that re-assert source,\nduplicate stronger proof, couple behavior to implementation, or keep test-only\nproduction seams alive. Continue broad audits as separate coherent follow-up\nPRs; optimize for confidence, not deletion count. Campaign mode prunes one\nwhole subsystem's test surface (every test file a plugin or core area owns);\nbefore starting one, read [CAMPAIGN.md](CAMPAIGN.md).\n\n## Authoring gate\n\nBefore adding any test, answer four questions; a missing answer means do not\nadd it yet:\n\n1. What observable behavior, invariant, or independent contract does it protect?\n2. What credible regression makes it fail?\n3. Why does existing coverage not already catch that failure? Each contract has\n   one primary test owner at the strongest boundary; another layer needs its\n   own distinct risk, such as a transport or lifecycle failure the owner cannot\n   reach. Prefer extending a table-driven case or shared fixture over a\n   near-duplicate test; consolidate duplicated setup in the same change.\n4. Does it need a production seam (export, flag, wrapper, injection hook) that no\n   production caller needs? If yes, move the test to the real boundary instead.\n\nThen check the test against every [junk pattern](#junk-patterns); a match fails\nthe gate unless the [retention bar](#retention-bar) names the contract it\nindependently guards. A test that would break under behavior-preserving\nrefactoring is asserting implementation, not behavior; rewrite it at the\nowning boundary before landing it.\n\nBug regression tests must fail on the pre-fix code for the intended reason and\npass after the owner-boundary repair. A regression test that never demonstrably\nfailed proves the mock, not the fix. One regression at the owner boundary\ncovers the bug; do not replay the same scenario at every layer it crosses.\n\n## Junk patterns\n\nThe shared checklist for both modes: the authoring gate rejects a new test that\nmatches one, and audits hunt for existing tests that do.\n\n- assertion-free coverage probes;\n- self-comparisons and identity copiers;\n- copied fixtures, inventories, manifests, or export lists;\n- exact source, import, or string greps;\n- private predicate or call-shape tests duplicated at real boundaries;\n- duplicate invocations of the same contract;\n- provider-local replays of shared helpers;\n- tests whose only purpose is preserving test-only exports, globals, or wrappers;\n- dead production code whose only callers are tests;\n- expected values produced by the helper or renderer under test;\n- mocks that implement the asserted behavior, or one identical mock standing in\n  for different APIs;\n- fixtures that supply the receipt, admission, or callback ordering the owner\n  should produce, or persistence asserted against a store the path never writes;\n- capability tests that restate declared flags instead of exercising the\n  delivery or acknowledgement the flag promises;\n- negative controls that pass for an unrelated reason, such as a denial from a\n  different guard or a rejection the production path never reaches;\n- names or fixtures that promise more than the input exercises, such as a\n  \"retires the window\" test asserting the window was not cleared.\n\n## Value bar\n\nTests justify their maintenance cost by protecting behavior, a credible\nregression, or an independently meaningful contract. In an audit, an existing\ntest that must change for behavior-preserving source reorganization is suspect,\nnot automatically deletable; the authoring gate still rejects new ones.\n\nBefore judging a candidate, read the complete test and production owner, its\nentry point, callers, callees, sibling implementations, overlapping tests, CI\nrouting, and relevant history. Read root and scoped `AGENTS.md` files first.\nWhen the test claims dependency-backed behavior, inspect the dependency source\nor types directly.\n\n## Discovery\n\nKeep discovery read-only and report evidence before editing. For broad scope,\nrun parallel discovery lanes when available:\n\n- core and packages (`src\u002F`, `packages\u002F`);\n- plugins (`extensions\u002F`);\n- UI, apps, scripts, and tooling;\n- a cross-cutting pattern sweep.\n\nOutside campaign mode, prefer a few high-confidence candidates over a large\nspeculative inventory. Hunt for the [junk patterns](#junk-patterns).\n\n## Retention bar\n\nKeep a test when it independently enforces a public API, plugin SDK, protocol,\nconfig, migration, storage, security, platform, default, prompt-byte, generated\ncross-language, package, release, or architecture contract. Also keep:\n\n- call ordering when order is observable behavior;\n- regressions with a credible failure mode;\n- source inspection when it is the cheapest independent guard: it fails when\n  the contract changes (the user-facing key, byte, or path) and survives an\n  identifier-only refactor;\n- a retained test that fails on the baseline: treat it as a possible product\n  bug, reproduce it, and repair the owner rather than deleting it.\n\nStatic or slow is not a deletion reason. A test that resembles implementation\nmay still be the independent contract; prove otherwise before removing it.\n\n## Candidate evidence\n\nRecord every field below before editing. A missing field means the candidate is\nnot ready for deletion:\n\n- exact test name and location;\n- what failure it can actually detect;\n- non-test callers of the covered production or support seam;\n- stronger remaining owner-boundary proof, or why no proof is needed;\n- relevant history and the reason the test or seam exists;\n- production or test-support deletion unlocked;\n- risk and the focused validation command.\n\n## Edit shape\n\nChoose one coherent owner-boundary batch. Delete obsolete test-only exports,\nglobals, wrappers, and dead production paths instead of preserving aliases.\nMove retained regressions to their canonical owners. Consolidate repeated\npackage or dependency assertions into one generic contract.\n\nPrefer net-negative production LOC. Do not add replacement tests that restate\nthe same implementation, and do not convert uncertain candidates into cleanup\nto increase deletion counts.\n\n## Validation\n\nNever edit source or tests while Vitest is running in the checkout. Follow\n`$openclaw-testing`; route heavy proof through its `$crabbox` rules.\n\n1. Run the smallest owner and sibling tests with\n   `node scripts\u002Frun-vitest.mjs \u003Cpath-or-filter>`.\n2. For removed source greps or plan assertions, run the executable script or\n   dry-run that owns the real contract.\n3. Run targeted formatting, then `git diff --check`.\n4. Classify with\n   `node scripts\u002Fcheck-changed.mjs --dry-run -- \u003Cchanged-paths>`, then run the\n   actual changed gate required by repository policy.\n5. Inspect `git diff --numstat`; report production\u002Ftooling separately from\n   tests and test support.\n6. After final audit edits, run mandatory `$autoreview`.\n\n## Landing and continuation\n\nCommit, push, open a PR, or land only when authorized. Use\n`$openclaw-pr-maintainer` and the repository `scripts\u002Fpr` flow. Land one\ncoherent PR at a time; after landing, refresh from current `main` and rerun\nread-only discovery for the next high-confidence batch.\n\n## Handoff\n\nReport:\n\n- root cause and removed low-value categories;\n- production owner simplifications;\n- retained false positives and why they remain valuable;\n- focused and full proof actually run;\n- production versus test LOC;\n- PR and merge state;\n- named follow-ups.\n",{"name":5,"description":7},"main","36262efad28c7be938a3b1bca81646ed163ae64f","plugins\u002Fpstack-claude\u002Fskills\u002Ftest-audit","https:\u002F\u002Fgithub.com\u002Fhasegama\u002Fpstack-claude","https:\u002F\u002Fgithub.com\u002Fhasegama","Computer Vision","2026-10-16 17:52:03",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add hasegama\u002Fpstack-claude --skill test-audit",{"tool":36,"command":37},"bunx","bunx skills add hasegama\u002Fpstack-claude --skill test-audit",{"tool":39,"command":40},"pnpm","pnpm dlx skills add hasegama\u002Fpstack-claude --skill test-audit","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhasegama\u002Fpstack-claude\u002Fblob\u002Fmain\u002Fplugins\u002Fpstack-claude\u002Fskills\u002Ftest-audit\u002FSKILL.md",true,[44],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"CAMPAIGN.md","REFERENCE","参考文档",5463,"https:\u002F\u002Fgithub.com\u002Fhasegama\u002Fpstack-claude\u002Fblob\u002Fmain\u002Fplugins\u002Fpstack-claude\u002Fskills\u002Ftest-audit\u002FCAMPAIGN.md",[51,58,65,72,79,86],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":18},"01M7E5KFP59WKAWKDNA3ST1VH1","why","Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds. Discovers available MCPs and queries each evidence category (source control, issue tracker, long-form docs, real-time chat, infrastructure observability, error tracking, product analytics warehouse) in parallel, then returns a cited read on decisions and tradeoffs. Use how for runtime behavior.","https:\u002F\u002Fgithub.com\u002Fhasegama\u002Fpstack-claude\u002Fblob\u002Fmain\u002Fplugins\u002Fpstack-claude\u002Fupstream\u002Fpstack\u002Fskills\u002Fwhy\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":18},"01M7E5KE3VW28EDY5ZXRWEPMDG","unslop","Cut AI tells from any writing. Must always apply.","https:\u002F\u002Fgithub.com\u002Fhasegama\u002Fpstack-claude\u002Fblob\u002Fmain\u002Fplugins\u002Fpstack-claude\u002Fupstream\u002Fpstack\u002Fskills\u002Funslop\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":18},"01M7E5KCCQZQMYFY07AB8C8484","typescript-best-practices","TypeScript best practices. Use when reading or editing any .ts or .tsx file.","https:\u002F\u002Fgithub.com\u002Fhasegama\u002Fpstack-claude\u002Fblob\u002Fmain\u002Fplugins\u002Fpstack-claude\u002Fupstream\u002Fpstack\u002Fskills\u002Ftypescript-best-practices\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":18},"01M7E5K947AWBZ57BGK8GSTS88","technical-writing","Layered technical-writing standard: Diátaxis structure, Google developer style sentences, STE instruction rules, Global English syntax. Use for \u002Ftechnical-writing or when writing or reviewing docs, RFCs, readmes, PR descriptions, or commit messages.","https:\u002F\u002Fgithub.com\u002Fhasegama\u002Fpstack-claude\u002Fblob\u002Fmain\u002Fplugins\u002Fpstack-claude\u002Fupstream\u002Fpstack\u002Fskills\u002Ftechnical-writing\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":18},"01M7E5K4TQHAWA192CKQAW17JG","teach","Explain a body of work plainly so a person actually understands it. Runs the `how` and `why` skills and weaves what they find into one clear explanation. Use for 'teach me this', 'help me really understand X', 'explain this change or subsystem to me'.","https:\u002F\u002Fgithub.com\u002Fhasegama\u002Fpstack-claude\u002Fblob\u002Fmain\u002Fplugins\u002Fpstack-claude\u002Fupstream\u002Fpstack\u002Fskills\u002Fteach\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":18},"01M7E5K1AYSFJG3G729YMPFH8P","tdd","Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious cheap local test target. Skip when the test path is unclear, expensive, integration-heavy, or not requested.","https:\u002F\u002Fgithub.com\u002Fhasegama\u002Fpstack-claude\u002Fblob\u002Fmain\u002Fplugins\u002Fpstack-claude\u002Fupstream\u002Fpstack\u002Fskills\u002Ftdd\u002FSKILL.md",[],[]]