agent/codex/code/commands/refactor.md
Snider ecd47fe3db revert fcb9c189e5
revert fix(agentic): harden TODO workspace write

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-18 11:22:27 +00:00

723 B

name description args
refactor Guided refactoring with safety checks <subcommand> [args]

Refactor

Guided refactoring with safety checks.

Subcommands

  • extract-method <new-method-name> - Extract selection to a new method
  • rename <new-name> - Rename a class, method, or variable
  • move <new-namespace> - Move a class to a new namespace
  • inline - Inline a method

Usage

/core:refactor extract-method validateToken
/core:refactor rename User UserV2
/core:refactor move App\\Models\\User App\\Data\\Models\\User
/core:refactor inline calculateTotal

Action

This command will run the refactoring script:

~/.claude/plugins/code/scripts/refactor.php "<subcommand>" [args]