[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EQ6ECF2MDQ79Z8TQM2X2X8":3,"skill-same:01M6EQ6ECF2MDQ79Z8TQM2X2X8":58},{"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":24,"linkOnly":25,"markdownContent":26,"markdownBody":27,"frontMatter":28,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":34,"ownerHtmlUrl":35,"ownerBlogUrl":6,"ownerDescription":36,"updatedAt":37,"install":38,"resources":51},"01M6EQ6ECF2MDQ79Z8TQM2X2X8","dead-code-detector",null,"Identify unused code, imports, variables, and functions for safe removal.","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcuriouslearner\u002Fdead-code-detector\u002FSKILL.md",[],[19,20,21,22,23],"code","dead code","dead code detector","safe","functions","2026-11-10 10:12:30",false,"---\nname: dead-code-detector\ndescription: Identify unused code, imports, variables, and functions for safe removal.\n---\n\n# Dead Code Detector Skill\n\nIdentify unused code, imports, variables, and functions for safe removal.\n\n## Instructions\n\nYou are a dead code detection expert. When invoked:\n\n1. **Scan for Unused Code**:\n   - Unused imports and dependencies\n   - Unreferenced functions and methods\n   - Unused variables and parameters\n   - Unreachable code paths\n   - Commented-out code blocks\n   - Deprecated functions still in codebase\n   - Unused CSS classes and styles\n   - Unused type definitions\n\n2. **Analyze Dependencies**:\n   - Installed packages not imported anywhere\n   - Dev dependencies used in production\n   - Production dependencies only used in dev\u002Ftest\n   - Circular dependencies\n\n3. **Check Code Reachability**:\n   - Functions never called\n   - Code after return statements\n   - Impossible conditional branches\n   - Unused exports in modules\n\n4. **Generate Report**: Categorize findings:\n   - **Safe to Remove**: Definitely unused\n   - **Potentially Unused**: Might be used dynamically or in tests\n   - **Review Required**: Exported but not used internally (might be used externally)\n\n## Detection Categories\n\n### Unused Imports\n```javascript\n\u002F\u002F Unused\nimport { foo, bar } from 'module'; \u002F\u002F bar is never used\n\n\u002F\u002F Recommended\nimport { foo } from 'module';\n```\n\n### Unused Variables\n```javascript\n\u002F\u002F Unused\nconst result = calculate();\nconst unused = 42; \u002F\u002F Never referenced\n\n\u002F\u002F Dead assignment\nlet value = 10;\nvalue = 20; \u002F\u002F First assignment is dead\n```\n\n### Unreachable Code\n```javascript\nfunction example() {\n  return true;\n  console.log('Never executes'); \u002F\u002F Dead code\n}\n\nif (false) {\n  \u002F\u002F Dead code block\n}\n```\n\n### Unused Functions\n```javascript\n\u002F\u002F Private function never called\nfunction helperFunction() {\n  \u002F\u002F ...\n}\n\n\u002F\u002F Exported but not used anywhere\nexport function unusedExport() {\n  \u002F\u002F ...\n}\n```\n\n## Usage Examples\n\n```\n@dead-code-detector\n@dead-code-detector src\u002F\n@dead-code-detector --include-tests\n@dead-code-detector --aggressive\n@dead-code-detector --safe-only\n```\n\n## Report Format\n\n```markdown\n# Dead Code Detection Report\n\n## Summary\n- Total unused items: 47\n- Safe to remove: 32\n- Needs review: 15\n- Potential savings: ~1,200 lines\n\n## Safe to Remove (32)\n\n### Unused Imports (12)\n- src\u002Futils\u002Fhelpers.js:3\n  `import { oldFunction } from '.\u002Flegacy'`\n\n- src\u002Fcomponents\u002FButton.jsx:5\n  `import { validateProps } from '.\u002Fvalidation'`\n\n### Unused Variables (8)\n- src\u002Fservices\u002Fapi.js:23\n  `const DEBUG_MODE = false` (never referenced)\n\n### Unreachable Code (5)\n- src\u002Fhandlers\u002Fpayment.js:67\n  Code after return statement (lines 68-72)\n\n### Unused Functions (7)\n- src\u002Futils\u002Fformat.js:45\n  `function formatOldDate()` (never called)\n\n## Needs Review (15)\n\n### Exported but Not Used Internally (10)\n- src\u002Fapi\u002Fclient.js:89\n  `export function legacyRequest()`\n  ⚠ Public export, might be used by consumers\n\n### Potentially Dynamic Usage (5)\n- src\u002Fplugins\u002Floader.js:34\n  `function loadPlugin()`\n  ⚠ Might be called dynamically via string reference\n\n## Dependencies\n\n### Unused npm Packages (5)\n- `moment` (use date-fns instead)\n- `lodash.debounce` (using native debounce now)\n- `axios` (switched to fetch)\n\n### Misclassified Dependencies (2)\n- `typescript` in dependencies (should be devDependency)\n- `jest` in devDependencies but used in production scripts\n\n## Commented Code (8 blocks)\n\n- src\u002Flegacy\u002Fauth.js:120-145 (25 lines commented)\n- src\u002Fcomponents\u002FModal.jsx:67-82 (15 lines commented)\n\n## Recommendations\n\n1. **Immediate Actions**:\n   - Remove 32 safe-to-remove items\n   - Delete commented code blocks\n   - Uninstall 5 unused packages\n\n2. **Review Required**:\n   - Check 10 exported functions with consumers\n   - Verify 5 potentially dynamic references\n\n3. **Estimated Impact**:\n   - Bundle size reduction: ~45KB\n   - Code reduction: ~1,200 lines\n   - Dependency reduction: 5 packages\n```\n\n## Detection Strategies\n\n### Static Analysis\n- Parse AST to find declarations and references\n- Track imports and their usage\n- Identify exported but unused symbols\n\n### Coverage-Based\n- Use test coverage to find untested code\n- Identify code never executed in tests\n- Find branches never taken\n\n### Type-Based (TypeScript)\n- Find unused type definitions\n- Detect unused interfaces\n- Identify orphaned generics\n\n## Edge Cases to Consider\n\n### Dynamic References\n```javascript\n\u002F\u002F Might look unused but called dynamically\nconst handlers = {\n  onClick: handleClick,\n  onHover: handleHover\n};\n\n\u002F\u002F Called via string\nwindow['initApp']();\n```\n\n### Test Code\n```javascript\n\u002F\u002F Used only in tests, might appear unused in main code\nexport function testHelper() {}\n```\n\n### Public API\n```javascript\n\u002F\u002F Exported for external consumers\nexport function publicApi() {\n  \u002F\u002F Not used internally but part of public interface\n}\n```\n\n## Language-Specific Tools\n\n- **JavaScript\u002FTypeScript**: ts-prune, unimported, depcheck, ESLint\n- **Python**: vulture, autoflake, pycln\n- **Java**: UCDetector, IntelliJ IDEA inspections\n- **Go**: unused, deadcode\n- **Rust**: cargo-udeps, cargo-machete\n\n## Best Practices\n\n- **Regular Cleanup**: Run detection monthly\n- **Pre-Commit Hooks**: Catch new dead code early\n- **Code Review**: Include dead code check in reviews\n- **Deprecation**: Mark code as deprecated before removal\n- **Documentation**: Document why code is unused\n- **Version Control**: Use git to track removed code\n- **Public APIs**: Be careful with exported functions\n\n## Removal Strategy\n\n1. **Start Safe**: Remove obvious unused code first\n2. **Test After Each**: Run tests after each removal\n3. **Check Imports**: Update import statements\n4. **Search Codebase**: Grep for string references\n5. **Review Exports**: Consider semver for public packages\n6. **Document**: Note why code was removed in commit\n\n## Notes\n\n- Some \"unused\" code might be used via reflection or dynamic imports\n- Public libraries should be more conservative\n- Check documentation and examples for references\n- Consider deprecation period for public APIs\n- Keep removal commits separate and atomic\n","# Dead Code Detector Skill\n\nIdentify unused code, imports, variables, and functions for safe removal.\n\n## Instructions\n\nYou are a dead code detection expert. When invoked:\n\n1. **Scan for Unused Code**:\n   - Unused imports and dependencies\n   - Unreferenced functions and methods\n   - Unused variables and parameters\n   - Unreachable code paths\n   - Commented-out code blocks\n   - Deprecated functions still in codebase\n   - Unused CSS classes and styles\n   - Unused type definitions\n\n2. **Analyze Dependencies**:\n   - Installed packages not imported anywhere\n   - Dev dependencies used in production\n   - Production dependencies only used in dev\u002Ftest\n   - Circular dependencies\n\n3. **Check Code Reachability**:\n   - Functions never called\n   - Code after return statements\n   - Impossible conditional branches\n   - Unused exports in modules\n\n4. **Generate Report**: Categorize findings:\n   - **Safe to Remove**: Definitely unused\n   - **Potentially Unused**: Might be used dynamically or in tests\n   - **Review Required**: Exported but not used internally (might be used externally)\n\n## Detection Categories\n\n### Unused Imports\n```javascript\n\u002F\u002F Unused\nimport { foo, bar } from 'module'; \u002F\u002F bar is never used\n\n\u002F\u002F Recommended\nimport { foo } from 'module';\n```\n\n### Unused Variables\n```javascript\n\u002F\u002F Unused\nconst result = calculate();\nconst unused = 42; \u002F\u002F Never referenced\n\n\u002F\u002F Dead assignment\nlet value = 10;\nvalue = 20; \u002F\u002F First assignment is dead\n```\n\n### Unreachable Code\n```javascript\nfunction example() {\n  return true;\n  console.log('Never executes'); \u002F\u002F Dead code\n}\n\nif (false) {\n  \u002F\u002F Dead code block\n}\n```\n\n### Unused Functions\n```javascript\n\u002F\u002F Private function never called\nfunction helperFunction() {\n  \u002F\u002F ...\n}\n\n\u002F\u002F Exported but not used anywhere\nexport function unusedExport() {\n  \u002F\u002F ...\n}\n```\n\n## Usage Examples\n\n```\n@dead-code-detector\n@dead-code-detector src\u002F\n@dead-code-detector --include-tests\n@dead-code-detector --aggressive\n@dead-code-detector --safe-only\n```\n\n## Report Format\n\n```markdown\n# Dead Code Detection Report\n\n## Summary\n- Total unused items: 47\n- Safe to remove: 32\n- Needs review: 15\n- Potential savings: ~1,200 lines\n\n## Safe to Remove (32)\n\n### Unused Imports (12)\n- src\u002Futils\u002Fhelpers.js:3\n  `import { oldFunction } from '.\u002Flegacy'`\n\n- src\u002Fcomponents\u002FButton.jsx:5\n  `import { validateProps } from '.\u002Fvalidation'`\n\n### Unused Variables (8)\n- src\u002Fservices\u002Fapi.js:23\n  `const DEBUG_MODE = false` (never referenced)\n\n### Unreachable Code (5)\n- src\u002Fhandlers\u002Fpayment.js:67\n  Code after return statement (lines 68-72)\n\n### Unused Functions (7)\n- src\u002Futils\u002Fformat.js:45\n  `function formatOldDate()` (never called)\n\n## Needs Review (15)\n\n### Exported but Not Used Internally (10)\n- src\u002Fapi\u002Fclient.js:89\n  `export function legacyRequest()`\n  ⚠ Public export, might be used by consumers\n\n### Potentially Dynamic Usage (5)\n- src\u002Fplugins\u002Floader.js:34\n  `function loadPlugin()`\n  ⚠ Might be called dynamically via string reference\n\n## Dependencies\n\n### Unused npm Packages (5)\n- `moment` (use date-fns instead)\n- `lodash.debounce` (using native debounce now)\n- `axios` (switched to fetch)\n\n### Misclassified Dependencies (2)\n- `typescript` in dependencies (should be devDependency)\n- `jest` in devDependencies but used in production scripts\n\n## Commented Code (8 blocks)\n\n- src\u002Flegacy\u002Fauth.js:120-145 (25 lines commented)\n- src\u002Fcomponents\u002FModal.jsx:67-82 (15 lines commented)\n\n## Recommendations\n\n1. **Immediate Actions**:\n   - Remove 32 safe-to-remove items\n   - Delete commented code blocks\n   - Uninstall 5 unused packages\n\n2. **Review Required**:\n   - Check 10 exported functions with consumers\n   - Verify 5 potentially dynamic references\n\n3. **Estimated Impact**:\n   - Bundle size reduction: ~45KB\n   - Code reduction: ~1,200 lines\n   - Dependency reduction: 5 packages\n```\n\n## Detection Strategies\n\n### Static Analysis\n- Parse AST to find declarations and references\n- Track imports and their usage\n- Identify exported but unused symbols\n\n### Coverage-Based\n- Use test coverage to find untested code\n- Identify code never executed in tests\n- Find branches never taken\n\n### Type-Based (TypeScript)\n- Find unused type definitions\n- Detect unused interfaces\n- Identify orphaned generics\n\n## Edge Cases to Consider\n\n### Dynamic References\n```javascript\n\u002F\u002F Might look unused but called dynamically\nconst handlers = {\n  onClick: handleClick,\n  onHover: handleHover\n};\n\n\u002F\u002F Called via string\nwindow['initApp']();\n```\n\n### Test Code\n```javascript\n\u002F\u002F Used only in tests, might appear unused in main code\nexport function testHelper() {}\n```\n\n### Public API\n```javascript\n\u002F\u002F Exported for external consumers\nexport function publicApi() {\n  \u002F\u002F Not used internally but part of public interface\n}\n```\n\n## Language-Specific Tools\n\n- **JavaScript\u002FTypeScript**: ts-prune, unimported, depcheck, ESLint\n- **Python**: vulture, autoflake, pycln\n- **Java**: UCDetector, IntelliJ IDEA inspections\n- **Go**: unused, deadcode\n- **Rust**: cargo-udeps, cargo-machete\n\n## Best Practices\n\n- **Regular Cleanup**: Run detection monthly\n- **Pre-Commit Hooks**: Catch new dead code early\n- **Code Review**: Include dead code check in reviews\n- **Deprecation**: Mark code as deprecated before removal\n- **Documentation**: Document why code is unused\n- **Version Control**: Use git to track removed code\n- **Public APIs**: Be careful with exported functions\n\n## Removal Strategy\n\n1. **Start Safe**: Remove obvious unused code first\n2. **Test After Each**: Run tests after each removal\n3. **Check Imports**: Update import statements\n4. **Search Codebase**: Grep for string references\n5. **Review Exports**: Consider semver for public packages\n6. **Document**: Note why code was removed in commit\n\n## Notes\n\n- Some \"unused\" code might be used via reflection or dynamic imports\n- Public libraries should be more conservative\n- Check documentation and examples for references\n- Consider deprecation period for public APIs\n- Keep removal commits separate and atomic\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fcuriouslearner\u002Fdead-code-detector",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":50},[40,43,46],{"tool":41,"command":42},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill dead-code-detector",{"tool":44,"command":45},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill dead-code-detector",{"tool":47,"command":48},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill dead-code-detector","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcuriouslearner\u002Fdead-code-detector\u002FSKILL.md",true,[52],{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"skill-report.json","REFERENCE","参考文档",12011,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fcuriouslearner\u002Fdead-code-detector\u002Fskill-report.json",[59,68,77,86,92,98],{"skillNo":60,"name":61,"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":62,"categories":63,"keywords":64,"publishedAt":24},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[65,66,67],"model","model hierarchy","model hierarchy skill",{"skillNo":69,"name":70,"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":71,"categories":72,"keywords":73,"publishedAt":24},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[74,75,76],"MCP","zoom","zoom mcp",{"skillNo":78,"name":79,"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":80,"categories":81,"keywords":82,"publishedAt":24},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[83,84,85,75],"sdk","zoom apps sdk","apps",{"skillNo":87,"name":88,"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":89,"categories":90,"keywords":91,"publishedAt":24},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[88],{"skillNo":93,"name":94,"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":95,"categories":96,"keywords":97,"publishedAt":24},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[94],{"skillNo":99,"name":100,"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":101,"categories":102,"keywords":103,"publishedAt":24},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[100]]