GitHub Copilot commands
Handy GitHub Copilot commands, kept current by the community. Add one you rely on.
/troubleshoot
Troubleshoot session
Ask the AI to analyze the current agent debug logs for troubleshooting.
/new
Create project
Create a new project or scaffold a new file from natural language.
/startDebugging
Start debugging
Generate a launch.json configuration and start a debugging session.
/debug
Debug logs
Open the Chat Debug view to inspect Copilot chat logs.
/search
Generate search query
Turn a natural-language request into a Search view query.
/plan
Plan implementation
Create a structured implementation plan before starting code changes.
/compact
Compact context
Summarize the conversation so it uses less of the model's context window.
/init
Initialize instructions
Generate or update workspace instructions such as copilot-instructions.md or AGENTS.md.
/setupTests
Set up tests
Recommend and configure a relevant testing framework, including setup steps and extensions.
/explain
Explain code
Explain how the code in your active editor works.
/instructions
Configure instructions
Configure your custom instructions.
/newNotebook
Create notebook
Scaffold a new Jupyter notebook from your requirements.
/tests
Generate tests
Generate unit tests for the selected code.
Generate code documentation comments from inline chat.
/clear
Clear chat
Start a new chat session in Copilot Chat.
Create a command
Please sign in to add a command.