Skip to main content

GitHub Copilot Chat cheat sheet

Use this cheat sheet to quickly reference the most common commands and options for using GitHub Copilot Chat.

This version of this article is for Copilot in JetBrains. For other versions of this article, click the tabs above.

About GitHub Copilot enhancements

You can enhance your experience of Copilot Chat with a variety of commands and options. Finding the right command or option for the task you are working on can help you achieve your goals more efficiently. This cheat sheet provides a quick reference to the most common commands and options for using Copilot Chat.

For information about how to get started with Copilot Chat in JetBrains, see Asking GitHub Copilot questions in your IDE.

Slash commands

Use slash commands to avoid writing complex prompts for common scenarios. To use a slash command, type / in the chat prompt box, followed by the command name.

Available slash commands may vary, depending on your environment and the context of your chat. To view a list of currently available slash commands, type / in the chat prompt box of your current environment. Below is a list of some of the most common slash commands for using Copilot Chat.

CommandDescription
/clearStart a new chat session.
/explainExplain how the code in your active editor works.
/fixPropose a fix for problems in the selected code.
/fixTestFailureFind and fix a failing test.
/helpQuick reference and basics of using GitHub Copilot.
/newCreate a new project.
/testsGenerate unit tests for the selected code.

Chat participants

Chat participants are like domain experts who have a specialty that they can help you with. You can specify a chat participant by typing @ in the chat prompt box, followed by a chat participant name. To see all available chat participants, type @ in the chat prompt box.

Commonly used chat participants include:

VariableDescription
@githubAllows you to use GitHub-specific Copilot skills. See Asking GitHub Copilot questions in your IDE.
@projectHas context about the code in your project. Use @project when you want Copilot to consider all of the files in your project when it answers your question.