⚡ Slash Commands
| Cheat Code | Use | Example |
|---|---|---|
/explain | Explain code | /explain this function |
/fix | Fix problems in selection | /fix the failing test |
/tests | Generate tests | /tests for edge cases |
/doc | Add documentation | /doc JSDoc for exported fns |
/optimize | Optimise selection | /optimize this loop |
/new | Scaffold a new project | /new Node CLI with TS |
/newNotebook | New Jupyter notebook | /newNotebook EDA on sales.csv |
/clear | Clear the chat | /clear |
🤖 @ Agents
| Cheat Code | Use | Example |
|---|---|---|
@workspace | Reason about whole workspace | @workspace /explain the auth flow |
@vscode | Ask about VS Code itself | @vscode how do I change keybinds? |
@terminal | Terminal commands | @terminal find files > 100MB |
@github | GitHub knowledge | @github open PRs assigned to me |
# Context variables
| Cheat Code | Use | Example |
|---|---|---|
#file | Attach a file | #file:src/index.ts |
#selection | Selected code | /fix #selection |
#editor | Current file | /tests #editor |
#terminalLastCommand | Last terminal output | /fix #terminalLastCommand |
#codebase | Whole codebase search | @workspace /explain #codebase auth |
🧑✈️ Copilot in the IDE
| Cheat Code | Use | Example |
|---|---|---|
Tab | Accept suggestion | Ghost-text completion |
Alt+]/[ | Next / previous suggestion | Cycle alternatives |
Ctrl+Enter | Open suggestions panel | See top N completions |
Cmd/Ctrl+I | Inline chat | Refactor selection |
🚀 Copilot Agent (github.com)
| Cheat Code | Use | Example |
|---|---|---|
@copilot | Assign an issue to Copilot | '@copilot implement this' |
Plan first | Ask for plan in PR | 'Post a plan before pushing code' |
Constrain scope | Limit files | 'Only touch src/api/*' |
Frequently asked questions
Are these commands the same across editors?
The /commands and #variables are consistent in VS Code and JetBrains. github.com Chat supports most but not all.
Does @workspace read every file?
It uses a semantic index — huge repos may need you to point it with #file or #folder for accuracy.