Skip to content
Skillpedia
General coding101k Β· #988

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.md

Copy 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

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.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

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.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
#988
License
Apache-2.0
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills