Finds functions, classes, and exports that have no callers or consumers in the codebase. Uses confidence scoring to reduce false positives and framework-aware heuristics to avoid flagging convention-based code (e.g., React lifecycle methods, serialization hooks, test fixtures).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
uri | string | No | workspace | File or directory to scope the search |
scope | enum | No | file | Scope of analysis: file, module, or workspace |
includeTests | boolean | No | false | Include test files in the analysis |
confidence | number | No | 0.7 | Minimum confidence threshold (0.0 to 1.0) |
summary | boolean | No | false | Return counts and top items instead of full list |
Is there any dead code in src/utils/helpers.ts?
Scans the file and reports functions or exports with no references elsewhere in the project.
Find all unused functions across the entire project. Only show high-confidence results.
Uses scope: "workspace" and confidence: 0.9 for a thorough sweep with minimal false positives.
Find unused code in src/testing/ — include test files in the analysis.
Sets includeTests: true to check whether test helpers and fixtures are actually used by test files.
Give me a summary of unused code in the services/ module.
Uses scope: "module" and summary: true for a quick count of dead code by type.
Each finding includes:
function, class, method, constant, or exportConfidence scoring:
| Score | Meaning |
|---|---|
| 0.9–1.0 | Almost certainly unused — no references anywhere |
| 0.7–0.9 | Likely unused — may have dynamic references |
| 0.5–0.7 | Possibly unused — framework conventions may apply |
| < 0.5 | Uncertain — probably referenced dynamically |
confidence: 0.8 or higher to focus on safe deletions0.5 when you want a broader view and are willing to manually verifyworkspace scope checks cross-file references — more accurate but slower than filecomponentDidMount, serialize, __init__, main, and #[test] — these are not flagged as unusedstellarion_api_surface to find unused exports specifically