# Refactor

> Identify code smells and execute safe refactorings

- Skill: `hivellm/refactor` (Agent Skill)
- Install (CLI): `npx skillmds@latest add hivellm/refactor`
- Raw SKILL.md: https://api.skillmd.com/api/skills/hivellm/refactor/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: hivellm (https://skillmd.com/u/hivellm)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/hivellm/refactor

---

Analyze and refactor the specified code.

Target: $ARGUMENTS (file path, module, or area to refactor)

Steps:
1. Read the target code and understand its purpose
2. Identify code smells (long functions, duplication, high complexity)
3. Propose specific refactorings with rationale
4. Implement refactorings one at a time, verifying tests pass after each
5. Report what was changed and why

