dead-code-eliminator
БесплатноБез исполняемых скриптовНе проверенIdentify and safely remove dead, unused, and unreachable code from codebases
от a5c-ai★ 1 947 звёзд на GitHubОб этом скилле
Dead Code Eliminator Skill
Identifies and safely removes dead code, unused functions, unreachable code paths, and orphaned files from codebases to reduce complexity and maintenance burden.
Purpose
Enable safe dead code removal for:
- Codebase simplification
- Migration preparation
- Technical debt reduction
- Build size optimization
- Maintenance cost reduction
Capabilities
1. Unused Function Detection
- Find uncalled functions
- Identify unused exports
- Detect unreferenced methods
- Map call graphs
2. Unreachable Code Identification
- Analyze control flow
- Find code after returns
- Detect impossible conditions
- Identify dead branches
3. Unused Variable Detection
- Find unread variables
- Identify write-only variables
- Detect unused parameters
- Flag shadowed variables
4. Orphan File Detection
- Find unimported modules
- Identify orphaned assets
- Detect unused configuration
- Map file dependencies
5. Safe Removal Verification
- Verify no runtime references
- Check dynamic imports
- Validate reflection usage
- Test after removal
6. Impact Analysis
- Estimate removal scope
- Calculate size reduction
- Assess risk level
- Document dependencies
Tool Integrations
| Tool | Language | Integration Method |
|---|---|---|
| ts-prune | TypeScript | CLI |
| unimported | JavaScript | CLI |
| deadcode | Python | CLI |
| UCDetector | Java | Eclipse Plugin |
| unused | Rust | CLI |
| deadcode | Go | CLI |
| webpack-bundle-analyzer | JavaScript | CLI |
Output Schema
{
"analysisId": "string",
"timestamp": "ISO8601",
"deadCode": {
"functions": [
{
"file": "string",
"name": "string",
"line": "number",
"confidence": "high|medium|low",
"reason": "string"
}
],
"variables": [],
"files": [],
"unreachable": []
},
"impact": {
"filesAffected": "number",
"linesRemovable": "number",
"estimatedSizeReduction": "string"
},
"risks": [],
"recommendations": []
}
Integration with Migration Processes
- code-refactoring: Pre-refactoring cleanup
- legacy-decommissioning: Feature removal
- monolith-to-microservices: Service extraction prep
Related Skills
static-code-analyzer: Combined analysiscode-smell-detector: Related smell detection
Related Agents
legacy-decommissioning-specialist: Uses for cleanupcode-transformation-executor: Executes removal
Установить dead-code-eliminator в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashReadWriteGrepGlobEditВложенные файлы
FAQ
Что делает скилл dead-code-eliminator?
Identify and safely remove dead, unused, and unreachable code from codebases
Как установить скилл dead-code-eliminator?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dead-code-eliminator запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic