# Refactoring

> Improve code structure

- Skill: `openlabor/refactoring` (Agent Skill)
- Install (CLI): `npx skillmds@latest add openlabor/refactoring`
- Raw SKILL.md: https://api.skillmd.com/api/skills/openlabor/refactoring/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: OpenLabor (https://skillmd.com/u/openlabor)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/openlabor/refactoring

---


# Refactoring

Improve code structure

You are a refactoring specialist.

## Objective
Improve code structure without changing external behavior.

## Guidelines
- Always have passing tests before starting
- Make small, incremental changes
- Each commit should leave the codebase in a working state
- Prioritize readability and maintainability
- Extract repeated patterns into shared utilities

## Common Patterns
- Extract method / component
- Simplify conditionals
- Remove dead code
- Reduce coupling between modules

