refactor

Installation
SKILL.md

Refactor

Run Command Center's refactoring agent over a diff. Command Center plans the refactoring, spawns its own coding-agent sessions to apply it, and leaves the result as uncommitted edits in the working tree.

When to invoke

The user asks to refactor recent changes using Command Center — the current branch, a commit range, or uncommitted work. Examples:

  • "Refactor this branch with Command Center."
  • "Run the Command Center refactoring agent on my changes."
  • "Deduplicate the code I just wrote using CC."

Before invoking — important

  1. The refactoring edits the working tree. Do not edit files in the repo while the runner is waiting, and re-read any files you have cached once it finishes (the result lists exactly which files are dirty).
  2. Prefer a committed baseline. If there is meaningful uncommitted work, suggest committing it first so the refactoring is cleanly reviewable (and revertible) as git diff. Not a hard requirement — --working-tree exists for refactoring uncommitted changes deliberately.
  3. It takes a while — don't busy-poll. Typically minutes, up to tens of minutes for large diffs, and progress only updates between workflow steps, so quiet stretches of 10+ minutes are normal. The runner emits a heartbeat status line about once a minute during those stretches as proof of life. Run it in the background if your harness supports that, check on it at multi-minute intervals, and don't narrate every empty check to the user — relay progress lines when they appear.

How to invoke

Installs
25
GitHub Stars
1
First Seen
Jun 10, 2026
refactor — command-center-ai/skills