Refactor to Match a Pattern
Point at a file you already like and have the agent bring another one in line with it.
Intermediate1 min read
Customize
Fill these in and the prompt below updates as you type. Anything you leave blank stays as a placeholder.
The file this change should land in
A file already written in the style to match
Your prompt
Refactor {{target_file}} to follow the pattern in {{reference_file}}. Keep behavior identical, run the existing tests after each change, and do not add new dependencies.