Refactor your codebase
Strip out unused code and update outdated patterns while behavior stays the same.
ZeroTwo clears out dead code, untangles oversized files, merges repeated logic, and updates outdated patterns, working in small passes that are easy to review.
Skills & Plugins
- SecurityReviews risky cleanups and dependency changes before you merge.
- Skill CreatorTurns a proven checklist into a reusable skill (
$skill-creator).
Starter prompt
Introduction
Refactoring reduces engineering debt by reshaping the existing system, not migrating the stack. ZeroTwo maps the messy area first, then lands cleanup in small passes with validation. Run it as a Work or Code task against your repo. Aims:
- Delete unused code, flags, and shims.
- Shrink noisy modules and clarify boundaries.
- Adopt the repo's current conventions.
- Keep public behavior stable.
How to use
- Have ZeroTwo map the area before editing.
- Choose one cleanup theme at a time.
- Before patching, state current behavior, the intended improvement, and the smallest proving check.
- Review and test after every pass.
- Treat stack or dependency migrations as separate tasks.
Plan mode (/plan-mode) can draft the refactor plan first, since it keeps that turn read-only.
Use skills for repeatable patterns
Skills help when cleanup rules recur across repos. Add framework, security, and CI skills around risky work, and turn a proven pass into a reusable skill.
Related use cases
Create a CLI ZeroTwo can use
Hand ZeroTwo a composable command wrapping an API, a log source, an export or a team script.
Create browser-based games
Write a game plan and have ZeroTwo build it and try it out in a live browser.
Follow a goal
Hand ZeroTwo one lasting objective for long-running work.


