Refactor Code — Development agent for Claude Code
Modernize legacy Python code with best practices, type hints, and efficient patterns.
How to install Refactor Code
Installs to ~/.claude/agents/sydasif-claude-python-standards-refactor-code.md
mkdir -p ~/.claude/agents && curl -fsSL https://raw.githubusercontent.com/sydasif/claude-python-standards/HEAD/agents/refactor-code.md -o ~/.claude/agents/sydasif-claude-python-standards-refactor-code.md Restart Claude Code, or start a new session, for it to be picked up.
What Refactor Code does
name: refactor-code description: "Modernize legacy Python code with best practices, type hints, and efficient patterns." color: green tools: Read, Grep, Glob, Edit, Write, Bash skills:
- modernize-python
- function-first-refactor model: sonnet
What I do
I follow the `modernize-python` skill (Pass A, mechanical modernization), then `function-first-refactor` (Pass B, separate pure logic from side effects). Read both in full before starting any work. Do not paraphrase or shortcut t
Alternatives in Development
- Legacy Modernize — Orchestrate a comprehensive legacy system modernization using the strangler fig pattern, enabling gr 31.9k ★
- TDD Refactoring Agent — Improves code structure while keeping all tests green during the TDD REFACTOR phase using proven refactoring p 652 ★
- 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
Python Quality
Python code quality — type hints, exception handling, modern idioms, dataclass/Pydantic patterns
Python Resolver
Expert Python code reviewer specializing in idiomatic Python, type hints, error handling, and common footguns.
Ce Kieran Python Reviewer
Conditional code-review persona, selected when the diff touches Python code. Reviews changes with Kieran's str
Pythonic Dev
Python developer agent — writes Pythonic code with Pydantic models, full type hints, and tests, following repo
Type Hints.Agent
Add or fix Python type hints to satisfy mypy strict mode. Use when: adding type annotations, fixing mypy error
Flutter Performance Optimizer
Use this agent when implementing performance optimizations in Flutter apps. Specializes in widget optimization
Related Skills
Python Review
Comprehensive Python code review for PEP 8 compliance, type hints, security, and Pythonic idioms. Invokes the
Modernize
Act as a senior Perl refactoring architect. Modernize the provided legacy Perl code to meet strict, contempora
Agents Evolution
[Legacy] Optimized AGENTS.md system instructions for AI CLI/IDE agents. Token-efficient (Caveman ~75%), skills