Code Refactor Agent — Development agent for Claude Code
Duplicate code detection and refactoring specialist.
How to install Code Refactor Agent
Installs to ~/.claude/agents/nwiizo-ccswarm-code-refactor-agent.md
mkdir -p ~/.claude/agents && curl -fsSL https://raw.githubusercontent.com/nwiizo/ccswarm/HEAD/.claude/agents/code-refactor-agent.md -o ~/.claude/agents/nwiizo-ccswarm-code-refactor-agent.md Restart Claude Code, or start a new session, for it to be picked up.
What Code Refactor Agent does
name: code-refactor-agent model: opus description: Duplicate code detection and refactoring specialist. Uses similarity-rs for semantic similarity detection and performs refactoring based on DRY principle. USE PROACTIVELY after fixing build/clippy errors or when code duplication is suspected. tools: Read, Edit, MultiEdit, Write, Bash, Grep, Glob, TodoWrite, mcp__serena__find_symbol, mcp__serena__replace_symbol_body, mcp__serena__search_for_pattern, mcp__serena__get_symbols_overview, mcp__ser
Alternatives in Development
- TDD Refactoring Agent — Improves code structure while keeping all tests green during the TDD REFACTOR phase using proven refactoring p 652 ★
- Refactor Validator — Use this agent when a significant refactoring has been completed and you need to verify that the changes are c 358 ★
- Refactor Engineer — Behavior-preserving refactoring specialist 221 ★
Full documentation available on GitHub
View Source RepositoryRelated Agents
Rust Fix Agent
Rust specialized build/clippy error fixing agent. Use when cargo build or cargo clippy errors occur. Makes pra
Auto Discovery
Automated agent that discovers non-obvious cross-domain connections by analyzing conceptual relationships beyo
Release
Prepares repositories for semantic-release and runs dry runs or real releases with user approval.
Gfd Verifier
grace-feature-dev independent verifier. Read-only. Runs the card's tests against the real code and performs Se
Code Quality Author
Use to FIX/refactor code to meet the quality standards — resolve clean-code, DRY, KISS violations with the sma
Code Smell Detector
Use this agent to perform gentle code smell detection, identifying maintainability hints and readability impro
Related Skills
Test Driven Development.SKILL
Enforces TDD discipline with RED-GREEN-REFACTOR cycle. Use when writing new features, fixing bugs, or refactor
Polyglot Refactor
Semantic, AST-safe multi-language code refactoring engine for AI agents and developers (Kotlin, Swift, TypeScr
Logic Diff
Check two code versions for semantic equivalence — use after a refactor or rewrite