# Which Copilot Chat shortcuts can I use to explain, fix, test or document code?

Exam: GH-700 — Enhancing Operational Efficiency with Agentic AI (beta)
Knowledge domain: Enhance productivity by using GitHub Copilot (20–25%)
Updated: 2026-11-19T04:47:22.905065+00:00
HTML: https://learningpathx.com/faq/GH-700/gh700-copilot-chat-code-shortcuts-by-client.html

## Also asked as

- Where are /explain, /fix, /tests and /doc documented for Copilot Chat?
- How do the common code-oriented Copilot Chat slash commands differ by client?

Use these shortcuts in a client that documents them, with the relevant active or selected code. They are code-oriented Copilot Chat commands, not a universal command set for the Copilot app, CLI or browser.

| Shortcut | Purpose | Clients explicitly listing it in GitHub's multi-client cheat sheet |
| --- | --- | --- |
| `/explain` | Explain active or selected code | VS Code, Visual Studio, JetBrains IDEs and Xcode |
| `/fix` | Propose a fix for selected code or errors | VS Code, Visual Studio, JetBrains IDEs and Xcode |
| `/tests` | Generate unit tests for selected code | VS Code, Visual Studio, JetBrains IDEs and Xcode |
| `/doc` | Add or generate symbol documentation | Visual Studio and Xcode |

The VS Code and JetBrains common-command lists do not establish `/doc` support there; absence from those lists is not proof that a client never supports it. Type `/` in your actual client's prompt box to inspect currently available commands.

Provide explicit context. In VS Code, `#file` includes a file and `#selection` includes selected text; the app's `#` issue syntax has a different meaning. Also check lifecycle commands by client: the cheat sheet describes VS Code `/clear` as a new chat and `/new` as creating a project, while browser `/new` starts a conversation.

Review a proposed fix and execute generated tests before relying on them. Generating tests does not show that they pass or cover the intended behavior.

References: [GitHub Copilot Chat cheat sheet - GitHub Docs](https://docs.github.com/en/copilot/reference/chat-cheat-sheet?tool=vscode).

Source: [GH-700: Manage Copilot Sessions and Context Across Clients](https://learningpathx.com/guide/GH-700/gh-700-manage-copilot-sessions-and-context-across-clients.html)
