Agent skill

Rewrite Planner

by EmeaAppGbb in EmeaAppGbb/spec2cloud

Plan a component-by-component rewrite from one stack to another using the strangler fig pattern.

MITAuto-check passed

Install Rewrite Planner

skills CLI
$ npx skills add EmeaAppGbb/spec2cloud --skill rewrite-planner -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install EmeaAppGbb/spec2cloud rewrite-planner --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/EmeaAppGbb/spec2cloud.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/rewrite-planner .claude/skills/rewrite-planner && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
rewrite-planner
GitHub stars
100
Token cost
~2.5k tokens
SKILL.md length
939 words
Files
1
Skills in repo
38
Repo updated
First seen
Licence
MIT

At a glance

Plan a component-by-component rewrite from one stack to another using the strangler fig pattern.

  • Works in 5 steps: Identify Component Boundaries → Order by Dependency (Leaves First) → Define Old → New Mapping → …
  • Migrating between technology stacks incrementally
  • SKILL.md covers Role, Inputs, Strangler Fig Pattern and Process, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Rewrite Planner is an agent skill from EmeaAppGbb/spec2cloud. Plan a component-by-component rewrite from one stack to another using the strangler fig pattern. Each increment rewrites one component while keeping the rest running. Use when migrating between technology stacks incrementally.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The licence is MIT.

When your agent uses it

  • Migrating between technology stacks incrementally

Example prompts

  • “/rewrite-planner”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Identify Component Boundaries
  2. Order by Dependency (Leaves First)
  3. Define Old → New Mapping
  4. Plan Coexistence
  5. Define Cutover Criteria

What it can do on your machine

Read from SKILL.md and the folder at commit 8e76618. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown and json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Rewrite Planner loads about 2.5k tokens when it runs. Until then it costs about 61 tokens; SKILL.md has 939 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~61
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from EmeaAppGbb/spec2cloud at commit 8e76618, republished under its MIT licence (© EmeaAppGbb). 939 words, ~2,508 tokens.

