[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DBRZ12DBGS55DG47QVT8DB":3,"skill-same:01M6DBRZ12DBGS55DG47QVT8DB":64},{"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":23,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":14,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":49,"install":50,"resources":63},"01M6DBRZ12DBGS55DG47QVT8DB","refactor-equivalence",null,"Use when a change CLAIMS to be a pure\u002Fdeterministic refactor - extract-method, inline, rewrite a helper, \"no functional change\" - and you want an EXTERNAL proof that old and new are equivalent. CrossHair diffbehavior uses Z3 to find an input where old_fn(x) != new_fn(x); a Hypothesis differential test is the fallback. Scoped to PURE, DETERMINISTIC functions; not for non-Python. Advisory only.","Prekzursil\u002Fagent-skills-toolchain","Prekzursil","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F54636077?v=4","01M6DACZ1PCQHD99SCR1YXG28B","Andrei Mihai Visalon","01M6DACZ670WZF535V3WYYSS4Z",0,"MIT","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Frefactor-equivalence\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000007","代码审查","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"refactor","refactor equivalence","python","test","change","hypothesis","find","extract","use","only","fallback","functions","deterministic","advisory","fn","2026-11-10 10:12:30",false,"---\nname: refactor-equivalence\ndescription: Use when a change CLAIMS to be a pure\u002Fdeterministic refactor - extract-method, inline, rewrite a helper, \"no functional change\" - and you want an EXTERNAL proof that old and new are equivalent. CrossHair diffbehavior uses Z3 to find an input where old_fn(x) != new_fn(x); a Hypothesis differential test is the fallback. Scoped to PURE, DETERMINISTIC functions; not for non-Python. Advisory only.\n---\n# Refactor-Equivalence (CrossHair diffbehavior + Hypothesis fallback)\n\nAn agent asserting \"this refactor is behavior-preserving\" is the weakest kind of verifier — it is grading its own work. This skill replaces the assertion with an **external, symbolic proof**: CrossHair's `diffbehavior` drives Z3 to hunt for a concrete input where the old and new implementations diverge. Find one → the \"pure refactor\" is a silent behavior change; find none across all explored paths → high confidence the refactor is sound.\n\nThis is the differential (two-function) counterpart to the cosmetic-patch tripwire (which proves a change *cannot* alter behavior at the bytecode level). Use this when the code genuinely changed but is *claimed* semantically identical.\n\nEvidence: MASTER decision-queue A-Tier2 (CrossHair `diffbehavior`), `agentic-repair-2 #5`, `general 4f` — REC: ADOPT, verified.\n\n## When to run\n- A diff is described as a **pure \u002F deterministic refactor**: \"same output\", \"no functional change\", \"just cleaner\", extract\u002Finline, rewrite a pure helper, simplify a branch.\n- During VALIDATE for a work-unit whose acceptance is \"behavior unchanged\".\n- Before trusting an agent-authored refactor of a **pure** function (arithmetic, string\u002Fcollection transforms, parsers, clamps, comparators, encoders).\n\n## Scope guard (READ FIRST — false results otherwise)\n`diffbehavior` only reasons about **pure, deterministic** functions. It will give misleading or unstable answers if the function:\n- does I\u002FO, touches the filesystem\u002Fnetwork, or logs;\n- reads\u002Fwrites module globals or mutable default args;\n- uses `time`, `random`, `uuid`, thread\u002FPID, dict\u002Fset iteration order, or any non-determinism;\n- mutates its arguments in place (compare return values only).\n\nIf the function isn't pure, either extract the pure core and diff *that*, or fall back to a Hypothesis differential test with a fixed seed. Local Python is **3.14 (unsupported by CrossHair today)** — run under **3.12** (a `py -3.12` venv, matching CI).\n\n## Protocol\n\n### 1. Make old and new both importable\n`diffbehavior` compares two importable callables. Keep the pre-refactor body reachable — e.g. copy it to `mod.clip_old` and the new one to `mod.clip_new`, or point at two git revisions of the same qualified name. Both must be plain functions with the same call signature; **type-annotate the parameters** (CrossHair uses the hints to build symbolic inputs).\n\n### 2. Run the symbolic diff (primary rail)\n```bash\n# in a Python 3.12 venv with:  pip install crosshair-tool\npython -m crosshair diffbehavior mod.clip_old mod.clip_new\n# tuning knobs when needed:\n#   --per_condition_timeout=\u003Csec>   cap Z3 time per path (raise for hard fns)\n#   --per_path_timeout=\u003Csec>\n```\nRead the exit code, not prose:\n- **Counterexample printed, exit 1** → NOT equivalent. The listed `(x=...)` input is a concrete reproducer where the two disagree; this is the silent behavior change. Surface it.\n- **`No differences found ... functions are likely the same!`, exit 0** → equivalent across all explored paths. Confidence scales with how much of the input space Z3 exhausted (\"All paths exhausted\" = strongest).\n- **exit 2 \u002F can't analyze** → CrossHair couldn't symbolically execute it → go to the fallback.\n\n### 3. Hypothesis differential fallback (when CrossHair can't)\nWhen the function hits a C extension, an unsupported type, or times out, fuzz both and assert equality:\n```python\nfrom hypothesis import given, strategies as st, settings\nfrom mod import clip_old, clip_new\n\n@settings(max_examples=300)  # deterministic seed by default; add derandomize=True in CI\n@given(x=st.integers(min_value=-1000, max_value=1000))\ndef test_refactor_equivalent(x):\n    assert clip_old(x) == clip_new(x), f\"diverge at x={x}\"\n```\nA falsifying example is the same signal as a Z3 counterexample (weaker guarantee — sampled, not exhaustive — but works on anything runnable). Choose strategies that actually cover boundaries (`min_value`\u002F`max_value`, empty collections, None, NaN).\n\n### 4. Report (advisory \u002F shadow — never blocks)\nThis skill **observes and reports**; it does not gate a commit or nag. Emit a terminal-state line:\n- `EQUIV: mod.old ≡ mod.new (crosshair: all paths exhausted)` — refactor claim upheld.\n- `DIVERGE: mod.old ≠ mod.new at (x=100) → 100 vs 99` — the \"pure refactor\" changes behavior; hand the reproducer back for a fix or a spec decision.\n\nDo not auto-fail the work-unit on a DIVERGE; a divergence can be an *intended* behavior change mislabeled as a refactor. Name it and let the author\u002Fowner decide.\n\n## Why symbolic beats \"I re-read it and it looks the same\"\nRe-reading is same-context self-confirmation. Z3 is an independent solver that will find the off-by-one boundary you missed — e.g. `max(0, min(x, 99))` vs a real `[0,100]` clamp diverges precisely at `x=100`, which random spot-checks around 50 never hit. The solver targets the path constraints, so it lands on exactly the edge inputs a human skims past.\n\n## Verified (this machine)\nProven end-to-end under Python 3.12.10, `crosshair-tool 0.0.108`:\n- **Broken clamp** `clip_old` (`[0,100]`) vs `clip_new` (`max(0,min(x,99))`): `diffbehavior` returned `Given: (x=100), clip_old: returns 100 \u002F clip_new: returns 99`, exit 1. ✅ caught the off-by-one.\n- **True equivalence** `x + x` vs `x * 2`: `No differences found ... functions are likely the same!`, exit 0. ✅ no false positive.\n- **Hypothesis fallback** on the same broken clamp: falsifying example `x=100` (`100 != 99`), exit 1 — independently reproduced the identical boundary. ✅ fallback rail works.\n","# Refactor-Equivalence (CrossHair diffbehavior + Hypothesis fallback)\n\nAn agent asserting \"this refactor is behavior-preserving\" is the weakest kind of verifier — it is grading its own work. This skill replaces the assertion with an **external, symbolic proof**: CrossHair's `diffbehavior` drives Z3 to hunt for a concrete input where the old and new implementations diverge. Find one → the \"pure refactor\" is a silent behavior change; find none across all explored paths → high confidence the refactor is sound.\n\nThis is the differential (two-function) counterpart to the cosmetic-patch tripwire (which proves a change *cannot* alter behavior at the bytecode level). Use this when the code genuinely changed but is *claimed* semantically identical.\n\nEvidence: MASTER decision-queue A-Tier2 (CrossHair `diffbehavior`), `agentic-repair-2 #5`, `general 4f` — REC: ADOPT, verified.\n\n## When to run\n- A diff is described as a **pure \u002F deterministic refactor**: \"same output\", \"no functional change\", \"just cleaner\", extract\u002Finline, rewrite a pure helper, simplify a branch.\n- During VALIDATE for a work-unit whose acceptance is \"behavior unchanged\".\n- Before trusting an agent-authored refactor of a **pure** function (arithmetic, string\u002Fcollection transforms, parsers, clamps, comparators, encoders).\n\n## Scope guard (READ FIRST — false results otherwise)\n`diffbehavior` only reasons about **pure, deterministic** functions. It will give misleading or unstable answers if the function:\n- does I\u002FO, touches the filesystem\u002Fnetwork, or logs;\n- reads\u002Fwrites module globals or mutable default args;\n- uses `time`, `random`, `uuid`, thread\u002FPID, dict\u002Fset iteration order, or any non-determinism;\n- mutates its arguments in place (compare return values only).\n\nIf the function isn't pure, either extract the pure core and diff *that*, or fall back to a Hypothesis differential test with a fixed seed. Local Python is **3.14 (unsupported by CrossHair today)** — run under **3.12** (a `py -3.12` venv, matching CI).\n\n## Protocol\n\n### 1. Make old and new both importable\n`diffbehavior` compares two importable callables. Keep the pre-refactor body reachable — e.g. copy it to `mod.clip_old` and the new one to `mod.clip_new`, or point at two git revisions of the same qualified name. Both must be plain functions with the same call signature; **type-annotate the parameters** (CrossHair uses the hints to build symbolic inputs).\n\n### 2. Run the symbolic diff (primary rail)\n```bash\n# in a Python 3.12 venv with:  pip install crosshair-tool\npython -m crosshair diffbehavior mod.clip_old mod.clip_new\n# tuning knobs when needed:\n#   --per_condition_timeout=\u003Csec>   cap Z3 time per path (raise for hard fns)\n#   --per_path_timeout=\u003Csec>\n```\nRead the exit code, not prose:\n- **Counterexample printed, exit 1** → NOT equivalent. The listed `(x=...)` input is a concrete reproducer where the two disagree; this is the silent behavior change. Surface it.\n- **`No differences found ... functions are likely the same!`, exit 0** → equivalent across all explored paths. Confidence scales with how much of the input space Z3 exhausted (\"All paths exhausted\" = strongest).\n- **exit 2 \u002F can't analyze** → CrossHair couldn't symbolically execute it → go to the fallback.\n\n### 3. Hypothesis differential fallback (when CrossHair can't)\nWhen the function hits a C extension, an unsupported type, or times out, fuzz both and assert equality:\n```python\nfrom hypothesis import given, strategies as st, settings\nfrom mod import clip_old, clip_new\n\n@settings(max_examples=300)  # deterministic seed by default; add derandomize=True in CI\n@given(x=st.integers(min_value=-1000, max_value=1000))\ndef test_refactor_equivalent(x):\n    assert clip_old(x) == clip_new(x), f\"diverge at x={x}\"\n```\nA falsifying example is the same signal as a Z3 counterexample (weaker guarantee — sampled, not exhaustive — but works on anything runnable). Choose strategies that actually cover boundaries (`min_value`\u002F`max_value`, empty collections, None, NaN).\n\n### 4. Report (advisory \u002F shadow — never blocks)\nThis skill **observes and reports**; it does not gate a commit or nag. Emit a terminal-state line:\n- `EQUIV: mod.old ≡ mod.new (crosshair: all paths exhausted)` — refactor claim upheld.\n- `DIVERGE: mod.old ≠ mod.new at (x=100) → 100 vs 99` — the \"pure refactor\" changes behavior; hand the reproducer back for a fix or a spec decision.\n\nDo not auto-fail the work-unit on a DIVERGE; a divergence can be an *intended* behavior change mislabeled as a refactor. Name it and let the author\u002Fowner decide.\n\n## Why symbolic beats \"I re-read it and it looks the same\"\nRe-reading is same-context self-confirmation. Z3 is an independent solver that will find the off-by-one boundary you missed — e.g. `max(0, min(x, 99))` vs a real `[0,100]` clamp diverges precisely at `x=100`, which random spot-checks around 50 never hit. The solver targets the path constraints, so it lands on exactly the edge inputs a human skims past.\n\n## Verified (this machine)\nProven end-to-end under Python 3.12.10, `crosshair-tool 0.0.108`:\n- **Broken clamp** `clip_old` (`[0,100]`) vs `clip_new` (`max(0,min(x,99))`): `diffbehavior` returned `Given: (x=100), clip_old: returns 100 \u002F clip_new: returns 99`, exit 1. ✅ caught the off-by-one.\n- **True equivalence** `x + x` vs `x * 2`: `No differences found ... functions are likely the same!`, exit 0. ✅ no false positive.\n- **Hypothesis fallback** on the same broken clamp: falsifying example `x=100` (`100 != 99`), exit 1 — independently reproduced the identical boundary. ✅ fallback rail works.\n",{"name":5,"description":7},"main","a298c929b6cbd662e1fce54302ce520d5ceea1a5",".agents\u002Fskills\u002Frefactor-equivalence","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain","https:\u002F\u002Fgithub.com\u002FPrekzursil","2026-11-02 14:30:57",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add Prekzursil\u002Fagent-skills-toolchain --skill refactor-equivalence",{"tool":56,"command":57},"bunx","bunx skills add Prekzursil\u002Fagent-skills-toolchain --skill refactor-equivalence",{"tool":59,"command":60},"pnpm","pnpm dlx skills add Prekzursil\u002Fagent-skills-toolchain --skill refactor-equivalence","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Frefactor-equivalence\u002FSKILL.md",true,[],[65,86,115,142,156,172],{"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":39},"01M6DF7D7478R55P46REYH4QAC","clarify-requirements","Resolve genuine pre-execution ambiguity by scanning repo context, generating 1-6 grounded options, and asking 1-3 focused questions via AskUserQuestion. NOT for mid-task use (injection risk); NOT when the goal is already unambiguous; use to disambiguate vague prompts before any file edits.","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Fworkspace-hooks\u002Fskills\u002Fclarify-requirements\u002FSKILL.md",[],[72,73,74,75,76,77,78,79,80,32,81,82,83,84,85],"clarify requirements","clarify","requirements","risk","options","task","prompts","goal","scanning","context","repo","injection","execution","file",{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":95,"publishedAt":39},"01M6DF79CA4BHJS66J8EZDBPWJ","openmm-md","Run FREE, open-source, Windows-native GPU molecular dynamics via the openmm-md MCP (OpenMM + CUDA on the local NVIDIA GPU). Use for protein \u002F protein-ligand MD when you want a free stack or are on Windows without a Schrodinger license. Covers the full workflow (prepare, solvate, minimize, equilibrate, production, analyze, mmgbsa) AND an honest decision guide vs Schrodinger Desmond, including how to run Desmond legitimately on Linux or a cloud GPU with a real license. This is a deliberately LESSER free alternative and does NOT replace the schrodinger MCP tools. Do NOT use it to pick a free tool when a validated FEP+, WaterMap, IFD-MD, or Prime MM-GBSA result is actually required.","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Fmcp\u002Fopenmm-md-mcp\u002Fskill\u002Fopenmm-md\u002FSKILL.md",[92],{"categoryNo":93,"categoryName":94,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[96,97,98,99,100,101,102,103,104,105,106,107,108,109,32,110,111,112,113,114],"openmm md","how","decision","pick","linux","analyze","tool","stack","open","NVIDIA","gpu","license","workflow","windows","free","molecular dynamics","local","do","MCP",{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":127,"publishedAt":39},"01M6DF76C1MG85VEWP8VZCBNMN","visual-review","Take screenshots of web pages and UI using Playwright for visual review and iteration","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Feditor\u002Fmetaswarm\u002Fskills\u002Fvisual-review\u002FSKILL.md",[121,124],{"categoryNo":122,"categoryName":123,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000003","演示文稿",{"categoryNo":125,"categoryName":126,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",[128,129,130,131,132,133,134,135,136,137,97,138,139,140,141],"review","visual","visual review","pages","web","false","iteration","take","check","slides","ui","screenshot","playwright","screenshots",{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":148,"publishedAt":39},"01M6DF73AQVCBZKEN0YXEX9FXP","status","Diagnostic status report — shows metaswarm installation state, project setup, and potential issues","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Feditor\u002Fmetaswarm\u002Fskills\u002Fstatus\u002FSKILL.md",[],[144,149,150,151,152,153,154,155],"setup","report","project","installation","project setup","issues","state",{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":163,"publishedAt":39},"01M6DF6X6C2XB0P6GX76P7TTYV","start","Use when starting work on any task, when the user mentions metaswarm, or when the user wants to begin tracked development work","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Feditor\u002Fmetaswarm\u002Fskills\u002Fstart\u002FSKILL.md",[162],{"categoryNo":93,"categoryName":94,"taxonomyType":21,"taxonomyTypeDesc":22},[158,164,77,165,166,167,32,168,169,170,171],"start issue","issue","ready","work on issue","user","work","work on","development",{"skillNo":173,"name":149,"nameZh":6,"description":174,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":175,"categories":176,"keywords":177,"publishedAt":39},"01M6DF6QMJ9AJKFKHHKRT005PQ","Interactive project setup — detects your project, configures metaswarm, writes project-local files","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Feditor\u002Fmetaswarm\u002Fskills\u002Fsetup\u002FSKILL.md",[],[149,151,112,178,153,179],"files","interactive"]