dead-code-eliminator
Keep your codebase lean by identifying and safely removing unused exports, unreachable code, and dead dependencies.
- Prune unreferenced exports and imports across large TypeScript projects
- Identify and remove stale feature flags and their dead execution branches
- Audit manifest files to find and delete unused third-party dependencies
$5
One-time purchase
Included in download
- Prune unreferenced exports and imports across large TypeScript projects
- Identify and remove stale feature flags and their dead execution branches
- file_read, file_write automation included
- Includes example output and usage patterns
See it in action
# Dead Code Report Summary: 12 findings, ~450 lines removed. High-confidence findings: - Unused import: 'capitalize' from 'lodash' in src/utils/format.ts - Unreachable code: 'if (false)' block in src/api/client.ts Medium-confidence findings: - 'deprecatedHelper' commented out in src/utils/index.ts.
dead-code-eliminator
Keep your codebase lean by identifying and safely removing unused exports, unreachable code, and dead dependencies.
$5
One-time purchase
⚡ Also available via Agensi MCP — your AI agent can load this skill on demand via MCP. Learn more →
Included in download
- Prune unreferenced exports and imports across large TypeScript projects
- Identify and remove stale feature flags and their dead execution branches
- file_read, file_write automation included
- Includes example output and usage patterns
- Instant install
See it in action
# Dead Code Report Summary: 12 findings, ~450 lines removed. High-confidence findings: - Unused import: 'capitalize' from 'lodash' in src/utils/format.ts - Unreachable code: 'if (false)' block in src/api/client.ts Medium-confidence findings: - 'deprecatedHelper' commented out in src/utils/index.ts.
About This Skill
Streamline Your Codebase with Precision
The Dead Code Eliminator is a sophisticated static analysis tool designed to prune bloated repositories. It doesn't just look for unused variables; it maps your entire dependency and export graph to find unreferenced code, unreachable execution paths, and stale feature flags that are slowing down your team and increasing your bundle size.
What it does
- Unused Export Detection: Identifies functions, classes, and types that are exported but never imported, including complex re-exports in barrel files.
- Reachability Analysis: Finds code trapped behind constant false conditions or following unconditional exit statements.
- Dependency Auditing: Flags packages in your manifest files (package.json, pyproject.toml, etc.) that have no references in your source code.
- Confidence-Rated Patches: Categorizes findings into High (safe for deletion), Medium (comment out for safety), and Low (flag for review) to prevent breaking dynamic runtime patterns.
Supported Ecosystems
Works across major languages including TypeScript, JavaScript, Python, Go, Java, and Rust. It understands language-specific nuances like Python's __all__, Go's exported identifiers, and TypeScript's never type.
Why use this over basic linting?
While linters find local unused variables, this skill performs cross-file reference tracking and understands complex patterns like reflection and dynamic imports. It provides ready-to-apply diffs rather than just a list of warnings, significantly reducing the manual labor of large-scale refactoring.
📖 Learn more: Best DevOps & Deployment Skills for Claude Code →
Use Cases
- Prune unreferenced exports and imports across large TypeScript projects
- Identify and remove stale feature flags and their dead execution branches
- Audit manifest files to find and delete unused third-party dependencies
- Generate safe patches that distinguish between static and dynamic code usage
How to Install
mkdir -p ~/.claude/skills && curl -sL https://www.agensi.io/api/install/dead-code-eliminator | tar xz -C ~/.claude/skills/Free skills install directly. Paid skills require purchase - use the download button above after buying.
Reviews
No reviews yet - be the first to share your experience.
Only users who have downloaded or purchased this skill can leave a review.
Early access skill
Be the first to review this skill.
Only users who have downloaded or purchased this skill can leave a review.
Security Scanned
Passed automated security review
Permissions
Reads source files and the project manifest, then applies deletions and comment-outs based on confidence level. Public API surfaces (exports of published packages) are always flagged for human review rather than modified. Does not modify lockfiles or build configuration.
Creator
Frequently Asked Questions
Learn More About AI Agent Skills
Similar Skills
git-commit-writer
Writes conventional commit messages by analyzing your staged git changes. Detects commit type, scope, and breaking changes automatically.
env-doctor
Diagnoses why your project will not start. Checks runtime versions, dependencies, environment variables, databases, ports, and build artifacts systematically.
codex-grade-coding
Turn your AI agent into a senior engineer with strict task classification and verification-driven coding protocols.
code-reviewer
Reviews your code for bugs, security vulnerabilities, logic errors, performance issues, and style violations. Organizes findings by severity and suggests fixes with code examples.