Download SKILL.mdSave it as .claude/skills/rewrite-planner/SKILL.md (or your agent's skills folder).
name
rewrite-planner
description
Plan a component-by-component rewrite from one stack to another using the strangler fig pattern. Each increment rewrites one component while keeping the rest running. Use when migrating between technology stacks incrementally.

Rewrite Planner

Role

You are the Rewrite Planner. You plan incremental component-by-component rewrites using the strangler fig pattern. Each increment replaces exactly one component with its new-stack equivalent while keeping all other components running on the old stack. Your output feeds directly into the standard Phase 2 delivery pipeline.

You do NOT perform the rewrite. You produce the plan.

Inputs

Before generating any increments, read:

  1. Rewrite assessment (specs/assessment/rewrite.md) — component inventory, old → new stack mapping, complexity ratings, risk assessment.
  2. ADRs (specs/adrs/) — especially the "Rewrite vs Modernize" ADR that justifies the rewrite decision for each component.
  3. Architecture map (specs/assessment/architecture.md) — component dependency graph, integration points, data flows.
  4. Extraction outputs — any existing code analysis, data model extraction, or API contract extraction from the brownfield codebase.
  5. Existing increment plan (specs/increment-plan.md) — append, never overwrite.

Strangler Fig Pattern

The core principle: never rewrite everything at once. Instead:

┌─────────────────────────────────────┐
│           Facade / Router           │
├──────────┬──────────┬───────────────┤
│ Old Comp │ NEW Comp │  Old Comp C   │
│    A     │    B     │  (not yet     │
│ (legacy) │ (rewrite)│   rewritten)  │
└──────────┴──────────┴───────────────┘
  • A facade or routing layer directs traffic to old or new components.
  • Each increment replaces one component behind the facade.
  • Old and new components coexist during the transition.
  • Cutover happens per component, not all at once.

Process

Step 1 — Identify Component Boundaries

From the architecture map, identify components that can be rewritten independently. A rewritable component has:

  • Clear input/output interfaces (APIs, message contracts, shared types).
  • Bounded data ownership (it owns its data, or data can be shared via a well-defined interface).
  • Testable behavior in isolation.

If a component cannot be isolated, it must be split first. Create a pre-requisite increment for the split.

Step 2 — Order by Dependency (Leaves First)

Build the component dependency graph and order rewrites leaf-first:

  1. Leaf components — components with no dependents. Safest to rewrite because nothing else calls them directly.
  2. Interior components — components with both dependencies and dependents. Rewrite after their dependents are handled or shimmed.
  3. Core components — heavily-depended-upon components. Rewrite last, with maximum test coverage in place.
Step 3 — Define Old → New Mapping

For each component rewrite increment, specify:

FieldDescription
Old componentName, location, technology, key interfaces
New componentTarget technology, target location, new interfaces
Data migrationHow data moves from old to new (if applicable)
Integration shimAdapter/facade that makes new component look like old one to callers
Coexistence planHow old and new run side-by-side during transition
Cutover criteriaConditions under which old component is decommissioned
Step 4 — Plan Coexistence

For each rewrite increment, define how old and new components coexist:

  • Feature flags — route traffic to old or new based on configuration.
  • API versioning — new component exposes v2 endpoints while old serves v1.
  • Database sharing — define read/write boundaries if both components access the same data store.
  • Event forwarding — if the old component publishes events, the new component must publish compatible events.
Step 5 — Define Cutover Criteria

Each component has explicit cutover criteria:

  • All acceptance tests pass against the new component.
  • Performance benchmarks meet or exceed old component.
  • No error rate increase in production (monitored for N days).
  • Data migration verified (row counts, checksums, spot checks).
  • Rollback tested and verified before cutover is finalized.

Increment Format

Each increment in specs/increment-plan.md follows this template:

markdown
## rw-001: Rewrite User Service (Express → Fastify)

- **Type:** rewrite
- **ADR:** adr-003-rewrite-user-service.md
- **Old Component:** src/services/user-service/ (Express, JavaScript)
- **New Component:** src/services/user-service-v2/ (Fastify, TypeScript)
- **Scope:** Rewrite user CRUD operations. Auth integration stays on old
  stack until rw-003.
- **Acceptance Criteria:**
  - [ ] All existing user API tests pass against new component
  - [ ] Response format is identical (contract tests)
  - [ ] Latency p95 ≤ old component p95
  - [ ] Feature flag routes traffic to new component
- **Test Strategy:**
  - Port existing unit tests to new stack
  - Contract tests verify old/new produce identical responses
  - Load test to verify performance parity
  - E2e tests run against both old and new (dual-run)
- **Behavioral Deltas:** (Track-dependent — see Behavioral Deltas section)
- **Data Migration:** None — shares existing PostgreSQL database
- **Integration Shim:** API gateway routes /api/users to new service
  when feature flag `use-new-user-service` is enabled
- **Dependencies:** none (leaf component)
- **Rollback Plan:** Disable feature flag → traffic returns to old component
- **Cutover Criteria:** 7 days in production with <0.1% error rate increase

Output

Append all generated increments to specs/increment-plan.md. Do NOT overwrite existing content.

After appending, update .spec2cloud/state.json:

json
{
  "incrementPlan": [
    { "id": "rw-001", "type": "rewrite", "status": "planned" },
    { "id": "rw-002", "type": "rewrite", "status": "planned" }
  ]
}

Append to .spec2cloud/audit.log:

[ISO-timestamp] step=rewrite-planning action=increments-generated count={N} result=done

Behavioral Deltas

Each increment must include behavioral change specifications that feed into Phase 2 test generation. The format depends on the project's testability track (from .spec2cloud/state.json).

Show full SKILL.md (386 more words)Show less
Track A (Testable) — Gherkin Deltas

For each increment, specify which Gherkin scenarios are affected:

  • New scenarios: Scenarios for behavior that doesn't exist yet (will be red in Phase 2)
  • Modified scenarios: Existing @existing-behavior scenarios that change (update expected outcomes)
  • Unchanged scenarios: Existing scenarios that must still pass (regression safety net)

Include Gherkin deltas in the increment format:

- **Gherkin Deltas:**
  - New: `Scenario: {description}` — {why this is needed}
  - Modified: `Scenario: {existing scenario name}` — Then step changes from X to Y
  - Regression: N existing scenarios must still pass unchanged
Track B (Non-Testable) — Documentation Deltas

For each increment, specify behavioral documentation updates:

  • Updated scenarios: Which documentation-only scenarios change
  • New scenarios: New behavioral expectations to document
  • Manual checklist updates: New or modified manual verification items

Include documentation deltas in the increment format:

- **Behavioral Doc Updates:**
  - Updated: `Scenario: {name}` — expected behavior changes from X to Y
  - New: `Scenario: {name}` — documents new expected behavior
  - Manual verification: {new checklist items}

Self-Review Checklist

Before finalizing, verify:

  • Every rewrite increment references its justifying ADR.
  • Dependency ordering is leaf-first (no component rewritten before its dependents are shimmed or rewritten).
  • Every increment has a coexistence plan — old and new run side-by-side.
  • Every increment has cutover criteria with measurable thresholds.
  • Rollback is always possible — feature flags, blue/green, or similar.
  • Contract tests are specified to verify old/new behavioral equivalence.
  • Data migration (if any) is reversible or has a fallback.
  • No increment rewrites more than one component.
  • Every increment includes behavioral deltas (Gherkin for Track A, docs for Track B)
  • Modified existing behavior has both old and new expectations documented
  • Regression scope is identified (which existing tests/scenarios must still pass)

Constraints

  • One component per increment. Never rewrite two components at once.
  • Behavioral equivalence first. New component must match old behavior before enhancements. Enhancements go in follow-up increments.
  • Feature flags are mandatory. Every rewrite must be toggleable.
  • ADR linkage required. Every increment references its justifying ADR.

Handoff

After approval at the human gate, each increment proceeds through Phase 2: test generation → contract generation → implementation → build & deploy.

Mandatory Completion Checklist

The orchestrator MUST verify ALL of the following before marking rewrite-planner as complete:

  • specs/increment-plan.md is updated with all rewrite increments (unique IDs, scope, dependencies, effort)
  • Each increment rewrites exactly one component (no multi-component increments)
  • Strangler fig routing (feature flags) is planned for each increment
  • Behavioral equivalence tests are specified before any enhancement increments
  • Every increment references its justifying ADR
  • Gherkin deltas document both old behavior (to preserve) and new behavior (to verify)
  • State JSON and audit log are updated

BLOCKING: If any item is unchecked, the skill has NOT completed successfully. The orchestrator must loop back and complete the missing items before advancing to Phase 2 delivery.

© EmeaAppGbb, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/rewrite-planner of EmeaAppGbb/spec2cloud.

Open the folder on GitHubat commit 8e76618

Compare with similar skills

Rewrite Planner next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Rewrite Planner compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Rewrite Planner this skillEmeaAppGbb/spec2cloud100—~2.5kAutomated safety check: PassMIT
Plannerpenpot/penpot61k—~2.7kAutomated safety check: PassMPL-2.0
Agent Plannerruvnet/ruflo74k2 repos~1.2kAutomated safety check: PassMIT
Rewrite Plannexu-io/open-design100k—~511Automated safety check: PassApache-2.0
Agent Goal Plannerruvnet/ruflo74k3 repos~842Automated safety check: PassMIT
Agent Code Goal Plannerruvnet/ruflo74k3 repos~3.6kAutomated safety check: PassMIT

Similar skills

  • Planner

    penpot/penpot

    Read-only planning and architecture analysis — produce a structured implementation plan with task breakdown, acceptance criteria, sizing, and checkpoints.

    61k GitHub stars~2.7k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Agent Planner

    ruvnet/ruflo

    Agent skill for planner - invoke with $agent-planner. An agent skill from ruvnet/ruflo.

    74k GitHub starsUsed in 2 repos~1.2k tokens
    Agent WorkflowsAuto-check passed
  • Rewrite Plan

    nexu-io/open-design

    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.

    100k GitHub stars~511 tokensUpdated today
    Frontend & DesignAuto-check passed
  • Agent Goal Planner

    ruvnet/ruflo

    Agent skill for goal-planner - invoke with $agent-goal-planner

    74k GitHub starsUsed in 3 repos~842 tokens
    Auto-check passed
  • Agent skill for code-goal-planner - invoke with $agent-code-goal-planner

    74k GitHub starsUsed in 3 repos~3.6k tokens
    Agent WorkflowsAuto-check passed
  • Rewrite

    NxcoreAI/EverRoom

    Rewrite only the supplied selectedText per the instruction and return the replacement fragment.

    3k GitHub stars~124 tokensUpdated today
    Auto-check passed

More from EmeaAppGbb/spec2cloud

All 38 skills in this repo
  • Azure Deployment

    EmeaAppGbb/spec2cloud

    Provision Azure infrastructure, deploy to Azure Container Apps, and verify via smoke tests.

    100 GitHub stars~1.8k tokensUpdated 5 mo ago
    Auto-check passed
  • Contract Generation

    EmeaAppGbb/spec2cloud

    Generate API contracts, shared TypeScript types, and infrastructure resource definitions from Gherkin scenarios and test files.

    100 GitHub stars~1.6k tokensUpdated 5 mo ago
    Auto-check passed
  • Ddd Modeling

    EmeaAppGbb/spec2cloud

    Create Domain-Driven Design proposals from product specs or brownfield extraction outputs.

    100 GitHub stars~2.4k tokensUpdated 5 mo ago
    Auto-check passed
  • Implementation

    EmeaAppGbb/spec2cloud

    Write application code to make failing tests pass using contract-driven, slice-based architecture.

    100 GitHub stars~2.8k tokensUpdated 5 mo ago
    Auto-check passed
  • Spec Refinement

    EmeaAppGbb/spec2cloud

    Review PRDs and FRDs through product and technical lenses. An agent skill from EmeaAppGbb/spec2cloud.

    100 GitHub stars~2.2k tokensUpdated 5 mo ago
    Auto-check passed
  • State Management

    EmeaAppGbb/spec2cloud

    Read, write, and maintain .spec2cloud/state.json across phases and increments.

    100 GitHub stars~1.5k tokensUpdated 5 mo ago
    Auto-check passed

Questions about Rewrite Planner

What does Rewrite Planner do?

Plan a component-by-component rewrite from one stack to another using the strangler fig pattern. Rewrite Planner is an agent skill from EmeaAppGbb/spec2cloud. Plan a component-by-component rewrite from one stack to another using the strangler fig pattern.

When should I use Rewrite Planner?

Rewrite Planner fits situations like: migrating between technology stacks incrementally.

How do I install Rewrite Planner in Claude Code?

Run `npx skills add EmeaAppGbb/spec2cloud --skill rewrite-planner -a claude-code`. Or copy the skill folder (.github/skills/rewrite-planner in EmeaAppGbb/spec2cloud) into .claude/skills/rewrite-planner in your project. Claude Code loads it when a task matches its description.

How do I install Rewrite Planner in Codex?

Run `npx skills add EmeaAppGbb/spec2cloud --skill rewrite-planner -a codex`. Or copy the skill folder (.github/skills/rewrite-planner in EmeaAppGbb/spec2cloud) into .agents/skills/rewrite-planner in your project. Codex loads it when a task matches its description.

Can I use Rewrite Planner in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add EmeaAppGbb/spec2cloud --skill rewrite-planner -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rewrite-planner, .gemini/skills/rewrite-planner, .github/skills/rewrite-planner and .opencode/skills/rewrite-planner in your project.

What does Rewrite Planner need to run?

SKILL.md names no scripts, command-line tools or credentials: Rewrite Planner is instructions for the agent only.

Does Rewrite Planner access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Rewrite Planner safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Rewrite Planner use?

Rewrite Planner is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Rewrite Planner use?

About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Rewrite Planner?

Skills that share tags, products or a category with Rewrite Planner: Planner (penpot/penpot, 61k stars), Agent Planner (ruvnet/ruflo, 74k stars), Rewrite Plan (nexu-io/open-design, 100k stars) and Agent Goal Planner (ruvnet/ruflo, 74k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Rewrite Planner?

EmeaAppGbb (a GitHub organization) maintains it in EmeaAppGbb/spec2cloud, which has 100 GitHub stars. The repository holds 38 skills in this directory. The repository was last updated on April 16, 2026.

Source: EmeaAppGbb/spec2cloud on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.