Search⌘ K

Responsible Usage and Best Practices

Understand how to use GitHub Copilot responsibly by exploring best practices for its core features including code completions, Copilot chat, pull request summaries, AI code reviews, and coding agents. Learn to improve performance, recognize limitations, and maintain code quality and security while integrating AI assistance into your development workflow.

Now that you know what GitHub Copilot can do, it’s important to use it responsibly and effectively. While Copilot is a powerful tool, it’s imperfect—it relies on your guidance to produce high-quality, secure, and reliable code. In this lesson, we’ll review five key features of Copilot: code completion, Copilot chat, pull request summaries, AI code reviews, and the Copilot coding agent, while emphasizing responsible usage and best practices.

Steps for best practices and usage

Let’s discuss each step with its performance and limitations:

1. Code completion

One-line or in-block completions that expand comments or partially-typed statements; perfect for scaffolding boilerplate and stub functions.

Improving performance

  • Keep prompts tight and topical: Describe only the unit you’re working on to avoid irrelevant guesses.

  • Treat Copilot as an assistant, not an author: Accept, then review every line; run linters/tests immediately.

  • Refresh context when switching files: Re-open the tab or retype the comment so Copilot’s window refocuses on the new file.

  • Stay current: New model releases change patterns; skim release notes monthly. ...

Key limitations