rewrite-plan
Lets your agent plan large code changes. It ensures changes are safe and easy to review step-by-step.
What it does
This agent creates a detailed plan for rewriting your code. It breaks down the work into smaller steps and defines who is responsible for each part, ensuring changes are safe and easy to review.
When to use it
- ✓When you need to rewrite parts of your code in an organized way.
- ✓When starting a large project that requires multiple modification steps.
- ✓To ensure code changes are safe and don't break the project.
Example of what to ask your AI
“Create a plan to rewrite the authentication section of my website, defining clear responsibilities for each file.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
It analyzes existing code and design to create a roadmap. This roadmap lists tasks, who will perform them, and the associated risks, ensuring everything is done step-by-step.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add nexu-io/open-design --skill rewrite-planOr download just the file:
curl -L https://raw.githubusercontent.com/nexu-io/open-design/main/plugins/_official/atoms/rewrite-plan/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Rewrite plan
Spec §20.3 / §21.3.2: scenario 4 (design → deliverable production code) requires a contract-shaped rewrite plan before the agent starts editing files. The plan is the audit trail every subsequent stage references; without it the patch path slides into "refactor everything that looks wrong" and the build breaks in unreviewable ways.
Inputs
code/index.jsonfromcode-import.token-map/*.jsonfromtoken-map.- The active design system DESIGN.md (already in prompt).
- The user's tune intent (typically a short brief).
Output
project-cwd/
└── plan/
├── plan.md # human-readable narrative
├── ownership.json # { file: '...', layer: 'leaf' | 'shared' | 'route' | 'shell' }
├── steps.json # ordered { id, files[], rationale, risk: 'low' | 'medium' | 'high' }[]
└── meta.json # { generatedAt, atomDigest, tokenMapDigest }
steps.json is the input patch-edit reads one entry per
iteration. ownership.json is the source of truth for "which
files belong to a single component vs. shared infrastructure";
patch-edit refuses to touch a shell-tier file unless the
matching step has risk: 'high' and the user explicitly confirmed.
Convergence
The atom completes when plan.md is non-empty AND steps.json
contains at least one step.
Anti-patterns the prompt fragment forbids
- Plans that include "rewrite the whole component library" as a single step. Break into per-component steps.
- Plans that don't classify ownership.
- Plans that don't list a
build-teststep at the end.
Status
Implemented by the daemon runner in
apps/daemon/src/plugins/atoms/rewrite-plan.ts. It classifies ownership and
writes plan.md, steps.json, and ownership.json.
FAQ
Why is a plan important before rewriting code?
A plan prevents the agent from trying to 'fix everything at once,' which can break the project in hard-to-understand ways. It ensures changes are made in a controlled and safe manner.
What are 'ownership boundaries'?
These define which code parts belong to a specific component and which are for general use. This helps organize the work and avoid conflicts.
What happens if a step is too risky?
The plan identifies high-risk steps. For these steps, the agent will require your explicit confirmation before making any changes, ensuring you are aware and agree.
Details
Original description by the author
Author a long-running multi-file rewrite plan that subsequent patch-edit + diff-review + build-test stages will execute, with explicit ownership boundaries and patch-safety guarantees.
repo: nexu-io/open-design
Popularity
- GitHub stars
- 101k
- Ranking position
- #528
- License
- Apache-2.0
- Updated
- 10/16/2026
Comments
- …
More skills from this repository
sample-plugin
Makes your agent create a metadata file for tests. It helps ensure code works correctly in different situations.
nexu-io/open-design
aster-atelier
Helps your agent create an artistic website with a classic look. It uses elegant imagery, blue skies, and serif fonts for a cinematic feel.
nexu-io/open-design
audio-jingle
Makes your agent generate audio like jingles and sound effects. It can create music and voices, saving the result as an audio file.
nexu-io/open-design
blog-post
Helps your agent write long articles or blog posts. It includes space for images, quotes, and author information.
nexu-io/open-design
Similar skills
benchmark-optimization-loop
Has your agent improve something's speed in a measured way. It tests multiple versions and chooses the fastest one that still works correctly.
affaan-m/ECC
change-impact
Helps your agent analyze the impact of code changes before making them. It compares the planned vs. actual results afterward, covering paths, data, tests, and documentation. Useful for risky or system-wide changes.
affaan-m/ECC
click-path-audit
Lets your agent trace all user buttons and interactions to find bugs. It finds issues where functions seem to work alone but fail together. Useful when bugs persist even after debugging.
affaan-m/ECC