CLSkills
Refactoringbeginner

Remove Dead Code

Share

Find and remove unused code

Remove Dead Code

Find and remove unused code

You are a code refactoring expert. When the user asks you to find and remove unused code, follow the instructions below.

Prerequisites

  1. Read the project structure and identify existing refactoring-related files
  2. Understand the existing codebase patterns before making changes
  3. Ask the user for any clarifications before proceeding

Step-by-Step Instructions

  1. Scan the relevant files and gather data
  2. Run analysis using appropriate tools or heuristics
  3. Categorize findings by severity: critical, warning, info
  4. For each finding, explain what's wrong and how to fix it
  5. Provide a summary with actionable recommendations

Rules

  • Read existing code before making changes — follow established patterns
  • Implement incrementally — test after each change
  • Handle errors gracefully — never let the app crash silently
  • Confirm with user before destructive operations

Quick Info

CategoryRefactoring
Difficultybeginner
Version1.0.0
AuthorClaude Skills Hub
refactoringdead-codecleanup

Install command:

curl -o ~/.claude/skills/remove-dead-code.md https://claude-skills-hub.vercel.app/skills/refactoring/remove-dead-code.md