Skill · Code & Agents

Refactor Planner

A refactor plan made of small steps that each keep the system working, with the behaviour contract and the first tests to write.

Paid

Version 3Updated 15 Oct 2026

When to use

  • Tangled or legacy code needs restructuring and you fear regressions.
  • You are about to let a coding agent loose on a module and want a safe, reviewable order.
  • A change you need (a new region, a new provider) is blocked by the current structure.

When not to use

  • You need a bug fixed. Find the cause first with the Root-Cause Debugger; fixing and restructuring in one go hides what changed.
  • The code is a small function with good tests. Refactor it directly.

Example

User: Our 300-line calculate_invoice() in Python mixes discounts, tax and currency. I need to add a new tax region. There are no tests.

Result (excerpt):

Behaviour contract

  • B1: no discount → subtotal + tax at the region's rate
  • B2: percentage coupon applied before tax
  • B3: unknown region raises ValueError
  • B4: rounding to cents happens once, at the end

Tests to write first

| test | input | expected | covers |
| no_discount_de | 100.00, DE | 119.00 | B1 |
| coupon_before_tax | 100.00, 10% coupon, DE | 107.10 | B2 |

Steps

  1. Extract function: tax lookup into tax_rate(region) · ~20 lines · keeps B1–B4 · commit "extract tax_rate"
  2. Replace conditional with a table: regions become a dict · ~30 lines · commit "region rate table"

Stop when

  • Adding the new region touches the table and one test, nothing else.

Behaviour changes to decide later

  • Coupons above 100% produce a negative total (B2 path); confirm with finance before changing.

Illustrative example written by Meevra; your model's wording will differ.

What is inside

The full skill has these sections. The ones marked “in the pack” come with the download.

  • When to use on this page
  • When not to use on this page
  • Inputs to ask for in the pack
  • Workflow in the pack
  • Output format in the pack
  • Example on this page
  • Model notes (Oct 2026) in the pack
  • Troubleshooting in the pack

Get Refactor Planner

The full skill is a SKILL.md folder you install once and reuse: the workflow, the checklist and the answer format written out, with notes for each model. It comes in the Code & Agents pack (5 prompts · 15 skills · 1 free), with a QUICKSTART, setup notes in every item and 12 months of updates.

Or check out via Payhip

What is in the pack

All-Access 39 € vs 7 packs × 12 € = 84 € · less than buying 4 or more packs one by one

Stuck? Email support@meevra.com — we'll help you set it up.

See the pack

  • PromptPaid

    ChatGPT Project Instructions (anti-drift)

    Fill-in instructions for a ChatGPT Project that keep the assistant on one job, in one answer shape and grounded in your project files, plus the steps to turn the same text into a skill you can share.

    Code & Agents
    • ChatGPT
    • Codex
  • PromptPaid

    CLAUDE.md for a Solo Founder Repo

    A fill-in CLAUDE.md that tells a coding agent your stack, your exact commands, what needs your approval and how to report each task, so it stops adding packages and reporting passes it never saw.

    Code & Agents
    • Claude Code
    • Claude
    • Codex
    • Cursor
    • Antigravity
  • PromptPaid

    Code Review Partner

    Paste one file or change and get a merge call, real defects ranked by impact with the input that triggers each, fixes re-checked against every finding, and what the reviewer still needs to see.

    Code & Agents
    • Claude
    • ChatGPT
    • Gemini
    • DeepSeek
    • Qwen
    • GLM
    • Kimi
  • PromptPaid

    Custom GPT to ChatGPT Migration Kit

    Paste a Custom GPT's configuration and get its replacement: cleaned Project instructions, a plugin-ready SKILL.md, a knowledge-file map, a parity test and a cutover checklist.

    Code & Agents
    • ChatGPT
    • Codex
  • PromptPaid

    Project Rules Interview (AGENTS.md, CLAUDE.md, Cursor)

    Answer five questions in chat and get one AGENTS.md that every coding agent reads, plus thin CLAUDE.md and Cursor rule files only where you need them, with every rule checkable against a diff.

    Code & Agents
    • Claude
    • ChatGPT
    • Gemini
    • Claude Code
    • Codex
    • Cursor
    • Antigravity
  • SkillPaid

    AGENTS.md + Skills Starter

    One AGENTS.md that every coding agent reads, plus your repeated procedures turned into starter skills in the folders each agent loads.

    Code & Agents
    • Claude Code
    • Codex
    • Cursor
    • Antigravity