[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AAKF333EW1HBQHCHW7DNE1":3,"skill-same:01M7AAKF333EW1HBQHCHW7DNE1":88},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":13,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":43},"01M7AAKF333EW1HBQHCHW7DNE1","refactor-skill",null,"Split and consolidate existing Agent Skills without losing battle-tested content. Use when the user names a skill whose SKILL.md or referenced files have grown too large, dense, duplicated, or hard to load, and wants it reorganized into progressively disclosed files.","joeloverbeck\u002Fskill-evidence","joeloverbeck","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F120873?v=4","01M758KCBJ0GWAPGN74C9NJF8T","01M7AAJ49JAQNVPTMQSWVB57TY",0,"MIT","https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fskill-evidence\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frefactor-skill\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: refactor-skill\ndescription: Split and consolidate existing Agent Skills without losing battle-tested content. Use when the user names a skill whose SKILL.md or referenced files have grown too large, dense, duplicated, or hard to load, and wants it reorganized into progressively disclosed files.\ndisable-model-invocation: true\n---\n\n# Refactor Skill\n\nRefactor one existing skill package into a smaller, navigable `SKILL.md` plus\ndirectly disclosed files. Preserve its behavior, public interface, dependency\ncontracts, source custody, and every live instruction unless the user explicitly\nauthorizes a named contract or interface change.\n\n### Skill-local meta-tooling\n\nThe interface and preservation auditors under `scripts\u002F` are executable\nmeta-tooling. They do not read, write, or adjudicate recorded evidence, gate\nstate, or dispositions. Their production paths read only the caller-supplied\nrepository, package, snapshot, comparison tree, and checklist inputs; emit\ndiagnostics, digests, JSON receipts, TSV checklists, and exit status; perform no\nnetwork access; use no external service; and remain confined to this skill\npackage.\n\nDeterminism contract: with the same Node.js runtime, command arguments, current\nworking directory, byte-identical explicit inputs, and the same repository-tree\nbytes and path identities, each production command emits the same diagnostics,\ndigests, receipts, checklists, and exit status. The auditors consume no clock,\nrandomness, network, or external-service input. Every ordered output uses\nlocale-independent UTF-16 code-unit ordering.\n\nRuntime requirement: Node.js 20 or later, with ESM `.mjs` and the built-in\n`node:test` runner. Each production script has exactly one declaration entry:\n\n- `scripts\u002Fcode-unit-order.mjs` is the side-effect-free ordering owner imported\n  by both auditor commands. It accepts two in-memory strings and returns their\n  locale-independent UTF-16 code-unit comparison; it has no standalone command,\n  reads no external input, emits no output, and writes nothing. Both auditor\n  verification suites exercise it through their public commands.\n- `scripts\u002Finterface-audit.mjs` provides\n  `node .claude\u002Fskills\u002Frefactor-skill\u002Fscripts\u002Finterface-audit.mjs snapshot \u003Ctarget-skill-dir> [--scan-root \u003Cpath>]...`,\n  `node .claude\u002Fskills\u002Frefactor-skill\u002Fscripts\u002Finterface-audit.mjs check \u003Ctarget-skill-dir> [--scan-root \u003Cpath>]...`,\n  and\n  `node .claude\u002Fskills\u002Frefactor-skill\u002Fscripts\u002Finterface-audit.mjs verify \u003Cbefore.json> \u003Ctarget-skill-dir> [--mode strict|migration]`.\n  It reads the target package, configured active scan roots, repository identity,\n  client manifests, and, for `verify`, the explicit baseline snapshot.\n  `snapshot` emits the interface snapshot as JSON; `check` emits the current\n  interface audit as JSON; `verify` emits the comparison receipt as JSON.\n  Successful commands and `--help` or `-h` exit 0; detected link\u002Finterface\n  problems and input or usage failures exit 2 with JSON or standard-error\n  diagnostics as applicable. Its verification suite is\n  `node --test .claude\u002Fskills\u002Frefactor-skill\u002Fscripts\u002Finterface-audit.test.mjs`.\n- `scripts\u002Fpreservation-audit.mjs` provides\n  `node .claude\u002Fskills\u002Frefactor-skill\u002Fscripts\u002Fpreservation-audit.mjs \u003Cbefore-dir> \u003Cafter-dir> [summary [limit]]`,\n  `node .claude\u002Fskills\u002Frefactor-skill\u002Fscripts\u002Fpreservation-audit.mjs \u003Cbefore-dir> \u003Cafter-dir> checklist`,\n  and\n  `node .claude\u002Fskills\u002Frefactor-skill\u002Fscripts\u002Fpreservation-audit.mjs verify-checklist \u003Cchecklist.tsv>`.\n  It reads the explicit comparison trees or checklist. `summary` emits a bounded\n  JSON inventory and preservation receipt; `checklist` emits the complete TSV\n  disposition checklist; `verify-checklist` emits a JSON verification receipt.\n  Successful commands and `--help` or `-h` exit 0; invalid, unreadable, or\n  incomplete inputs exit 2 with standard-error diagnostics. Its verification\n  suite is\n  `node --test .claude\u002Fskills\u002Frefactor-skill\u002Fscripts\u002Fpreservation-audit.test.mjs`.\n\nBoth verification suites write only to isolated fixtures under the operating\nsystem's temporary directory and remove them after each test. The production\ncommands write no repository file.\n\n## Capability contract\n\n### Identity, scope, and non-goals\n\nThis capability reorganizes one exact existing skill package. It may split,\nmove, and consolidate material within that package while retaining the same\nskill identity and invocation reach.\n\nIt does not redesign the target capability, reassign ownership, retire a source\nworkflow, change another skill, alter foundational principles, repair unrelated\ndefects, or treat shorter prose as proof of equivalent behavior. It does not\ncreate a persistent refactor dossier; custody and comparison ledgers live in a\nsession scratch directory and ordinary history lives in Git.\n\n### Required input and mode\n\nThe user must name one skill by exact path, folder, or skill name, for example:\n\n```text\n$refactor-skill .claude\u002Fskills\u002Fgrilling\n```\n\nResolve an ambiguous name by exact frontmatter `name`, then folder name. If\nmultiple live targets remain, return `BLOCKED_INPUT` with the candidates and the\nexact choice needed.\n\nChoose exactly one mode:\n\n- `STRICT_REFACTOR` is the default. It preserves behavior, frontmatter identity,\n  invocation policy, public entrypoint anchors, contract tokens, dependency\n  edges, requirement custody, source authority, and external callers. It writes\n  only the canonical target package. A compatibility stub inside `SKILL.md` is\n  part of the target package and is preferred to changing callers.\n- `INTERFACE_MIGRATION` applies only when the user's exact request or a later\n  explicit decision authorizes named public-interface changes and every external\n  file allowed to change. Before editing, record the approved migration ledger\n  required by [Interfaces and Sources](references\u002Finterfaces-and-sources.md).\n\nA generic request to split, shorten, consolidate, or refactor selects\n`STRICT_REFACTOR`; it does not authorize pruning live behavior, changing sibling\nskills, updating callers, or retiring temporary workflows.\n\n### Outputs and owners\n\nThe output is the same canonical skill package with a smaller executable\nentrypoint, directly discoverable supporting files, and current internal\npointers. In `STRICT_REFACTOR`, every external interface and owner is unchanged.\nIn `INTERFACE_MIGRATION`, only approved interface changes and approved external\nfiles may differ.\n\nThe target skill remains owner of its capability contract. Foundational\nprinciples, active sibling skills, temporary workflows, requirements inventories,\nhistorical evidence, and client mirrors retain their existing authority classes.\n\n### Read set, write set, and authority\n\nAlways read current repository guidance, applicable principles, the complete\nworking-tree target package, its client metadata, its exact mirror state, and the\ncurrent validators or checks used for delivery. Read active callers, callees,\ntemporary workflows, requirements inventories, and reports only when needed to\nclassify a live interface, dependency, source, or historical witness.\n\n`STRICT_REFACTOR` may write only the canonical target package. It must not edit a\nmirror copy, caller, sibling skill, workflow, requirement inventory, report,\nprinciple, or unrelated dirty file. `INTERFACE_MIGRATION` may additionally write\nonly the exact external paths approved in its migration ledger. Both modes may\ncreate and remove bounded scratch artifacts outside the repository.\n\nNaming a target authorizes reversible structural work inside that target. It\ndoes not authorize semantic pruning or external mutation. A proposed prune,\nownership change, public-anchor removal, contract-token change, dependency-edge\nchange, workflow retirement, or external edit returns `DECISION_REQUIRED` unless\nthe current request already authorizes that exact change and scope.\n\n### Prerequisites, outcomes, and invalidation\n\nThe current target, repository guidance, scratch snapshot, custody ledgers,\ninterface snapshot, relevant owners, and required validators are load-bearing.\nAn absent or contradictory owner, unresolved target, unwritable scratch location,\nor failed required instrument returns `BLOCKED_INPUT` or\n`BLOCKED_INFRASTRUCTURE` for the affected branch.\n\nAn invocation ends as one of:\n\n- `COMPLETE`: every ledger reconciles, every required check passes, and the\n  final package matches the authorized mode;\n- `DECISION_REQUIRED`: a proposed contract, interface, source-custody, prune, or\n  external-scope change lacks exact authority;\n- `BLOCKED_INPUT` or `BLOCKED_INFRASTRUCTURE`: a named condition prevents safe\n  continuation;\n- `INCONCLUSIVE`: preservation or interface equivalence cannot be established\n  from current evidence; or\n- `INVALID`: the result lost content, weakened behavior, broke an interface,\n  exceeded authority, or conflicts with repository principles.\n\nA strict refactor invalidates no consumer contract. An approved interface\nmigration invalidates every named caller or dependent contract in its migration\nledger until updated and reverified. Resume only from the exact working-tree\nsnapshot, persisted scratch ledgers, unchanged mode, and unchanged authority.\nIf the target, caller set, owner, validator, or approved scope changes, refresh\nthe affected baseline before continuing. Read-only retries are idempotent;\nrepeated edits must not duplicate files, pointers, or ledger rows.\n\n## Workflow\n\n### 1. Establish complete custody\n\nCheck `git status --short`, resolve the canonical target and mirror, and create a\nscratch directory outside the repository. Snapshot every working-tree entry in\nthe target before editing. Then read\n[Custody Ledgers](references\u002Fcustody-ledgers.md) in full and build its content,\nfile, public-interface, dependency, and source-custody ledgers.\n\nRun the interface snapshot before the first edit:\n\n```text\nnode .claude\u002Fskills\u002Frefactor-skill\u002Fscripts\u002Finterface-audit.mjs snapshot \u003Ctarget-skill-dir> --scan-root .claude\u002Fskills --scan-root docs > \u003Cscratchpad>\u002Finterface-before.json\n```\n\nAdjust scan roots only from current repository guidance; exclude mirrors and\nhistorical report\u002Farchive trees unless they are active callers.\n\n**Done when:** the scratch snapshot covers every target entry, all ledgers cover\ntheir required rows, the interface baseline is readable and clean, and no\nunclassified atom, file, interface, dependency, or source remains.\n\n### 2. Freeze interfaces, dependencies, and source custody\n\nRead [Interfaces and Sources](references\u002Finterfaces-and-sources.md) in full.\nClassify every inbound and outbound relationship, public entrypoint anchor,\ncontract token, dependency edge, requirement ID, mirror, workflow, and historical\nwitness. Select `STRICT_REFACTOR` unless exact authority already selects\n`INTERFACE_MIGRATION`.\n\nIn strict mode, retain public `SKILL.md` anchors as short compatibility stubs and\nleave every external file untouched. In migration mode, persist the exact\napproved migration ledger before the first external edit. A newly discovered\nscope-changing migration returns `DECISION_REQUIRED`.\n\n**Done when:** every external relationship has an authority class and final\ndisposition, strict-mode invariants are frozen, and every migration-mode change\nis explicitly authorized with a compatibility plan.\n\n### 3. Design progressive disclosure\n\nRead [Disclosure and Consolidation](references\u002Fdisclosure-and-consolidation.md)\nin full. Keep the invocation contract, ordered common path, early safety rules,\npublic compatibility anchors, required context pointers, and final gates in\n`SKILL.md`. Move branch-only detail, examples, templates, explanations, and\nmechanical checklists into focused files directly linked from `SKILL.md`.\n\nFor every extracted file record its trigger, read deadline, purpose, and return\npoint. Plan moves before compression. In strict mode, a prune candidate blocks;\nexact duplicate consolidation is permitted only when every unique delta and\nfiring point survives.\n\n**Done when:** every atom has one authorized final home, every disclosed file has\na direct conditional pointer from `SKILL.md`, public anchors retain compatible\nstubs, and no nested disclosure chain is required to find a live instruction.\n\n### 4. Edit from the ledgers\n\nApply the smallest file-scoped patches that realize the frozen plan. Rebase each\nmoved relative link from its new source location while preserving its canonical\ntarget and fragment. Update ledger homes before deviating from the plan.\n\nIf an edit fails, is interrupted, or returns an ambiguous result, stop before\nanother patch. For scratch-only operations, reread the scratch target. For any\noperation that may have touched the repository, refresh target inventory,\n`git status --short`, and exact edited paths; classify the result as no write,\npartial write, or complete write, then resume from the ledgers.\n\n**Done when:** the planned target files exist, every edit is classified, no\nunauthorized path changed, and all internal pointers resolve from their new\nlocations.\n\n### 5. Verify interface preservation\n\nRun the interface verifier against the pre-edit snapshot:\n\n```text\nnode .claude\u002Fskills\u002Frefactor-skill\u002Fscripts\u002Finterface-audit.mjs verify \u003Cscratchpad>\u002Finterface-before.json \u003Ctarget-skill-dir> --mode strict\n```\n\nFor an authorized migration, use `--mode migration`; every reported interface\nchange must appear exactly once in the approved migration ledger, and every\ncurrent local link and fragment must still resolve. Also inspect changed plain\npaths and directional prose, which the helper intentionally does not infer.\n\n**Done when:** strict verification reports zero changes and zero problems, or\nevery migration change is authorized and reconciled with zero link problems.\n\n### 6. Prove content and package preservation\n\nRead [Preservation and Closeout](references\u002Fpreservation-and-closeout.md) in full.\nRun the all-file, word-occurrence, window, checklist, validator, mirror, and\nworktree checks against the scratch snapshot—not against `HEAD`. Resolve every\nshortfall or changed entry with a ledger-backed disposition.\n\n**Done when:** the final package and all ledgers agree, every required instrument\npasses, unexplained deletion is zero, and pre-existing target and unrelated dirt\nare reconciled separately.\n\n### 7. Deliver the final report\n\nReport:\n\n- target, canonical path, and selected mode;\n- files created, changed, moved, or removed;\n- what stayed inline and what moved behind each conditional pointer;\n- every consolidation, approved prune, or interface migration with its reason\n  and authority;\n- public-interface, dependency, requirement-custody, workflow-source, pointer,\n  fragment, and mirror results;\n- preservation helper, interface helper, deterministic test, validator, and\n  fallback commands with results;\n- initial-versus-final worktree reconciliation, separating pre-existing target\n  dirt from unrelated dirt; and\n- any retained uncertainty, blocker, or battle-tested instruction kept because\n  equivalence was not established.\n\n**Done when:** the report matches the actual file inventory and authorized mode,\nand it makes no broader completeness claim than the checks establish.\n","# Refactor Skill\n\nRefactor one existing skill package into a smaller, navigable `SKILL.md` plus\ndirectly disclosed files. Preserve its behavior, public interface, dependency\ncontracts, source custody, and every live instruction unless the user explicitly\nauthorizes a named contract or interface change.\n\n### Skill-local meta-tooling\n\nThe interface and preservation auditors under `scripts\u002F` are executable\nmeta-tooling. They do not read, write, or adjudicate recorded evidence, gate\nstate, or dispositions. Their production paths read only the caller-supplied\nrepository, package, snapshot, comparison tree, and checklist inputs; emit\ndiagnostics, digests, JSON receipts, TSV checklists, and exit status; perform no\nnetwork access; use no external service; and remain confined to this skill\npackage.\n\nDeterminism contract: with the same Node.js runtime, command arguments, current\nworking directory, byte-identical explicit inputs, and the same repository-tree\nbytes and path identities, each production command emits the same diagnostics,\ndigests, receipts, checklists, and exit status. The auditors consume no clock,\nrandomness, network, or external-service input. Every ordered output uses\nlocale-independent UTF-16 code-unit ordering.\n\nRuntime requirement: Node.js 20 or later, with ESM `.mjs` and the built-in\n`node:test` runner. Each production script has exactly one declaration entry:\n\n- `scripts\u002Fcode-unit-order.mjs` is the side-effect-free ordering owner imported\n  by both auditor commands. It accepts two in-memory strings and returns their\n  locale-independent UTF-16 code-unit comparison; it has no standalone command,\n  reads no external input, emits no output, and writes nothing. Both auditor\n  verification suites exercise it through their public commands.\n- `scripts\u002Finterface-audit.mjs` provides\n  `node .claude\u002Fskills\u002Frefactor-skill\u002Fscripts\u002Finterface-audit.mjs snapshot \u003Ctarget-skill-dir> [--scan-root \u003Cpath>]...`,\n  `node .claude\u002Fskills\u002Frefactor-skill\u002Fscripts\u002Finterface-audit.mjs check \u003Ctarget-skill-dir> [--scan-root \u003Cpath>]...`,\n  and\n  `node .claude\u002Fskills\u002Frefactor-skill\u002Fscripts\u002Finterface-audit.mjs verify \u003Cbefore.json> \u003Ctarget-skill-dir> [--mode strict|migration]`.\n  It reads the target package, configured active scan roots, repository identity,\n  client manifests, and, for `verify`, the explicit baseline snapshot.\n  `snapshot` emits the interface snapshot as JSON; `check` emits the current\n  interface audit as JSON; `verify` emits the comparison receipt as JSON.\n  Successful commands and `--help` or `-h` exit 0; detected link\u002Finterface\n  problems and input or usage failures exit 2 with JSON or standard-error\n  diagnostics as applicable. Its verification suite is\n  `node --test .claude\u002Fskills\u002Frefactor-skill\u002Fscripts\u002Finterface-audit.test.mjs`.\n- `scripts\u002Fpreservation-audit.mjs` provides\n  `node .claude\u002Fskills\u002Frefactor-skill\u002Fscripts\u002Fpreservation-audit.mjs \u003Cbefore-dir> \u003Cafter-dir> [summary [limit]]`,\n  `node .claude\u002Fskills\u002Frefactor-skill\u002Fscripts\u002Fpreservation-audit.mjs \u003Cbefore-dir> \u003Cafter-dir> checklist`,\n  and\n  `node .claude\u002Fskills\u002Frefactor-skill\u002Fscripts\u002Fpreservation-audit.mjs verify-checklist \u003Cchecklist.tsv>`.\n  It reads the explicit comparison trees or checklist. `summary` emits a bounded\n  JSON inventory and preservation receipt; `checklist` emits the complete TSV\n  disposition checklist; `verify-checklist` emits a JSON verification receipt.\n  Successful commands and `--help` or `-h` exit 0; invalid, unreadable, or\n  incomplete inputs exit 2 with standard-error diagnostics. Its verification\n  suite is\n  `node --test .claude\u002Fskills\u002Frefactor-skill\u002Fscripts\u002Fpreservation-audit.test.mjs`.\n\nBoth verification suites write only to isolated fixtures under the operating\nsystem's temporary directory and remove them after each test. The production\ncommands write no repository file.\n\n## Capability contract\n\n### Identity, scope, and non-goals\n\nThis capability reorganizes one exact existing skill package. It may split,\nmove, and consolidate material within that package while retaining the same\nskill identity and invocation reach.\n\nIt does not redesign the target capability, reassign ownership, retire a source\nworkflow, change another skill, alter foundational principles, repair unrelated\ndefects, or treat shorter prose as proof of equivalent behavior. It does not\ncreate a persistent refactor dossier; custody and comparison ledgers live in a\nsession scratch directory and ordinary history lives in Git.\n\n### Required input and mode\n\nThe user must name one skill by exact path, folder, or skill name, for example:\n\n```text\n$refactor-skill .claude\u002Fskills\u002Fgrilling\n```\n\nResolve an ambiguous name by exact frontmatter `name`, then folder name. If\nmultiple live targets remain, return `BLOCKED_INPUT` with the candidates and the\nexact choice needed.\n\nChoose exactly one mode:\n\n- `STRICT_REFACTOR` is the default. It preserves behavior, frontmatter identity,\n  invocation policy, public entrypoint anchors, contract tokens, dependency\n  edges, requirement custody, source authority, and external callers. It writes\n  only the canonical target package. A compatibility stub inside `SKILL.md` is\n  part of the target package and is preferred to changing callers.\n- `INTERFACE_MIGRATION` applies only when the user's exact request or a later\n  explicit decision authorizes named public-interface changes and every external\n  file allowed to change. Before editing, record the approved migration ledger\n  required by [Interfaces and Sources](references\u002Finterfaces-and-sources.md).\n\nA generic request to split, shorten, consolidate, or refactor selects\n`STRICT_REFACTOR`; it does not authorize pruning live behavior, changing sibling\nskills, updating callers, or retiring temporary workflows.\n\n### Outputs and owners\n\nThe output is the same canonical skill package with a smaller executable\nentrypoint, directly discoverable supporting files, and current internal\npointers. In `STRICT_REFACTOR`, every external interface and owner is unchanged.\nIn `INTERFACE_MIGRATION`, only approved interface changes and approved external\nfiles may differ.\n\nThe target skill remains owner of its capability contract. Foundational\nprinciples, active sibling skills, temporary workflows, requirements inventories,\nhistorical evidence, and client mirrors retain their existing authority classes.\n\n### Read set, write set, and authority\n\nAlways read current repository guidance, applicable principles, the complete\nworking-tree target package, its client metadata, its exact mirror state, and the\ncurrent validators or checks used for delivery. Read active callers, callees,\ntemporary workflows, requirements inventories, and reports only when needed to\nclassify a live interface, dependency, source, or historical witness.\n\n`STRICT_REFACTOR` may write only the canonical target package. It must not edit a\nmirror copy, caller, sibling skill, workflow, requirement inventory, report,\nprinciple, or unrelated dirty file. `INTERFACE_MIGRATION` may additionally write\nonly the exact external paths approved in its migration ledger. Both modes may\ncreate and remove bounded scratch artifacts outside the repository.\n\nNaming a target authorizes reversible structural work inside that target. It\ndoes not authorize semantic pruning or external mutation. A proposed prune,\nownership change, public-anchor removal, contract-token change, dependency-edge\nchange, workflow retirement, or external edit returns `DECISION_REQUIRED` unless\nthe current request already authorizes that exact change and scope.\n\n### Prerequisites, outcomes, and invalidation\n\nThe current target, repository guidance, scratch snapshot, custody ledgers,\ninterface snapshot, relevant owners, and required validators are load-bearing.\nAn absent or contradictory owner, unresolved target, unwritable scratch location,\nor failed required instrument returns `BLOCKED_INPUT` or\n`BLOCKED_INFRASTRUCTURE` for the affected branch.\n\nAn invocation ends as one of:\n\n- `COMPLETE`: every ledger reconciles, every required check passes, and the\n  final package matches the authorized mode;\n- `DECISION_REQUIRED`: a proposed contract, interface, source-custody, prune, or\n  external-scope change lacks exact authority;\n- `BLOCKED_INPUT` or `BLOCKED_INFRASTRUCTURE`: a named condition prevents safe\n  continuation;\n- `INCONCLUSIVE`: preservation or interface equivalence cannot be established\n  from current evidence; or\n- `INVALID`: the result lost content, weakened behavior, broke an interface,\n  exceeded authority, or conflicts with repository principles.\n\nA strict refactor invalidates no consumer contract. An approved interface\nmigration invalidates every named caller or dependent contract in its migration\nledger until updated and reverified. Resume only from the exact working-tree\nsnapshot, persisted scratch ledgers, unchanged mode, and unchanged authority.\nIf the target, caller set, owner, validator, or approved scope changes, refresh\nthe affected baseline before continuing. Read-only retries are idempotent;\nrepeated edits must not duplicate files, pointers, or ledger rows.\n\n## Workflow\n\n### 1. Establish complete custody\n\nCheck `git status --short`, resolve the canonical target and mirror, and create a\nscratch directory outside the repository. Snapshot every working-tree entry in\nthe target before editing. Then read\n[Custody Ledgers](references\u002Fcustody-ledgers.md) in full and build its content,\nfile, public-interface, dependency, and source-custody ledgers.\n\nRun the interface snapshot before the first edit:\n\n```text\nnode .claude\u002Fskills\u002Frefactor-skill\u002Fscripts\u002Finterface-audit.mjs snapshot \u003Ctarget-skill-dir> --scan-root .claude\u002Fskills --scan-root docs > \u003Cscratchpad>\u002Finterface-before.json\n```\n\nAdjust scan roots only from current repository guidance; exclude mirrors and\nhistorical report\u002Farchive trees unless they are active callers.\n\n**Done when:** the scratch snapshot covers every target entry, all ledgers cover\ntheir required rows, the interface baseline is readable and clean, and no\nunclassified atom, file, interface, dependency, or source remains.\n\n### 2. Freeze interfaces, dependencies, and source custody\n\nRead [Interfaces and Sources](references\u002Finterfaces-and-sources.md) in full.\nClassify every inbound and outbound relationship, public entrypoint anchor,\ncontract token, dependency edge, requirement ID, mirror, workflow, and historical\nwitness. Select `STRICT_REFACTOR` unless exact authority already selects\n`INTERFACE_MIGRATION`.\n\nIn strict mode, retain public `SKILL.md` anchors as short compatibility stubs and\nleave every external file untouched. In migration mode, persist the exact\napproved migration ledger before the first external edit. A newly discovered\nscope-changing migration returns `DECISION_REQUIRED`.\n\n**Done when:** every external relationship has an authority class and final\ndisposition, strict-mode invariants are frozen, and every migration-mode change\nis explicitly authorized with a compatibility plan.\n\n### 3. Design progressive disclosure\n\nRead [Disclosure and Consolidation](references\u002Fdisclosure-and-consolidation.md)\nin full. Keep the invocation contract, ordered common path, early safety rules,\npublic compatibility anchors, required context pointers, and final gates in\n`SKILL.md`. Move branch-only detail, examples, templates, explanations, and\nmechanical checklists into focused files directly linked from `SKILL.md`.\n\nFor every extracted file record its trigger, read deadline, purpose, and return\npoint. Plan moves before compression. In strict mode, a prune candidate blocks;\nexact duplicate consolidation is permitted only when every unique delta and\nfiring point survives.\n\n**Done when:** every atom has one authorized final home, every disclosed file has\na direct conditional pointer from `SKILL.md`, public anchors retain compatible\nstubs, and no nested disclosure chain is required to find a live instruction.\n\n### 4. Edit from the ledgers\n\nApply the smallest file-scoped patches that realize the frozen plan. Rebase each\nmoved relative link from its new source location while preserving its canonical\ntarget and fragment. Update ledger homes before deviating from the plan.\n\nIf an edit fails, is interrupted, or returns an ambiguous result, stop before\nanother patch. For scratch-only operations, reread the scratch target. For any\noperation that may have touched the repository, refresh target inventory,\n`git status --short`, and exact edited paths; classify the result as no write,\npartial write, or complete write, then resume from the ledgers.\n\n**Done when:** the planned target files exist, every edit is classified, no\nunauthorized path changed, and all internal pointers resolve from their new\nlocations.\n\n### 5. Verify interface preservation\n\nRun the interface verifier against the pre-edit snapshot:\n\n```text\nnode .claude\u002Fskills\u002Frefactor-skill\u002Fscripts\u002Finterface-audit.mjs verify \u003Cscratchpad>\u002Finterface-before.json \u003Ctarget-skill-dir> --mode strict\n```\n\nFor an authorized migration, use `--mode migration`; every reported interface\nchange must appear exactly once in the approved migration ledger, and every\ncurrent local link and fragment must still resolve. Also inspect changed plain\npaths and directional prose, which the helper intentionally does not infer.\n\n**Done when:** strict verification reports zero changes and zero problems, or\nevery migration change is authorized and reconciled with zero link problems.\n\n### 6. Prove content and package preservation\n\nRead [Preservation and Closeout](references\u002Fpreservation-and-closeout.md) in full.\nRun the all-file, word-occurrence, window, checklist, validator, mirror, and\nworktree checks against the scratch snapshot—not against `HEAD`. Resolve every\nshortfall or changed entry with a ledger-backed disposition.\n\n**Done when:** the final package and all ledgers agree, every required instrument\npasses, unexplained deletion is zero, and pre-existing target and unrelated dirt\nare reconciled separately.\n\n### 7. Deliver the final report\n\nReport:\n\n- target, canonical path, and selected mode;\n- files created, changed, moved, or removed;\n- what stayed inline and what moved behind each conditional pointer;\n- every consolidation, approved prune, or interface migration with its reason\n  and authority;\n- public-interface, dependency, requirement-custody, workflow-source, pointer,\n  fragment, and mirror results;\n- preservation helper, interface helper, deterministic test, validator, and\n  fallback commands with results;\n- initial-versus-final worktree reconciliation, separating pre-existing target\n  dirt from unrelated dirt; and\n- any retained uncertainty, blocker, or battle-tested instruction kept because\n  equivalence was not established.\n\n**Done when:** the report matches the actual file inventory and authorized mode,\nand it makes no broader completeness claim than the checks establish.\n",{"name":5,"description":7,"disable-model-invocation":23},true,"main","9b13db1df193bd0709752040255bd64b682d3242",".claude\u002Fskills\u002Frefactor-skill","https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fskill-evidence","https:\u002F\u002Fdocs.rs\u002Fskill-evidence","https:\u002F\u002Fgithub.com\u002Fjoeloverbeck","2026-08-23 17:23:53",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":23},[33,36,39],{"tool":34,"command":35},"npx","npx skills add joeloverbeck\u002Fskill-evidence --skill refactor-skill",{"tool":37,"command":38},"bunx","bunx skills add joeloverbeck\u002Fskill-evidence --skill refactor-skill",{"tool":40,"command":41},"pnpm","pnpm dlx skills add joeloverbeck\u002Fskill-evidence --skill refactor-skill","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fskill-evidence\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frefactor-skill\u002FSKILL.md",[44,50,54,58,62,66,72,76,80,84],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"agents\u002Fopenai.yaml","REFERENCE","参考文档",339,"https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fskill-evidence\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frefactor-skill\u002Fagents\u002Fopenai.yaml",{"path":51,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":52,"sourceHtmlUrl":53},"references\u002Fcustody-ledgers.md",5301,"https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fskill-evidence\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frefactor-skill\u002Freferences\u002Fcustody-ledgers.md",{"path":55,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fdisclosure-and-consolidation.md",5172,"https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fskill-evidence\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frefactor-skill\u002Freferences\u002Fdisclosure-and-consolidation.md",{"path":59,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Finterfaces-and-sources.md",8351,"https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fskill-evidence\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frefactor-skill\u002Freferences\u002Finterfaces-and-sources.md",{"path":63,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":64,"sourceHtmlUrl":65},"references\u002Fpreservation-and-closeout.md",5556,"https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fskill-evidence\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frefactor-skill\u002Freferences\u002Fpreservation-and-closeout.md",{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"scripts\u002Fcode-unit-order.mjs","SCRIPT","脚本",114,"https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fskill-evidence\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frefactor-skill\u002Fscripts\u002Fcode-unit-order.mjs",{"path":73,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":74,"sourceHtmlUrl":75},"scripts\u002Finterface-audit.mjs",22363,"https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fskill-evidence\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frefactor-skill\u002Fscripts\u002Finterface-audit.mjs",{"path":77,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":78,"sourceHtmlUrl":79},"scripts\u002Finterface-audit.test.mjs",10960,"https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fskill-evidence\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frefactor-skill\u002Fscripts\u002Finterface-audit.test.mjs",{"path":81,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":82,"sourceHtmlUrl":83},"scripts\u002Fpreservation-audit.mjs",14323,"https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fskill-evidence\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frefactor-skill\u002Fscripts\u002Fpreservation-audit.mjs",{"path":85,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":86,"sourceHtmlUrl":87},"scripts\u002Fpreservation-audit.test.mjs",7954,"https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fskill-evidence\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frefactor-skill\u002Fscripts\u002Fpreservation-audit.test.mjs",[89,96,101,108,113,118],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":18},"01M7AAQDXB1QQET7VSTF1FCEET","triage","Move issues and external PRs through a state machine of triage roles — categorise, verify, grill if needed, and write agent-ready briefs.","https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fskill-evidence\u002Fblob\u002Fmain\u002Freports\u002Fskill-evidence\u002Ftriage\u002Freviews\u002Ffce6031a-a8f1-44b9-93cc-5c27488a51d3\u002Fcandidate\u002FSKILL.md",[],[],{"skillNo":97,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":18},"01M7AAQBCSHN0ZH9MHQZNEHCGR","https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fskill-evidence\u002Fblob\u002Fmain\u002Freports\u002Fskill-evidence\u002Ftriage\u002Freviews\u002F48b04150-c9c8-42a7-982a-324aceb6d21e\u002Fheld\u002Fember\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":18},"01M7AAQ8BDCGNPBVJVGQ1KWSN7","tdd","Test-driven development. Use when the user wants a red-green development loop or integration tests.","https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fskill-evidence\u002Fblob\u002Fmain\u002Freports\u002Fskill-evidence\u002Ftdd\u002Freviews\u002Frev_c25c6d82-756b-49e4-85ed-bd164820f2f2\u002Fpre-land-backup\u002FSKILL.md",[],[],{"skillNo":109,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":18},"01M7AAQ6DRHY95HPCDGG7TBP93","https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fskill-evidence\u002Fblob\u002Fmain\u002Freports\u002Fskill-evidence\u002Ftdd\u002Freviews\u002Frev_c25c6d82-756b-49e4-85ed-bd164820f2f2\u002Fcandidate\u002FSKILL.md",[],[],{"skillNo":114,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":18},"01M7AAQ3XN1HSP13RC35NFTKT0","https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fskill-evidence\u002Fblob\u002Fmain\u002Freports\u002Fskill-evidence\u002Ftdd\u002Freviews\u002Frev_3e39da1f-a737-4029-bd88-f710519fe3de\u002Fpre-land-backup\u002FSKILL.md",[],[],{"skillNo":119,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":18},"01M7AAQ1NGVGK62GB5Z6JSNJ76","https:\u002F\u002Fgithub.com\u002Fjoeloverbeck\u002Fskill-evidence\u002Fblob\u002Fmain\u002Freports\u002Fskill-evidence\u002Ftdd\u002Freviews\u002Frev_3e39da1f-a737-4029-bd88-f710519fe3de\u002Fcandidate\u002FSKILL.md",[],[]]