# Dead code cleanup (/code-quality--dead-code)

/code-quality--dead-code is a Claude Code skill in the Code section. Finds unused imports, variables, functions, files and dependencies, verifies each finding and only removes code after you confirm.

- Web version: https://skills.sgomez.dev/en/s/code-quality--dead-code
- Section: [Code](https://skills.sgomez.dev/en/code.md)
- Author: Santiago Gómez de la Torre
- License: MIT
- Source: https://github.com/sgomez-dev/claude-skills/blob/main/skills/code-quality/dead-code.md
- Updated 26 Mar 2026

## How to ask for it

- `/code-quality--dead-code find unused functions and variables in my project`
- `/code-quality--dead-code clean up dead imports in this file`
- `/code-quality--dead-code detect files in the repo that are no longer used`

## Install

macOS · Linux:

```
curl -fsSL https://raw.githubusercontent.com/sgomez-dev/claude-skills/main/install.sh | bash
```

Windows:

```
irm https://raw.githubusercontent.com/sgomez-dev/claude-skills/main/install.ps1 | iex
```

Claude Code plugin:

```
/plugin marketplace add sgomez-dev/claude-skills
/plugin install code-quality-skills@claude-skills-collection
```

## Permissions

- Reads: `**/*`
- Writes: `**/*`
- Runs: —
- Network: No
- Destructive: No

## Author's description

Find and remove dead code - unused functions, imports, variables, and files

## Pairs well with

- [Duplicate code finder (/code-quality--dry)](https://skills.sgomez.dev/en/s/code-quality--dry.md): Scans your codebase for duplicated code, shows every location, and suggests a shared abstraction with refactored code, ranked by occurrences and risk.
- [Code complexity analysis (/code-quality--complexity)](https://skills.sgomez.dev/en/s/code-quality--complexity.md): Measures cyclomatic and cognitive complexity per function, flags those over the thresholds and suggests how to simplify them.
- [Code smell detection (/code-quality--code-smells)](https://skills.sgomez.dev/en/s/code-quality--code-smells.md): Scans code for smells and anti-patterns, reporting each one's location, severity and a concrete refactoring suggestion.
- [Code naming review (/code-quality--naming)](https://skills.sgomez.dev/en/s/code-quality--naming.md): Reviews variable, function and class names in your code and returns a table of current name, suggested name and the reason for each change.
- [Error handling review (/code-quality--error-handling)](https://skills.sgomez.dev/en/s/code-quality--error-handling.md): Audits how your code handles errors, finding swallowed errors, generic catches and poor messages, and suggests concrete improvements.
- Recipe: [/pipeline--code-cleanup](https://github.com/sgomez-dev/claude-skills/blob/main/pipelines/code-cleanup.yaml): Code Cleanup

- [How we review this](https://skills.sgomez.dev/en/methodology.md)
