find_unused_files
Identify unused TypeScript/JavaScript files in complex projects with dynamic loading patterns to optimize codebases and reduce technical debt.
Instructions
Identify genuinely unused TypeScript/JavaScript files in complex projects with dynamic loading patterns
WORKFLOW: System diagnostics and function discovery TIP: Start with health_check, use list_functions to explore capabilities SAVES: Claude context for strategic decisions
Input Schema
Name | Required | Description | Default |
---|---|---|---|
analysisDepth | No | Level of analysis detail | comprehensive |
analysisType | No | Type of analysis to perform | comprehensive |
analyzeComments | No | Check for commented-out imports | |
code | No | The code to analyze (for single-file analysis) | |
entryPoints | No | Entry point files to start dependency traversal | |
excludePatterns | No | File patterns to exclude from analysis | |
filePath | No | Path to single file to analyze | |
files | No | Array of specific file paths (for multi-file analysis) | |
includeDevArtifacts | No | Whether to flag potential dev artifacts | |
language | No | Programming language | typescript |
maxDepth | No | Maximum directory depth for discovery (1-5) | |
projectPath | No | Absolute path to project root |
Input Schema (JSON Schema)
{
"properties": {
"analysisDepth": {
"default": "comprehensive",
"description": "Level of analysis detail",
"enum": [
"basic",
"detailed",
"comprehensive"
],
"type": "string"
},
"analysisType": {
"default": "comprehensive",
"description": "Type of analysis to perform",
"enum": [
"static",
"dynamic",
"comprehensive"
],
"type": "string"
},
"analyzeComments": {
"default": true,
"description": "Check for commented-out imports",
"type": "boolean"
},
"code": {
"description": "The code to analyze (for single-file analysis)",
"type": "string"
},
"entryPoints": {
"default": [
"index.ts",
"main.ts",
"app.ts"
],
"description": "Entry point files to start dependency traversal",
"type": "array"
},
"excludePatterns": {
"default": [
"*.test.ts",
"*.spec.ts",
"*.d.ts"
],
"description": "File patterns to exclude from analysis",
"type": "array"
},
"filePath": {
"description": "Path to single file to analyze",
"type": "string"
},
"files": {
"description": "Array of specific file paths (for multi-file analysis)",
"type": "array"
},
"includeDevArtifacts": {
"default": false,
"description": "Whether to flag potential dev artifacts",
"type": "boolean"
},
"language": {
"default": "typescript",
"description": "Programming language",
"type": "string"
},
"maxDepth": {
"default": 4,
"description": "Maximum directory depth for discovery (1-5)",
"type": "number"
},
"projectPath": {
"description": "Absolute path to project root",
"type": "string"
}
},
"required": [],
"type": "object"
}