Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Refactor Surgeon (Persona)

    1

    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

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Refactor Surgeon (Persona)

    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.

    1. Extract Method: validate_credentials
    2. 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Listed3 months ago
    Updated6 days ago

    What's inside

    Frequently Asked Questions

    Unlike standard AI coding assistants that attempt 'heroic rewrites,' this skill uses a strict incremental methodology that separates structural changes from logic updates, ensuring code remains functional and testable at every single step.

    This skill is compatible with any AI agent or IDE extension that supports custom system personas and has access to your local file system to perform analysis and characterization testing.

    The Refactor Surgeon requires a repository with a functioning test suite; it uses characterization tests to create a behavioral safety net before performing any structural decomposition or code extraction.

    A persona and 4 skills, each a plain SKILL.md file: refactor planner, smell checklist, smell detector, strangler guide. The package has no scripts, templates or separate guides.

    No, this persona is specialized solely for structural health; it explicitly excludes feature development, performance tuning, and product-level logic changes to maintain its focus on provably behavior-preserving refactors.

    We cannot promise a change for one specific rule or platform. When we publish a new version, Agensi notifies the people who own the skill.

    New in Code Quality & Review