Skip to content
Skillpedia
General coding101k · #528

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

https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/rewrite-plan/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/rewrite-plan/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
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-plan

Or download just the file:

curl -L https://raw.githubusercontent.com/nexu-io/open-design/main/plugins/_official/atoms/rewrite-plan/SKILL.md -o SKILL.md
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.json from code-import.
  • token-map/*.json from token-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-test step 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

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills