
Rewrite Plan
FreeCreate structured rewrite plans for code projects.
Free · Opens the source repo
What Rewrite Plan does
The Rewrite Plan skill enables developers to generate a comprehensive and structured plan for rewriting code across multiple files. This skill is particularly useful in scenarios where a systematic approach is required to ensure that code modifications are made safely and with clear ownership delineation. By producing a detailed audit trail, the skill helps maintain code integrity throughout the editing process, preventing the common pitfalls associated with large-scale refactoring efforts.
When utilizing this skill, users provide specific inputs such as the project’s design system and a brief outlining their intent for the rewrite. The skill then outputs a set of files, including a human-readable narrative (plan.md), an ownership classification (ownership.json), and an ordered list of steps (steps.json) that detail the necessary modifications. Each step includes a rationale and an associated risk level, ensuring that developers can prioritize their work effectively and avoid unnecessary disruptions to the codebase.
This skill is designed for teams working on complex projects where multiple contributors are involved. It ensures that everyone understands which parts of the code they are responsible for, thereby reducing the risk of conflicts and errors during the editing process. The structured output also aids in tracking progress and facilitates better communication among team members.
In summary, the Rewrite Plan skill is an essential tool for developers looking to implement a methodical approach to code rewrites. It not only helps in organizing the workflow but also ensures that the resulting changes are manageable and reviewable, ultimately leading to a more stable codebase.
When to use it
Use this skill when embarking on a significant code rewrite that involves multiple files and contributors, ensuring clear ownership and safety.
When not to use it
This skill may not be suitable for small, isolated changes where a full rewrite plan would be unnecessarily complex.
What you can build with it
Team Code Refactor
A team is tasked with refactoring a legacy codebase. They use the Rewrite Plan skill to ensure clear ownership and minimize disruption.
Design System Update
When updating a design system, the team generates a rewrite plan to systematically address changes across multiple components.
Risk Management in Code Changes
A project requires careful risk assessment for code changes. The skill helps classify risks and prioritize steps based on their impact.
How to install Rewrite Plan
View source1. Install with the skills CLI
npx skills add nexu-io/open-design/rewrite-plan --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by nexu-ioRewrite 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.
Frequently asked questions about Rewrite Plan
Similar skills
React Composition Patterns
Streamline your React component architecture with proven patterns.
Pester Should Migration
Easily convert Pester v5 assertions to v6 syntax.
Radix to Base UI Migration
Seamlessly migrate React components from Radix UI to Base UI.
Migrate Next.js to Vinext
Seamlessly transition your Next.js projects to Vinext.
WinUI 3 Migration Guide
Streamline your UWP to WinUI 3 migration process.
Refactor
Enhance code maintainability without altering behavior.
