ide-dead-code-hunter

Solid

Find unused exports, dead functions, and unreachable code across the workspace using LSP analysis. Cross-verifies detectUnusedCode with findReferences to eliminate false positives. Use to clean up technical debt or before a major refactor.

AI & Automation 24 stars 4 forks Updated today MIT

Install

View on GitHub

Quality Score: 87/100

Stars 20%
47
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# IDE Dead Code Hunter ## Prerequisites 1. Check if `getToolCapabilities` is available. - **Not available**: tell the user this skill requires the Claude IDE Bridge with a connected VS Code extension, then stop. - **Available**: call it. If `extensionConnected` is false: show the same message and stop. If true: proceed. ## Goal Find dead code — unused exports, functions with zero callers, unused imports — and produce a prioritized cleanup list with confidence badges. ## Workflow ### Phase 1: Scope 1. Note the argument: `$ARGUMENTS` - If a specific file path: scope search to that file only - If a directory: scope to that directory - If empty: search the entire workspace 2. Use `getProjectInfo` to understand the project type and entry points (to avoid flagging intentional public API exports as dead) ### Phase 2: Detect unused symbols 3. Call `detectUnusedCode` on each in-scope file (or workspace-wide if no scope) 4. For each reported unused symbol, call `findReferences` to cross-verify: - **Zero references**: confirmed dead — high confidence - **References only in the same file**: likely dead (internal-only) — medium confidence - **References in other files**: false positive from `detectUnusedCode` — skip 5. Call `searchWorkspace` with pattern `^export` on TypeScript/JS files to find exported symbols not caught by `detectUnusedCode`, then run `findReferences` on each to check usage outside the file ### Phase 3: Unused imports 6. Use `getDocu...

Details

Author
Oolab-labs
Repository
Oolab-labs/patchwork-os
Created
1 months ago
Last Updated
today
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category