# Safe code refactoring (/code-quality--refactor)

/code-quality--refactor is a Claude Code skill in the Code section. Refactors the code you point to for quality without changing its behavior, explaining each change with a before and after.

- Web version: https://skills.sgomez.dev/en/s/code-quality--refactor
- 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/refactor.md
- Updated 26 Mar 2026

## How to ask for it

- `/code-quality--refactor refactor this component without changing its behavior`
- `/code-quality--refactor simplify this function while keeping the same output`
- `/code-quality--refactor improve this module's structure without breaking anything`

## 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

Intelligently refactor code while preserving behavior

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