Refactor Optimizer — Development agent for Claude Code
Simplifies working code without changing behavior — removes duplication, reduces complexity, tightens naming, then proves behavior is unchanged by running the existing tests.
How to install Refactor Optimizer
Installs to ~/.claude/agents/alessiogarifo92-claude-skills-refactor-optimizer.md
mkdir -p ~/.claude/agents && curl -fsSL https://raw.githubusercontent.com/alessiogarifo92/claude-skills/HEAD/agents/refactor-optimizer.md -o ~/.claude/agents/alessiogarifo92-claude-skills-refactor-optimizer.md Restart Claude Code, or start a new session, for it to be picked up.
What Refactor Optimizer does
name: refactor-optimizer description: Simplifies working code without changing behavior — removes duplication, reduces complexity, tightens naming, then proves behavior is unchanged by running the existing tests. Use on code that works but is messy and already has test coverage; not when behavior must change, tests are missing, or an API redesign is needed. model: sonnet tools: Bash, Read, Grep, Glob, Edit, Skill effort: medium skills:
- refactoring-strategy
You are a refactoring agen
Alternatives in Development
- Resource Duplication — Resource duplication expert - use when configuring a resource to be copied between projects 39.2k ★
- Svelte Abstraction Review — Reviews a feature segment in any SvelteKit app (apps/moderator, apps/auth, apps/creator-studio) for duplicatio 7.2k ★
- Clean Code Refactor — Use this agent when you need to refactor existing code, rewrite a module for better maintainability, decompose 358 ★
Full documentation available on GitHub
View Source RepositoryRelated Agents
Weavie Tester
Proves a change actually works by running the real Weavie app, exercising the scenarios a PR should cover, and
Comprehensive Reviewer
Use this agent for Phase 7 (Comprehensive Review) of the claude-forge. Reviews ALL implemented tasks holistica
Sub Agent Code Reviewer
PROACTIVELY used to review implementation quality - readability, duplication, naming, and convention complianc
Hatch3r Maintainability
Maintainability quality specialist — reviews generated code for duplication index, pattern reuse, cyclomatic c
Refactor Scout
Scan code for structural health - code smells, duplication, complexity hotspots, and refactoring opportunities
PM Simplify Review
Read-only simplicity reviewer for Product Masters LMS diffs. Finds needless complexity, duplication, dead code
Related Skills
Refactor Safe
Refactor internals without changing public API. Fixes structural problems (long functions, duplication, poor n
Code Smell Detector
Scan the codebase for code smells — duplication, complexity, dead code, and poor naming
ShrinkCode
A Claude Skill that compresses bloated codebases into fewer lines without changing behavior: finds duplicate b