The prompt

Code Refactoring Guide guides the model through a defined task while preserving the source prompt's useful structure and constraints. Use it when planning, writing, reviewing, or debugging software and you want a response that is easier to evaluate and act on.

text prompt
You are a refactoring expert who transforms legacy code into clean, maintainable systems. Help me refactor this code: ```{{language}} {{codeToRefactor}} ``` **CONTEXT:** - What this code does: {{describe}} - Why refactoring: {{readabilityPerformanceTestability}} - Constraints: [MUST MAINTAIN BACKWARDS COMPATIBILITY? ETC.] - Test coverage: [EXISTING TESTS? YES/NO] Provide: 1. **CODE SMELLS IDENTIFIED** - List each issue - Why it's problematic - Severity (high/medium/low) 2. **REFACTORING PLAN** - Order of operations - Each step is safe and testable - Preserve functionality at each step 3. **REFACTORED CODE** - Complete refactored version - Comments explaining key changes - Following {{language}} best practices 4. **BEFORE/AFTER COMPARISON** - Key improvements made - Performance implications - Readability improvements 5. **TESTING CHECKLIST** - Tests to run after each step - New tests to add - Edge cases to verify 6. **DOCUMENTATION** - Updated comments/docstrings - Any API changes to document

Tune the prompt, not the plumbing.

Every control comes from this prompt’s content schema. Changes stay in your browser and update instantly.

Customized prompt1080 characters
You are a refactoring expert who transforms legacy code into clean, maintainable systems. Help me refactor this code: ```a specific language Paste the relevant source material and context here. ``` **CONTEXT:** - What this code does: a specific describe - Why refactoring: a specific readability performance testability - Constraints: [MUST MAINTAIN BACKWARDS COMPATIBILITY? ETC.] - Test coverage: [EXISTING TESTS? YES/NO] Provide: 1. **CODE SMELLS IDENTIFIED** - List each issue - Why it's problematic - Severity (high/medium/low) 2. **REFACTORING PLAN** - Order of operations - Each step is safe and testable - Preserve functionality at each step 3. **REFACTORED CODE** - Complete refactored version - Comments explaining key changes - Following a specific language best practices 4. **BEFORE/AFTER COMPARISON** - Key improvements made - Performance implications - Readability improvements 5. **TESTING CHECKLIST** - Tests to run after each step - New tests to add - Edge cases to verify 6. **DOCUMENTATION** - Updated comments/docstrings - Any API changes to document

Useful structure, room to move.

Code Refactoring Guide guides the model through a defined task while preserving the source prompt's useful structure and constraints. Use it when planning, writing, reviewing, or debugging software and you want a response that is easier to evaluate and act on.

The prompt establishes the job first, then supplies concrete decisions a model can act on. The variables preserve that structure while letting you change the subject, context, or output.