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.

#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

  1. I would highly recommend creating "copilot-instructions.md" during initializing your project and you can either write your incstructions on your own or ask another LLM model to break down your application problem into sub-problems that can solve the complex problem. Remember you are responsible for the development of your application

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

Article content

To view or add a comment, sign in

More articles by Orkhan Ahmadov

  • Digital Forensics

    Digital Forensics Abstract Digital forensics is the process of identifying, preserving, analyzing, and presenting…

  • ADAS Applications Features

    Road adaptability car light system This system can automatically adjust the lighting range and angle of the car lights…

  • Advanced Driver Assistance Systems(ADAS)

    ADAS is the abbreviation of Advanced Driver Assistance System. Simply is making active judgments and preventive…

Insights from the community

Others also viewed

Explore topics