refactor
What it does
A skill for safely refactoring software that already exists — plugins, addons, libraries, apps or services — modernizing and restructuring the code without breaking anything that users or integrations depend on. It is deliberately not for greenfield projects: it assumes real code to start from, and its whole purpose is to make a refactor succeed.
A central principle runs through every phase: never invent. If something is unclear, ask.
How it works — nine ordered phases
- 01
Map the existing code
Mandatory first step. A living map of functions, data (options, metas, tables) and risk zones, so nothing is broken by accident.
- 02
Intent & compatibility mode
Decide explicitly: full backward compatibility, rename with migration, or no compatibility (with data loss).
- 03
Architecture
Design a modern, extensible architecture aligned with the chosen compatibility mode.
- 04
Security (spec)
The platform's checklist: validate, sanitize, escape, prepared queries, capability + nonce, path-traversal protection.
- 05
Lifecycle & uninstall (spec)
Idempotent install, update and an optional full-deletion “Danger Zone”.
- 06
Test safety net (spec)
Golden-master tests that lock public contracts byte for byte.
- 07
Handoff to a development AI
Hand all documentation to a development AI (Claude Code, Codex…) with strict, unbreakable rules.
- 08
Back to review
Review the delivery and run a correction loop until everything is resolved.
- 09
Improvement research (optional)
Research similar software and discuss worthwhile improvements, honestly.
Skills inside
This plugin ships a single, focused skill.
Two ways to install
Cowork (desktop app)
In the Claude desktop app, the simplest way is to download the .plugin file and drag it into the Cowork sidebar — or open it from the chat. No commands needed.
- Download the plugin's .plugin file from its page.
- Drag the file into the Cowork sidebar, or open it from the chat.
- Confirm the installation when Claude asks.
Claude Code (CLI)
In the terminal, add the marketplace once and install any plugin by name. Updates then flow through git.