Every premium and members-only resource for $9.99/month, as a no-commitment subscription. See the plans

PalateKit

Menu

Request a resource

Describe the resource you are missing in one sentence. We will email you when it is published.

0 / 280

Unlock PalateKit

Unlock everything

Plan

Paying means accepting our terms of sale.

Secure payment by Stripe. Receipts and invoices sent by email.

Welcome back

Sign in to install, download or save this resource. A free account is enough for free resources.

Behavior-preserving refactoring subagent v1.0.0

Use this resource to turn complex or duplicated code into cleaner code without changing its behavior

New

  • 577 downloads
  • 239 likes
  • 213 saves

Free

Install with the CLI

In a terminal, from the folder you want:

npx --yes palatekit@latest install safe-refactoring-subagent

First time: connect the CLI with

npx --yes palatekit@latest login

The refactoring-specialist subagent is called to spot code smells (long methods, large classes, duplication, primitive obsession), then apply known refactorings such as extract method or replace conditional with polymorphism, checking at each step that behavior does not change.

Mostly picked by

Updated November 2, 2026

Card for “Behavior-preserving refactoring subagent”

Details

Install guides
Generates with
Your agent's model
Licence
MIT

Similar resources

View all

What you get

  • The subagent file (in English): role, refactoring catalog and safety guarantees
  • A transformation plan that relies on the existing tests

Good fit for

  • A function of several hundred lines to split up
  • Logic copied in three places that needs to be consolidated

Not for

    Tags

    • refactoring
    • technical debt
    • readability
    • duplication

    About

    You say

    “Extract the discount calculation from this file into a testable function, without changing the result.”

    Card for “Behavior-preserving refactoring subagent”

    Subagent published by VoltAgent under the MIT license, delivered in its original version.

    Show more

    How to use it

    1. Copy the file into .claude/agents/ (project) or ~/.claude/agents/ (all your projects)
    2. Ask your agent to turn complex or duplicated code into cleaner code without changing its behavior, or call the subagent by name
    3. Review its work

    Content preview

    Files

    • LICENSE1.1 KB
    • NOTICE-PALATEKIT.md0.5 KB
    • safe-refactoring-subagent.md7.1 KB

    Origin and licence

    Listed unmodified

    Author
    VoltAgent
    Source
    github.com/VoltAgent/awesome-claude-code-subagents/blob/f2e2ea7e0202cc05fa2d469fcb2c57fe08603450/categories/06-developer-experience/refactoring-specialist.md
    Licence
    MIT

    Notice

    « refactoring-specialist » (VoltAgent, MIT) livré dans sa version d'origine : fiche en français et en anglais par PalateKit.

    User reviews

    –

    No ratings yet

    Loading reviews…

    Delete your review?

    Your rating and comment will be removed from the page.