TechnicalCollectible prompt

Cursor prompt to plan a safe refactor

Get a step-by-step refactor plan with tests and risks before any code changes.

CursorWindsurfClaude Code

Curated by Nvoka

Nvoka wordmark logo
Nvoka wordmark logoTechnical

Cursor prompt to plan a safe refactor

Before editing any files, read {{files_or_folders}} and plan a refactor to achieve this goal: {{refactor_goal}} Constraints: behavior must stay the same for users and callers, public interfaces stay stable unless I approve a change, and {{extra_constraints}}. Return a plan, not code: 1. How the current code is structured and where the problems are, with file and function names 2. The target structure, in a few sentences 3. Steps small enough for one commit each, where the app builds and tests pass after every step 4. For each step: files touched, what moves or changes, and how to verify it 5. Tests to add before starting, to lock in current behavior 6. Risks, such as hidden callers, side effects, or performance changes Point out anything you couldn't find or verify. Wait for my approval before making changes.
Technicalnvoka.com/library/nvoka-cursor-refactor-planScan to open
Technical

Cursor prompt to plan a safe refactor

Get a step-by-step refactor plan with tests and risks before any code changes.

Nvoka logo

Curated by Nvoka

CursorWindsurfClaude CodeGitHub Copilot
Add to my library

Make it yours

Fill in the blanks and change any word. Only your copy changes, never the card.

Fill in the blanks

0 of 3 filled

Your prompt

Before editing any files, read {{files_or_folders}} and plan a refactor to achieve this goal: {{refactor_goal}} Constraints: behavior must stay the same for users and callers, public interfaces stay stable unless I approve a change, and {{extra_constraints}}. Return a plan, not code: 1. How the current code is structured and where the problems are, with file and function names 2. The target structure, in a few sentences 3. Steps small enough for one commit each, where the app builds and tests pass after every step 4. For each step: files touched, what moves or changes, and how to verify it 5. Tests to add before starting, to lock in current behavior 6. Risks, such as hidden callers, side effects, or performance changes Point out anything you couldn't find or verify. Wait for my approval before making changes.
See all