# Refactor

> Refactor code while maintaining behavior Use when this capability is needed.

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

---


# Refactoring Workflow

## Acceptance Criteria
- [ ] All existing tests still pass
- [ ] No change in external behavior
- [ ] Code is cleaner/more maintainable
- [ ] No new linting errors

## Steps
1. Run existing tests to establish baseline
2. Identify refactoring opportunities
3. Make incremental changes
4. Run tests after each change
5. If tests fail, revert and try different approach
6. Document what was refactored and why

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/gabino75) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-15 -->

