ext install GitHub.copilot
ext install GitHub.copilot-chat| Command | Action | Command | Action |
|---|---|---|---|
/explain | Explain selected code | /fix | Fix problems in code |
/tests | Generate unit tests | /new | Scaffold new project |
/clear | New chat session | /help | Copilot quick reference |
/delegate | Send to coding agent | /search | Workspace search |
/init | Generate instructions | /compact | Compress context |
ms-vscode.vscode-speech/explain + #file β "Explain the auth flow in #file:auth.ts" (onboard to unfamiliar code)/fix + #problems β "Fix all errors in #problems" (resolve build failures in one prompt)// fetch user by email, Copilot generates the implementationit("should...") block and Tab through the restuserId β accountId β change one occurrence, NES finds and fixes the rest across files| Model | Rate |
|---|---|
| GPT-4.1 / GPT-4o / GPT-5 mini | 0Γ included |
| Raptor mini | 0Γ included |
| Grok Code Fast 1 | 0.25Γ |
| Claude Haiku 4.5 / Gemini 3 Flash | 0.33Γ |
| GPT-5.1-Codex-Mini / GPT-5.4 mini | 0.33Γ |
| Sonnet 4 / 4.5 / 4.6 | 1Γ |
| Gemini 2.5 Pro / 3 Pro / 3.1 Pro | 1Γ |
| GPT-5.1 / 5.2 / 5.4 + Codex variants | 1Γ |
| Claude Opus 4.5 / 4.6 | 3Γ |
| Opus 4.6 fast mode (preview) | 30Γ |
| Plan | Included |
|---|---|
| Free | 2K completions + 50 premium/mo |
| Pro / Student | Unlimited + premium allowance |
| Pro+ | Unlimited + higher premium |
| Business | Unlimited + org premium pool |
| Enterprise | Unlimited + enterprise premium |
/init β auto-generate for workspace/create-instruction β AI-assisted.instructions.md) that apply conditionally based on file glob patterns or semantic matching β e.g., Python rules only for *.py files.
---
name: 'Python Standards'
description: 'Python conventions'
applyTo: '**/*.py'
---
# Python coding standards
- Follow PEP 8 style guide
- Use type hints for all functions/instructions in chat to open Configure menu.
python.instructions.md with applyTo: '**/*.py' for PEP 8, type hints, docstringsreact-tests.instructions.md with applyTo: '**/*.test.tsx' for RTL best practices.prompt.md) you invoke as slash commands. Encode frequent tasks like scaffolding components or running reviews β type /prompt-name instead of re-writing the prompt..prompt.md files/prompt-name in chat.github/prompts/prompts/ folder---
description: 'Create React form'
agent: agent
tools: ['editFiles', 'search']
model: GPT-5.2
---
Generate a React form component
with validation for ${input:fields}${selection} for flexibility.
/create-api generates REST endpoint with controller, service, tests, and OpenAPI spec/review-pr checks for security, performance, and accessibility issues every time| Mode | Purpose |
|---|---|
| Ask | Read-only Q&A, no code changes |
| Edit | Direct code edits |
| Agent | Autonomous tool use + edits |
| Plan | Create plan before implementation |
---
description: 'Security reviewer'
tools: ['search', 'readFile']
model: Claude Sonnet 4.6
handoffs:
- label: Fix issues
agent: implementation
---
Review code for OWASP Top 10.../agents or /create-agent in chat to manage agents.
search, readFile), scans for OWASP Top 10, hands off to "fix" agent---
name: webapp-testing
description: 'Run and debug
web app integration tests'
---
# Testing Workflow
Use describe + it + AAA pattern
Use factory mocks for fixtures/skill-name in chat/create-skill β AI-generate a skill/deploy runs the full pipeline{
"servers": {
"github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp"
},
"playwright": {
"command": "npx",
"args": ["-y",
"@microsoft/mcp-server-playwright"]
}
}
}| Capability | Description |
|---|---|
| Tools | Execute operations (file, DB, API) |
| Resources | Read-only context (Add Context β MCP Resources) |
| Prompts | Templates via /server.prompt |
| MCP Apps | Interactive UI in chat |
| Sampling | Server-initiated model calls |
| Elicitation | Server asks user for input |
| Event | When |
|---|---|
SessionStart | First prompt of new session |
UserPromptSubmit | User submits a prompt |
PreToolUse | Before tool invocation |
PostToolUse | After tool completes |
PreCompact | Before context compaction |
SubagentStart/Stop | Subagent lifecycle |
Stop | Agent session ends |
{
"hooks": {
"PostToolUse": [{
"type": "command",
"command": "npx prettier --write \"$TOOL_INPUT_FILE_PATH\""
}]
}
}/hooks or /create-hook in chat to configure hooks.
prettier --write on every file the agent editsrm -rf and DROP TABLE with exit code 2/delegate in chat or @cli in terminal/delegate + link to GitHub issue β agent creates a branch, implements, and opens a PR| Command | Action |
|---|---|
/model | Switch AI model |
/compact | Compress conversation context |
/context | View token usage breakdown |
/usage | Session stats (premium reqs, duration, LOC) |
/agent | Select a custom agent |
/mcp | List MCP servers; /mcp add to add |
/resume | Resume a previous session |
/add-dir | Trust an additional directory |
/cwd / /cd | Change working directory |
/login | Authenticate with GitHub |
/feedback | Submit feedback, bugs, features |
/allow-all | Auto-approve all tools this session |
| Key / Syntax | Action |
|---|---|
| Shift+Tab | Toggle Ask / Plan mode |
| Ctrl+T | Show/hide model reasoning |
| Esc | Stop current operation |
@path/to/file | Include file as context |
!git status | Run shell command directly |
copilot -p "Run tests, fix failures, commit" --allow-all-tools in CI/CD/resume to pull a coding agent session from github.com into your terminalcopilot -p "Rename all .jpeg files to .jpg recursively" with --allow-tool='shell'.jsonc files via Chat: Configure Tool Sets#toolset-nametools: ['my-toolset']#edit, #search{
"reader": {
"tools": ["search/changes", "search/codebase",
"read/problems", "search/usages"],
"description": "Tools for reading context",
"icon": "book"
}
}search, readFile, grep into a #reader set for safe auditing#reader in prompt to enable all read tools at once.env, **/secrets/** from being sent to AI/delegate to coding agent for implementationinstructions/ for frontend (React) and backend (Python) with different applyTo globs.github/ folder to Git so all team members get the same Copilot behavior| Agent | Provider | Status |
|---|---|---|
| Claude | Anthropic | Preview |
| Codex | OpenAI | Preview |
| Copilot | GitHub | GA |
@AGENT_NAME in a comment| Tool | Action |
|---|---|
openBrowserPage | Open a URL in integrated browser |
navigatePage | Navigate to a different URL |
readPage | Read page content & structure |
screenshotPage | Take a screenshot for visual review |
clickElement | Click a page element |
hoverElement | Hover over an element |
dragElement | Drag and drop elements |
typeInPage | Type text into inputs |
handleDialog | Accept/dismiss browser dialogs |
runPlaywrightCode | Run custom Playwright automation |
workbench.browser.enableChatTools to truechat.checkpoints.enabledchat.checkpoints.showFileChangeschat.editRequests| Type | Runs | Best For |
|---|---|---|
| Local | VS Code (interactive) | Brainstorm, debug, browse |
| Copilot CLI | Background on machine | Well-defined tasks, POCs |
| Cloud | Remote infra | PRs, team collaboration |
| Third-party | Claude / Codex | Provider-specific models |
/delegate in CLI β sends to cloud agentchat.agentsControl.enabled// TODO: add input validation in code β right-click β assign to Copilot coding agent β agent creates a PRWrite a TypeScript function that validates
email addresses. Return true for valid,
false otherwise. Don't use regex.
Example: validateEmail("user@example.com")
β true
Example: validateEmail("invalid") β false#codebase#file, #folder, #symbol#fetch β pull info from web pages / docs| Mode | When to Use |
|---|---|
| Inline suggestions | In-flow coding, boilerplate |
| Ask | Questions, brainstorm, explore |
| Inline chat | Targeted in-place edits |
| Agent | Multi-file autonomous changes |
| Plan | Architecture, migration strategy |
| Smart actions | One-click commit msg, fix, rename |
| Action | Where |
|---|---|
| Generate Commit Message | Source Control panel |
| Rename Symbol | F2 on any symbol |
| Fix with Copilot | Lightbulb on errors/warnings |
| Fix Test Failure | Test Explorer failed tests |
| Generate Docs | Right-click β Generate Code |
| Semantic Search | Search view (meaning, not keywords) |
| Generate PR Summary | PR description field |
processData β Copilot suggests transformUserPayload based on function body semanticsChat: Manage Language Models command| What | Behavior |
|---|---|
| Prompts & suggestions | Not retained after response delivered |
| Training on your code | No (Business/Enterprise) |
| Telemetry opt-out | Individual users can opt out |
| Code snippets | Encrypted in transit & at rest |
| Policy | Controls |
|---|---|
| Features | Chat, completions, agents, MCP |
| Models | Enable/disable premium models |
| Coding agent | Enable cloud agent + 3rd-party |
| Editor preview | Opt in to preview features |
| Public code filter | Block public code matches |
| Content exclusion | Exclude files/repos from AI |
| Subagent | Purpose |
|---|---|
| Explore | Quick codebase analysis & Q&A |
| Task | Run tests/builds, return brief summaries |
| Code-review | Review changes, surface real issues |
| Shortcut | Action |
|---|---|
| ββI / Ctrl+Alt+I | Open Chat panel |
| βI / Ctrl+I | Inline chat |
| ββ§I | Toggle secondary sidebar |
| Tab | Accept suggestion |
| Esc | Dismiss suggestion |
| Alt+] / Alt+[ | Next / prev suggestion |
| Ctrl+β | Accept word by word |
| Command | Action |
|---|---|
/init | Generate workspace instructions |
/create-agent | AI-create a custom agent |
/create-skill | AI-create a skill |
/create-prompt | AI-create a prompt file |
/create-instruction | AI-create an instruction |
/create-hook | AI-create a hook config |
/hooks | Configure hooks menu |