dead-code-cleanup

Identify and remove dead code, deprecated code, and unused exports.

1|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/kubrickcode/specvital --skill dead-code-cleanup-kubrickcode
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dead-code-cleanup
Source: https://github.com/kubrickcode/specvital/tree/main/.claude/skills/dead-code-cleanup
Command: npx skills add https://github.com/kubrickcode/specvital --skill dead-code-cleanup-kubrickcode

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires npm:glob, npm:grep, npm:bash, and includes scripts (resource) components.

What problem does it solve?

This Skill helps maintain a clean and efficient codebase by identifying and removing dead, deprecated, or unused code, preventing technical debt accumulation.

Core Features & Use Cases

  • Unused Export Detection: Finds functions, classes, or variables that are exported but never imported or used.
  • Deprecated Code Identification: Flags code marked with @deprecated or similar comments that is no longer recommended for use.
  • Orphaned File Removal: Locates files that are not imported or referenced anywhere in the project.
  • Use Case: After a major refactor, use this Skill to automatically find and suggest removal of all the old, now-unused code that was replaced, ensuring the codebase remains lean.

Quick Start

Run the dead-code-cleanup skill to analyze the entire codebase for unused code.

Frequently Asked Questions about dead-code-cleanup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find and remove unused exports from my codebase?

To remove unused exports, the skill analyzes your project with Glob and Grep to find functions, classes, or variables that are exported but never imported, then suggests safe deletion to improve code hygiene.

What is the best way to clean up dead code after a major refactor?

Cleaning up dead code after a refactor is handled by scanning the project for orphaned files and replaced code, automatically identifying obsolete fragments to prevent technical debt accumulation and keep the codebase lean.

Can I automatically identify deprecated code marked with comments?

Yes, you can identify deprecated code by scanning for annotations like `@deprecated` comments. The skill flags these marked fragments as no longer recommended for use, allowing you to safely target them for removal.

Do I need specific tools to detect orphaned files in my project?

Detecting orphaned files requires tools like Glob, Grep, and package manager command lines. The skill uses these dependencies to analyze project references and locate files that are not imported anywhere for safe deletion.

How does dead code detection handle technical debt reduction?

Dead code detection reduces technical debt by systematically identifying and removing unused, deprecated, or orphaned code fragments. This prevents accumulation over time, ensuring the codebase remains clean and efficient.