rewrite-plan
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.
Skill link
https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/rewrite-plan/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCreate a plan to rewrite the authentication section of my website, defining clear responsibilities for each file.β
5 new skills a week. 1 minute to read.
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.
Technical 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
- #988
- License
- Apache-2.0
- Updated
- 10/15/2026
Comments
- β¦
More skills from this repository
sample-plugin
101kMakes your agent create a metadata file for tests. It helps ensure code works correctly in different situations.
aster-atelier
101kHelps your agent create an artistic website with a classic look. It uses elegant imagery, blue skies, and serif fonts for a cinematic feel.
audio-jingle
101kMakes your agent generate audio like jingles and sound effects. It can create music and voices, saving the result as an audio file.
blog-post
101kHelps your agent write long articles or blog posts. It includes space for images, quotes, and author information.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.