Skip to content
coworkplugins

Claude skill

Refactor Safely

Refactor Safely is a Claude skill in the Lattice plugin. Restructure existing code safely without changing externally observable behavior.

CommunityShips in LatticeDeveloper Tools

What it does

The description in the skill's SKILL.md, which Claude reads to decide when to use it:

Restructure existing code safely without changing externally observable behavior. Composes context, design, architecture, code quality, and testing guardrails into a characterization-first refactoring workflow. Use when the user says 'refactor this', 'clean this up', 'untangle this module', 'move this to the right layer', 'simplify this code', or 'improve this structure'.

The skill's instructions (about 1,884 words) cover:

  • Required Skills
  • Additional Instructions
  • Workflow
  • Step 1: Establish Refactor Context
  • Step 2: Define Preservation Boundaries
  • Step 3: Propose High-Level Structural Plan
  • Step 4: Add Characterization Protection First
  • Step 5: Choose Refactor Strategy and Pacing
  • Step 6: Refactor in Small Green Steps
  • Step 7: Verify Preservation and Structural Improvement
  • Step 8: Capture Decisions and Remaining Debt

How to use it

  1. Refactor Safely comes inside the Lattice plugin, so you get it by installing that plugin, along with its 26 other skills. A plugin installs as one unit, with all its skills. The plugin's page has the install steps, and plugins are saved to your Claude account.
  2. Ask Claude for the task. When your request matches the skill's description, Claude loads it.
  3. To pick it yourself in Claude chat, type / or click + and choose refactor-safely. In Claude Code and Cowork, type:
    /lattice:refactor-safely

Source

Plugin
Lattice
SKILL.md
View on GitHub
Repo stars
214
Repo last pushed
Nov 14, 2026
Checked
Nov 16, 2026

More skills in Lattice