Skip to main content

Getting started with prompts for Copilot-Chat on GitHub

Explore example prompts to ask Copilot-Chat about code, repositories, pull requests, and more.

Chat with Copilot on GitHub

Copilot-Chat responds differently depending on where you are on GitHub. The following examples show the kinds of questions you can ask in each context.

General software questions

  • tell me about nodejs web server frameworks
  • how can I create an Express app
  • what is the best way to update an npm package

Repository questions

Navigate to a repository to ask about its code, structure, or history.

  • What is the main purpose of this repo?
  • Where is rate limiting implemented in our API?
  • What was the last merged PR by USERNAME

File and code questions

Open a file or select specific lines, then ask about them.

  • Explain this file.
  • How could I improve this code?
  • Write a unit test for this method.

Pull request questions

Navigate to a pull request to ask about changes, reviews, or failing workflows.

  • Summarize the changes in this PR.
  • What's the purpose of this file?
  • Tell me why this job failed

Security alert questions

Navigate to a code scanning, secret scanning, or Dependabot alert to ask about it.

  • How would I fix this alert?
  • Which line of code is this alert referencing?

Issue, discussion, and commit questions

Navigate to any issue, discussion, or commit and ask Copilot-Chat about it.

  • What is the purpose of this issue?
  • What is the expected output of this commit?