GitHub Copilot Chat Cheat Sheet
Quick reference for GitHub Copilot Chat commands and features. Works across JetBrains IDEs, Visual Studio, Visual
Studio Code, web browsers, and Xcode (availability may vary by environment). For real-time command lists, type /
(slash commands) or # (chat variables/participants) in the Copilot Chat prompt.
Version: Free, Pro, & Team
Slash Commands
Type / in the chat prompt to see available commands. Below are the most common ones:
Command Description
/clear Start a new chat session, resetting context.
/explain Explain how the code in the active editor works.
/fix Propose fixes for issues in the selected code.
/Extestfailure Find and fix a failing test.
/help Show quick reference and basics for Copilot Chat.
/new Create a new project scaffold.
/tests Generate unit tests for the selected code.
Chat Variables
Use chat variables to include specific context in prompts. Type # followed by a variable name in the chat prompt.
Variable Description
#block Includes the current block of code in the prompt.
#class Includes the current class definition.
Recommended by LinkedIn
#comment Includes the current comment.
#file Includes the entire content of the current file.
#function Includes the current function or method.
#line Includes the current line of code.
#path Includes the current file’s path.
#project Includes context about the entire project.
#selection Includes the currently selected text
Chat Participants (Experts in various domains)
Chat participants are specialized assistants for specific domains. Invoke them by typing @ followed by the participant name in the chat prompt. Type @ to see all available participants.
Participant Description
@azure Assists with Azure services (use, deployment, management). Public preview, subject to change.
@github Provides GitHub-specific Copilot skills (e.g., repo management, workflows).
@terminal Helps with VS Code terminal commands and debugging shell scripts.
@vcode Guides on Visual Studio Code commands and features.
@workspace Considers your project’s structure, code interactions, and design patterns.
@workspace How do I / Add a searching feature to my xxx Page that, allows user to search for products dynamically?/.
Notes for development with GC
To do this all you need to do is 1.Create a .github folder in the root directory of your project 2.Create the above mentioned instruction Markdown file inside the .github folder and the Github copilot automatically selects it