[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CTMEP9Q6FW57V2QDC8RWG2":3,"skill-same:01M7CTMEP9Q6FW57V2QDC8RWG2":51},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7CTMEP9Q6FW57V2QDC8RWG2","refactor-clean",null,"Remove dead code, unused exports or dependencies, or duplicate implementations. Use for cleanup audits and safe deletion plans; not for adding features or ordinary refactoring.","xiaden\u002FSkyScow","xiaden","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F3605480?v=4","01M7CTGKNTD1XNQE710J977HVD","Lucian Hardy","01M7CTGKPVQ3XRNXNRJ3A6E31F",1,"MIT","https:\u002F\u002Fgithub.com\u002Fxiaden\u002FSkyScow\u002Fblob\u002Fmain\u002Fconfig\u002Fskills\u002Frefactor-clean\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: refactor-clean\ndescription: Remove dead code, unused exports or dependencies, or duplicate implementations. Use for cleanup audits and safe deletion plans; not for adding features or ordinary refactoring.\n---\n\n# Refactor & Clean\n\n**Purpose:** Systematically identify and remove dead code, unused exports, unused dependencies, and duplicates — with an audit trail and safe rollback at every step.\n\n---\n\n## When to Use\n\n**Trigger conditions:**\n\n- Cleaning up a codebase after a large feature removal or migration\n- Auditing unused npm dependencies or TypeScript exports\n- Consolidating duplicate implementations across modules\n- Preparing a repo for handoff, open-source release, or major refactor\n- User mentions knip, depcheck, ts-prune, or dead code detection\n\n**Do NOT use this skill when:**\n\n- Actively developing a feature (cleanup mid-flight causes merge conflicts)\n- Right before a production deployment (no time for rollback if a false positive bites)\n- Test coverage is below ~60% (can't verify removals safely)\n- Working in code you don't understand — research first, clean second\n- The codebase has no build\u002Flint pipeline (you can't verify removals)\n\n---\n\n## Workflow\n\n### 1. Analyze Phase\n\nRun detection tools in parallel. Each tool has a different lens — use all three and cross-reference.\n\n| Tool | What it finds | Key flags |\n|------|--------------|-----------|\n| **knip** | Unused files, exports, dependencies, types | `--include exports,types` to focus; `--strict` to catch re-exports |\n| **depcheck** | Unused npm dependencies | `--ignores=\u003Cpkg>` for known dev-time-only deps |\n| **ts-prune** | Unused TypeScript exports | `-p tsconfig.json` to scope; pipe through `grep -v` to exclude public API |\n| **eslint** | Unused disable directives, variables | `--report-unused-disable-directives` |\n\n```bash\nnpx knip --include exports,dependencies,files\nnpx depcheck\nnpx ts-prune -p tsconfig.json | grep -v \"index.ts\"\nnpx eslint . --report-unused-disable-directives --quiet\n```\n\n**Gotchas:**\n- knip reports re-exports as unused even when consumed externally — verify against public API surface\n- ts-prune can't see dynamic imports (`import()`) or `require()` calls — grep for those separately\n- depcheck flags devDependencies used only in scripts (e.g., `tsx`, `ts-node`) — check `package.json` scripts\n- Tools disagree on barrel files (`index.ts`) — these are often false positives\n\n### 2. Risk Assessment\n\nCategorize each finding before removing:\n\n| Risk level | Criteria | Action |\n|-----------|----------|--------|\n| **SAFE** | Unused export with zero internal\u002Fexternal imports; unused devDependency | Remove immediately |\n| **CAREFUL** | Potentially used via dynamic import, reflection, or plugin registration | Grep for string references; check if registered in config |\n| **RISKY** | Part of public API, shared utility, or barrel re-export | Do not remove without confirming external consumers |\n\nFor each item:\n1. `grep -rn \"symbolName\" src\u002F` — confirm zero live references\n2. Check for dynamic imports: `grep -rn \"import(.*symbolName\" src\u002F`\n3. Check git history: `git log --oneline -5 -- path\u002Fto\u002Ffile` — understand why it exists\n4. Verify it's not in the public API surface (check `exports` in `package.json`, README docs)\n\n### 3. Remove Phase\n\nSafe deletion order (each step verifiable independently):\n\n1. **Unused imports** — `eslint --fix` or manual removal\n2. **Unused private functions** — internal, no external risk\n3. **Unused exported functions** — after confirming zero consumers\n4. **Unused types\u002Finterfaces** — after confirming no type-only imports\n5. **Unused files** — last, after all their exports are confirmed dead\n6. **Unused dependencies** — `npm uninstall \u003Cpkg>` (updates `package.json` + lockfile)\n\nAfter each removal:\n```bash\nnpm run build && npm test && npm run lint\n```\n\n### 4. Consolidate Phase\n\nFor duplicate code found during analysis:\n\n1. **Pick the winner** — most feature-complete, best tested, most recently modified\n2. **Update all imports** to point at the winner\n3. **Delete the duplicate**\n4. **Verify** build + tests pass\n5. **Log** in DELETION_LOG.md\n\n### 5. Verify Phase\n\nFinal gate before committing:\n\n```bash\nnpm run build      # Builds successfully\nnpm test           # All tests pass\nnpm run lint       # No new lint errors\nnpx knip           # Re-run to confirm findings are resolved\n```\n\n---\n\n## Safety Checklist\n\n**Before removing anything:**\n- [ ] Detection tools run and findings categorized\n- [ ] Grep confirms zero live references\n- [ ] Dynamic imports checked\n- [ ] Public API surface verified\n- [ ] Backup branch created (`git checkout -b cleanup\u002Fdead-code-YYYY-MM-DD`)\n\n**After each removal:**\n- [ ] Build succeeds\n- [ ] Tests pass\n- [ ] No new lint errors\n- [ ] Committed with clear message (`chore: remove unused \u003Cthing>`)\n- [ ] DELETION_LOG.md updated\n\n---\n\n## Error Recovery\n\nIf something breaks after removal:\n\n1. `git revert HEAD && npm install && npm run build && npm test`\n2. Identify the failure — was it a dynamic import, tool false negative, or external consumer?\n3. Mark the item as **\"DO NOT REMOVE\"** in DELETION_LOG.md with the reason\n4. Fix forward with updated grep patterns (e.g., add the dynamic import pattern to your search)\n\n---\n\n## References\n\n- **DELETION_LOG.md format and examples:** See [`references\u002Fdeletion-log.md`](file:\u002F\u002F\u002Fhome\u002Fopencode\u002F.config\u002Fopencode\u002Fskills\u002Frefactor-clean\u002Freferences\u002Fdeletion-log.md)\n","# Refactor & Clean\n\n**Purpose:** Systematically identify and remove dead code, unused exports, unused dependencies, and duplicates — with an audit trail and safe rollback at every step.\n\n---\n\n## When to Use\n\n**Trigger conditions:**\n\n- Cleaning up a codebase after a large feature removal or migration\n- Auditing unused npm dependencies or TypeScript exports\n- Consolidating duplicate implementations across modules\n- Preparing a repo for handoff, open-source release, or major refactor\n- User mentions knip, depcheck, ts-prune, or dead code detection\n\n**Do NOT use this skill when:**\n\n- Actively developing a feature (cleanup mid-flight causes merge conflicts)\n- Right before a production deployment (no time for rollback if a false positive bites)\n- Test coverage is below ~60% (can't verify removals safely)\n- Working in code you don't understand — research first, clean second\n- The codebase has no build\u002Flint pipeline (you can't verify removals)\n\n---\n\n## Workflow\n\n### 1. Analyze Phase\n\nRun detection tools in parallel. Each tool has a different lens — use all three and cross-reference.\n\n| Tool | What it finds | Key flags |\n|------|--------------|-----------|\n| **knip** | Unused files, exports, dependencies, types | `--include exports,types` to focus; `--strict` to catch re-exports |\n| **depcheck** | Unused npm dependencies | `--ignores=\u003Cpkg>` for known dev-time-only deps |\n| **ts-prune** | Unused TypeScript exports | `-p tsconfig.json` to scope; pipe through `grep -v` to exclude public API |\n| **eslint** | Unused disable directives, variables | `--report-unused-disable-directives` |\n\n```bash\nnpx knip --include exports,dependencies,files\nnpx depcheck\nnpx ts-prune -p tsconfig.json | grep -v \"index.ts\"\nnpx eslint . --report-unused-disable-directives --quiet\n```\n\n**Gotchas:**\n- knip reports re-exports as unused even when consumed externally — verify against public API surface\n- ts-prune can't see dynamic imports (`import()`) or `require()` calls — grep for those separately\n- depcheck flags devDependencies used only in scripts (e.g., `tsx`, `ts-node`) — check `package.json` scripts\n- Tools disagree on barrel files (`index.ts`) — these are often false positives\n\n### 2. Risk Assessment\n\nCategorize each finding before removing:\n\n| Risk level | Criteria | Action |\n|-----------|----------|--------|\n| **SAFE** | Unused export with zero internal\u002Fexternal imports; unused devDependency | Remove immediately |\n| **CAREFUL** | Potentially used via dynamic import, reflection, or plugin registration | Grep for string references; check if registered in config |\n| **RISKY** | Part of public API, shared utility, or barrel re-export | Do not remove without confirming external consumers |\n\nFor each item:\n1. `grep -rn \"symbolName\" src\u002F` — confirm zero live references\n2. Check for dynamic imports: `grep -rn \"import(.*symbolName\" src\u002F`\n3. Check git history: `git log --oneline -5 -- path\u002Fto\u002Ffile` — understand why it exists\n4. Verify it's not in the public API surface (check `exports` in `package.json`, README docs)\n\n### 3. Remove Phase\n\nSafe deletion order (each step verifiable independently):\n\n1. **Unused imports** — `eslint --fix` or manual removal\n2. **Unused private functions** — internal, no external risk\n3. **Unused exported functions** — after confirming zero consumers\n4. **Unused types\u002Finterfaces** — after confirming no type-only imports\n5. **Unused files** — last, after all their exports are confirmed dead\n6. **Unused dependencies** — `npm uninstall \u003Cpkg>` (updates `package.json` + lockfile)\n\nAfter each removal:\n```bash\nnpm run build && npm test && npm run lint\n```\n\n### 4. Consolidate Phase\n\nFor duplicate code found during analysis:\n\n1. **Pick the winner** — most feature-complete, best tested, most recently modified\n2. **Update all imports** to point at the winner\n3. **Delete the duplicate**\n4. **Verify** build + tests pass\n5. **Log** in DELETION_LOG.md\n\n### 5. Verify Phase\n\nFinal gate before committing:\n\n```bash\nnpm run build      # Builds successfully\nnpm test           # All tests pass\nnpm run lint       # No new lint errors\nnpx knip           # Re-run to confirm findings are resolved\n```\n\n---\n\n## Safety Checklist\n\n**Before removing anything:**\n- [ ] Detection tools run and findings categorized\n- [ ] Grep confirms zero live references\n- [ ] Dynamic imports checked\n- [ ] Public API surface verified\n- [ ] Backup branch created (`git checkout -b cleanup\u002Fdead-code-YYYY-MM-DD`)\n\n**After each removal:**\n- [ ] Build succeeds\n- [ ] Tests pass\n- [ ] No new lint errors\n- [ ] Committed with clear message (`chore: remove unused \u003Cthing>`)\n- [ ] DELETION_LOG.md updated\n\n---\n\n## Error Recovery\n\nIf something breaks after removal:\n\n1. `git revert HEAD && npm install && npm run build && npm test`\n2. Identify the failure — was it a dynamic import, tool false negative, or external consumer?\n3. Mark the item as **\"DO NOT REMOVE\"** in DELETION_LOG.md with the reason\n4. Fix forward with updated grep patterns (e.g., add the dynamic import pattern to your search)\n\n---\n\n## References\n\n- **DELETION_LOG.md format and examples:** See [`references\u002Fdeletion-log.md`](file:\u002F\u002F\u002Fhome\u002Fopencode\u002F.config\u002Fopencode\u002Fskills\u002Frefactor-clean\u002Freferences\u002Fdeletion-log.md)\n",{"name":5,"description":7},"main","8f95d6b7cbf4ec39161b4e6c8bc5e1493e58003c","config\u002Fskills\u002Frefactor-clean",0,"https:\u002F\u002Fgithub.com\u002Fxiaden\u002FSkyScow","https:\u002F\u002Fgithub.com\u002Fxiaden","2026-09-30 22:33:49",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add xiaden\u002FSkyScow --skill refactor-clean",{"tool":37,"command":38},"bunx","bunx skills add xiaden\u002FSkyScow --skill refactor-clean",{"tool":40,"command":41},"pnpm","pnpm dlx skills add xiaden\u002FSkyScow --skill refactor-clean","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fxiaden\u002FSkyScow\u002Fblob\u002Fmain\u002Fconfig\u002Fskills\u002Frefactor-clean\u002FSKILL.md",true,[45],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"references\u002Fdeletion-log.md","REFERENCE","参考文档",3610,"https:\u002F\u002Fgithub.com\u002Fxiaden\u002FSkyScow\u002Fblob\u002Fmain\u002Fconfig\u002Fskills\u002Frefactor-clean\u002Freferences\u002Fdeletion-log.md",[52,58,65,71,78,85],{"skillNo":53,"name":54,"nameZh":6,"description":6,"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},"01M7CTNJ49PJ794TEFBCNYYKQM","unquoted-colon","https:\u002F\u002Fgithub.com\u002Fxiaden\u002FSkyScow\u002Fblob\u002Fmain\u002Fconfig\u002Ftools\u002Ftests\u002Ffixtures\u002Fskills\u002Funquoted-colon\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},"01M7CTNENFBZPEX63HNSRBCW4T","quoted-description","Use when a plain scalar contains a colon: like this one.","https:\u002F\u002Fgithub.com\u002Fxiaden\u002FSkyScow\u002Fblob\u002Fmain\u002Fconfig\u002Ftools\u002Ftests\u002Ffixtures\u002Fskills\u002Fquoted-description\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"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":68,"categories":69,"keywords":70,"publishedAt":19},"01M7CTNBBPKA6GMCVEM3GPB59F","block-description","https:\u002F\u002Fgithub.com\u002Fxiaden\u002FSkyScow\u002Fblob\u002Fmain\u002Fconfig\u002Ftools\u002Ftests\u002Ffixtures\u002Fskills\u002Fblock-description\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7CTN4M0SR4Z4TPJMHWC3A3B","work-routing","Canonical authority for who owns the next unit of work — direct work versus delegation, task tiers, bounded localization, the Change DAG size threshold, R&D evaluation routing, progressive research escalation, researcher scope signals, and QA\u002Fsupport owner selection. Use before choosing execution, investigation, design, or QA ownership; do not use to construct dispatch prompts, handoff schemas, or Change DAG\u002FDD tool operation.","https:\u002F\u002Fgithub.com\u002Fxiaden\u002FSkyScow\u002Fblob\u002Fmain\u002Fconfig\u002Fskills\u002Fwork-routing\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7CTMY5AY3NSNHGQJA0M7VP9","update-docs","Update project documentation to match code changes — generate codemaps, refresh READMEs, detect doc\u002Fcode drift using AST analysis. Use when updating documentation after code changes, generating codemaps, verifying doc accuracy, or detecting stale documentation. Do NOT use for writing API reference docs from scratch (use doc-coauthoring) or for creating new skill files (use making-editing-skills).","https:\u002F\u002Fgithub.com\u002Fxiaden\u002FSkyScow\u002Fblob\u002Fmain\u002Fconfig\u002Fskills\u002Fupdate-docs\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7CTMSQD82CPD53C6F07J0R9","skill-loading-system","Explain or troubleshoot OpenCode skill discovery, loading, permissions, availability, or prompt injection.","https:\u002F\u002Fgithub.com\u002Fxiaden\u002FSkyScow\u002Fblob\u002Fmain\u002Fconfig\u002Fskills\u002Fskill-loading-system\u002FSKILL.md",[],[]]