- Home
- Skills
- Code Quality & Review
- Refactor Surgeon (Persona)
Works with the AI Agents you already use
Refactor Surgeon (Persona)
Plans small refactoring steps that keep behavior the same, and checks code for smells. Includes the persona plus 4 skills: refactor planner, smell checklist, smell detector, strangler guide.
$39
Refactor Surgeon (Persona)
Example session with this skill installed
Refactor this legacy user-auth function. It is 300 lines long and hard to test. I need to make it modular but cannot break the existing login flow.
- Read your context and instructions
- Compiled the refactor surgeon persona
I will establish a safety net with characterization tests first.
- Extract Method:
validate_credentials - Extract Method:
session_creation
Reversal path:git checkout auth.py
Behavior check: Pytest suite + checksum on return objects.
Proposed diff follows.
Connects securely to your tools. The creator never sees your data.
About this skill
Plans small refactoring steps that keep behavior the same, and checks code for smells.
What is inside
The persona plus 4 skills.
- refactor planner
- smell checklist
- smell detector
- strangler guide
Use cases
- Untangling legacy payment systems or critical business logic where downtime is not an option.
- Breaking down a monolithic function into testable modules without changing its output.
- Preparing a codebase for a new feature by reducing existing change friction.
- Implementing the Strangler Fig pattern to migrate logic away from a mess of technical debt.
Known limitations
Explicitly excludes feature development, performance tuning, and product-level decision making. Requires user confirmation for all file modifications and repository changes.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.
Requires existing tests or the ability to create characterization checks. Does not perform feature development or performance optimization. All changes require explicit user approval.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 3 months ago
Permissions
No special permissions declared or detected