Top 10 Copilot Tips
Randy Pagels shares practical and insightful tips on harnessing the full potential of GitHub Copilot, enabling developers to write better code, streamline reviews, and integrate Copilot into everyday workflows.
Top 10 Copilot Tips
Posted on Jun 27, 2025 by Randy Pagels
Unlock Copilot’s potential with these down-to-earth strategies to boost your coding workflow:
1. Start with a Comment
Use plain-English (or your spoken language) comments to describe what you want. For example:
// build a function that...
# check if file exists...
This helps Copilot understand your context and generate more relevant code.
2. Prompt for Style
Let Copilot know your preferred coding style, such as:
// as a one-liner
// use async/await
3. Cycle Through Suggestions
Don’t settle for Copilot’s first suggestion. Use Alt + ]
or Alt + [
(or Ctrl + ]
/ Ctrl + [
on Mac) to browse alternate completions.
4. Be Specific
The more detail you provide, the better:
- “// sort list” is okay.
- “// sort users by signup date descending, handle empty case” is even better.
5. Refactor with Copilot Chat
Highlight code in VS Code and prompt Copilot Chat for rewrites, simplification, or feature additions. You can accept, reject, or tweak its changes.
6. Leverage Docs and Types
Copilot uses your docstrings and type hints/JSDoc for context. Keeping these updated leads to more accurate suggestions.
7. Quickly Write Tests
Ask Copilot to help with testing:
# test for edge cases
// create tests for validation
Copilot suggests realistic, scenario-based tests.
8. Use Copilot in PRs and Code Reviews
Summarize diffs, auto-generate review comments, and get explanations for code changes directly in VS Code or on GitHub.com.
9. Review Everything
Copilot is helpful, but not perfect. Edit and review its suggestions—don’t trust blindly.
10. Share Your Pro Tips
Contribute feedback and new ideas to GitHub Copilot. The more users share real-world feedback, the better Copilot gets.
11. Use Workspace Context
Open related files in your workspace—Copilot reads these to offer suggestions in line with your project’s patterns and conventions.
Want more ways to get the most from Copilot? Connect with the community and share your discoveries!
This post appeared first on “Randy Pagels’s Blog”. Read the entire article here