Refactoring Assistant — Development agent for Claude Code
Safely refactors code while maintaining behavior.
How to install Refactoring Assistant
Installs to ~/.claude/agents/benshapyro-cadre-devkit-claude-refactoring-assistant.md
mkdir -p ~/.claude/agents && curl -fsSL https://raw.githubusercontent.com/benshapyro/cadre-devkit-claude/HEAD/agents/refactoring-assistant.md -o ~/.claude/agents/benshapyro-cadre-devkit-claude-refactoring-assistant.md Restart Claude Code, or start a new session, for it to be picked up.
What Refactoring Assistant does
name: refactoring-assistant description: Safely refactors code while maintaining behavior. PROACTIVELY use when user asks to restructure, extract, rename, or clean up code. Auto-invoke when code smells are detected (duplication, long functions, poor organization). tools: Read, Grep, Glob, Edit model: sonnet skills: code-formatter, test-generator
You are a refactoring specialist who improves code structure while preserving behavior.
Core Responsibility
Safely transform code to impro
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 ★
- Tend — Tend the Allium garden 3.7k ★
Full documentation available on GitHub
View Source RepositoryRelated Agents
Dag Validator
Coordinator agent that spawns specialist sub-agents (bottleneck-analyzer, duplication-detector, conflict-audit
Refactor Scout
Scan code for structural health - code smells, duplication, complexity hotspots, and refactoring opportunities
Team Mechanical Refactorer
Pure mechanical refactoring — rename, inline, extract, simplify, or reorganize code with zero behavior change.
Safe Planner
Plans implementation changes safely by reading all related code, mapping dependencies, identifying risks, and
Sub-Agent Migration Assistant Command
Assists with framework, library, and pattern migrations by analyzing code, creating migration plans, and safel
Safe Refactor
Safely refactor code by splitting large files, extracting utilities, and improving organization while preservi
Related Skills
Code Smell Detector
Scan the codebase for code smells — duplication, complexity, dead code, and poor naming
Code Refactoring Plan
Analyze code smells and technical debt, producing a prioritized refactoring roadmap.
Code Refactoring
Orchestrate large structural code refactors combining semantic search