More in this categoryCoding Prompts
04 / 06
Coding prompt
Refactor Legacy Function
Clean up legacy code without breaking behavior.
Published
Refactor prompt
Refactor this legacy function for readability and performance WITHOUT changing its behavior. Apply: meaningful variable names, extract helper functions, remove duplication, and modern [LANGUAGE] idioms. Show a before/after diff summary of what changed and why. Code: [PASTE CODE]
Related prompts
- Coding Prompts2 phases
Function Draft to Production-Ready
Draft a working function, then harden it for production.
- GitHub Copilot
By Priya Sharma - Coding Prompts2 phases
- Coding Prompts
- Coding Prompts2 phases