Agent skill · software engineering · aiskillstore
dead-code-removal
Detects and safely removes unused code (imports, functions, classes)
Why this skill is useful
Adds Python and JavaScript helper scripts for detecting and removing unused code, which are not commonly found in public documentation.
What it needs
Requires python installed locally. About 4k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.
What this skill does
Dead Code Removal This skill safely identifies and removes unused code across multiple programming languages. It includes comprehensive safety checks to prevent removing code that's actually needed. When to Use This Skill After refactoring code and removing features Before production deployment to reduce bundle size When cleaning up legacy code When removing deprecated functionality When optimizing codebase size When maintaining code quality standards What This Skill Does 1. Language Detection: Identifies project languages and structure 2. Entry Point Mapping: Maps entry points and critical paths 3. Dependency Analysis: Builds dependency graphs and usage patterns 4. Safe Detection: Identifies unused elements with safety checks 5. Incremental Removal: Removes code incrementally with validation 6. Backup Creation: Creates backups before making changes Helper Scripts This skill includes Python helper scripts in scripts/: findunusedimports.py: Uses AST parsing to accurately detect unused imports in Python files. Outputs JSON with unused imports and line numbers. How to Use Remove Unused Code Specific Analysis Analysis Process 1. Language Detection Identify Project Type: Python: Look for pyproject.toml, setup.py, requirements.txt JavaScript/TypeScript: Check package.json, tsconfig.json Java: Look for pom.xml, build.gradle Go: Check go.mod Rust: Check Cargo.toml Detect Entry Points: Python: main.py, main.py, app.py, run.py JavaScript: index.js, main.js, server.js, app.js Java: Main.java, Application.java, Controller.java Config files: .config., settings., setup. Test files: test.py, .test.js, .spec.js 2. Build Dependency Graph Cross-File Dependencies: Track imports and requires Map function/method calls Identify class inheritance Track dynamic usage patterns Framework Patterns: Preserve framework-specific patterns (Django models, React components, etc.) Check for decorators and annotations Verify entry point registrations 3. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aiskillstore/dead-code-removal