Refactoring Hint Comment
Copilot's autocomplete engine uses surrounding comments to predict the next edit. This structured refactoring hint tells Copilot exactly where to extract, what to name it, and where to put it — turning a manual refactor into a single Tab accept.
// REFACTOR: Extract the {{logicDescription}} below into a pure function // called {{newFunctionName}}({{params}}): {{returnType}} // Move to {{targetFile}} // Reason: {{reason}} // Keep the call site here, just replace inline logic with the function call
Variables to customize
Why this prompt works
Copilot's autocomplete engine uses surrounding comments to predict the next edit. This structured refactoring hint tells Copilot exactly where to extract, what to name it, and where to put it — turning a manual refactor into a single Tab accept.
What you get when you save this prompt
Your workspace unlocks powerful tools to iterate and improve.
AI Optimization
One-click improvement with structure analysis and pattern suggestions.
Version History
Track every edit. Compare versions side-by-side with word-level diffs.
Folders & Tags
Organize your library with nested folders, tags, and drag-and-drop.
$ npm i -g @promptingbox/mcpUse Everywhere
Access prompts from Claude, Cursor, ChatGPT & more via MCP integration.
Your prompts, organized
Save, version, and access your best prompts across ChatGPT, Claude, Cursor, and more.