Usually I don’t need to do this kind of work, but when a migration of frontend library came in, a lot of stuff needed to be changed and there were no ready-made scripts. GitHub Copilot did the job for the boring part.
Software used in this blog post:
- Visual Studio Code
- GitHub Copilot extension
- GitHub Copilot Chat extension
Describe your expectations
What's the base unit for the action? In the below example it’s FormControl component which needs to be replaced. Also its properties and children need to be changed. Describe everything that needs to be done with the base unit, use short and clear sentences.

Test the action on a single selection, then adjust the guide for Copilot or move over to the next step.

Select the scope
It wouldn’t make sense if we select each occurrence of the base unit and trigger the action. Tell the Copilot what’s the scope. In our example it’s a file which has many occurrences of FormControl. Right-click in the editor and add the file to chat.

Loop over the instruction
Adjust the guide to make it a loop. Boring work has become fun now!

See also 🔗 How contextual understanding can help you? Codeium, real world examples
- "Workers working hard" photo by Museums Victoria on Unsplash