Why most developers only use 10% of Copilot
GitHub Copilot started as inline code completion in 2021. By mid-2026, it has evolved into something radically different — an agent platform with autonomous multi-file editing, cloud-based PR generation, a terminal-native CLI, plugin marketplaces, and deep customization through markdown files. But the interface looks deceptively simple. A chat panel. Some ghost text. Tab to accept. Most developers never dig past that surface.
The hidden features fall into six layers that most tutorials skip entirely:
.github/copilot-instructions.md, path-specific instructions, and AGENTS.md — that teach Copilot your project’s rules permanently..prompt.md and .agent.md files that turn repetitive workflows into one-command actions./memory, /chronicle, /delegate, custom agents, and built-in MCP servers.This article covers all six layers with the exact prompts, configs, keyboard shortcuts, and GitHub repos you need. Bookmark it.
Keyboard shortcuts most developers never learn
The default behavior is Tab to accept the full suggestion and Esc to dismiss. But there are five other interactions most developers never discover.
Partial Accept — Word by Word
Instead of accepting the entire suggestion, press Ctrl+→ (Mac: ⌘+→) to accept one word at a time. This is transformative when Copilot gets the first half of a line right but drifts on the second half. You grab the good part, then type the rest yourself. On Visual Studio 2026, you can also press Ctrl+↓ to accept one line at a time from multi-line suggestions.
Cycle Through Alternatives
Copilot often generates multiple suggestions. Press Alt+] to see the next alternative and Alt+[ to go back. If none of the inline suggestions work, press Ctrl+Enter to open a new tab showing all alternative suggestions side by side — you can accept any one of them individually.
Next Edit Suggestions (NES)
This is the feature most developers do not even know exists. NES watches your editing pattern — say you are renaming a variable — and predicts where your next edit should be and what it should contain. A small arrow appears in the gutter. Press Tab to jump to the predicted location, then Tab again to accept the edit. It turns repetitive multi-location edits into a Tab-Tab-Tab flow.
github.copilot.nextEditSuggestions.enabled. In Visual Studio 2026, go to Tools → Options → GitHub → Copilot → Enable Next Edit Suggestions.
Inline Chat — The Secret Refactoring Weapon
Press Ctrl+I (Mac: ⌘+I) to open a chat prompt directly inside the editor at your cursor position. Describe a change — “make this function async,” “add error handling,” “convert to TypeScript” — and Copilot suggests edits in place. No context switching. No copy-pasting from the sidebar chat. This is the fastest way to do targeted refactors.
Full Keyboard Shortcut Reference
| Action | Windows / Linux | macOS |
|---|---|---|
| Accept full suggestion | Tab | Tab |
| Dismiss suggestion | Esc | Esc |
| Accept next word | Ctrl+→ | ⌘+→ |
| Next alternative | Alt+] | ⌥+] |
| Previous alternative | Alt+[ | ⌥+[ |
| Show all suggestions in tab | Ctrl+Enter | ⌃+Enter |
| Open inline chat | Ctrl+I | ⌘+I |
| Open Chat view | Ctrl+Alt+I | ⌃+⌘+I |
| Switch to Agent mode | Ctrl+Shift+I | ⇧+⌘+I |
| NES: jump to next edit | Tab (at gutter arrow) | Tab |
Custom instructions — teach Copilot your codebase permanently
This is the single most impactful customization you can make, and most teams never create one. Drop a file at .github/copilot-instructions.md in your repo root, and its contents are automatically included in every single Copilot chat interaction for anyone working in that workspace. No opt-in. No configuration. Just commit the file.
What to put in it — the five essential sections
This is a NestJS + Prisma API serving a React frontend. We use PostgreSQL on AWS RDS. All API routes are under /api/v2/.
# Coding Standards
– TypeScript strict mode. No `any` types.
– All database queries go through Prisma. Never write raw SQL.
– Use barrel exports (index.ts) for every module.
– Error handling uses our custom `AppError` class from `src/lib/errors.ts`.
# Testing
– Unit tests use Vitest. Integration tests use Supertest.
– Every new endpoint needs at least one happy-path and one error-case test.
# Git Conventions
– Conventional Commits: feat:, fix:, chore:, docs:
– Branch naming: feature/TICKET-123-description
# Build & Run
– `npm run dev` starts the dev server
– `npm run test` runs the full test suite
– `npm run db:migrate` applies Prisma migrations
What this produces: Every time anyone on your team asks Copilot to write code, generate tests, or create a PR description, it already knows your stack, your conventions, your error patterns, and your build commands. No more “actually, we use Vitest not Jest” corrections.
Auto-generate it with one click
In VS Code, click the Configure Chat gear icon in the Chat view and select “Generate Chat Instructions.” Copilot will analyze your repository and draft a custom instructions file tailored to your project. Or, even better — use the cloud agent:
Path-specific instructions
Need different rules for your frontend vs. backend? Create files in .github/instructions/ with a .instructions.md extension. Each file has YAML frontmatter specifying which file paths it applies to:
AGENTS.md — the cross-agent instruction file
If your team uses multiple AI agents (Copilot, Claude Code, Gemini), you can create an AGENTS.md file at the repo root. Copilot treats it as primary instructions alongside copilot-instructions.md. You can also use CLAUDE.md and GEMINI.md for agent-specific instructions.
Personal instructions that follow you everywhere
Create a file at $HOME/.copilot/copilot-instructions.md with your personal preferences — indentation style, preferred libraries, response format. These apply across all projects without polluting any repo.
Prompt files — reusable recipes your whole team shares
While instructions set the background context for every interaction, prompt files are specific workflows you trigger on demand by typing /prompt-name in the chat input. They are the recipes in your team’s cookbook — checked into source control and shared with everyone.
File structure
Prompt: Code Review Workflow
description: “Comprehensive code review with actionable feedback”
model: claude-sonnet-4-6
—
Review the selected code for:
1. **Bugs and edge cases** — null checks, off-by-one errors, race conditions
2. **Security** — injection risks, auth bypass, exposed secrets
3. **Performance** — unnecessary loops, missing indexes, N+1 queries
4. **Readability** — naming, function length, comments that explain “why” not “what”
For each finding, provide: the exact line, the issue, and a concrete fix.
End with a summary: “Ship it ✅” or “Needs changes 🔄” with a one-line reason.
Prompt: Generate REST Endpoint
description: “Scaffold a full REST endpoint with tests”
model: gpt-5.3-codex
agent: code
tools: [“terminal”, “editFiles”, “codeSearch”]
—
Generate a complete REST endpoint following the patterns in this repo:
1. Look at existing endpoints in src/api/ for conventions
2. Create the route handler, service, and Prisma query
3. Add input validation using our existing Zod schemas
4. Write Vitest unit tests (happy path + error cases)
5. Update the barrel export in the module’s index.ts
Reference: [coding standards](../../copilot-instructions.md)
Notice the last line — prompt files can reference other markdown files via links, pulling in your coding standards without duplication.
agent: field in the frontmatter tells the prompt to run inside a specific custom agent, inheriting its tool set. The tools: field restricts which tools are available. This means you can create a “review-only” prompt that cannot modify files — only read and comment.
Custom agents — specialist personas for your team
Custom agents (formerly called “custom chat modes”) are the most powerful customization layer. While instructions are rules and prompts are recipes, agents are entire personas — they define how Copilot thinks, which tools it can use, and even which other agents it can hand off to.
File structure
Example: Security Auditor Agent
description: “Security-focused code auditor”
model: claude-sonnet-4-6
tools: [“codeSearch”, “readFile”, “listFiles”]
—
You are a senior application security engineer. Your job is to find vulnerabilities, not to write code.
When reviewing code:
– Check for OWASP Top 10 vulnerabilities
– Look for hardcoded secrets, API keys, and credentials
– Identify SQL injection, XSS, CSRF, and SSRF vectors
– Check authentication and authorization patterns
– Review dependency versions for known CVEs
NEVER suggest “it looks fine.” Always find at least one area for improvement.
Rate severity as CRITICAL / HIGH / MEDIUM / LOW for each finding.
Agent handoffs — chaining workflows
Agents can be chained into guided workflows. After one agent finishes, a handoff button appears in the chat to transition to the next agent with pre-filled context. For example: Plan → Implement → Review. This turns a complex multi-step workflow into a guided sequence.
Personal agents that follow you
Since April 2026, you can store agents at %USERPROFILE%/.github/agents/ (Windows) or ~/.github/agents/ (Mac/Linux). These personal agents travel with you across every project — perfect for your own debugging agent or writing-style agent.
MCP servers — connect Copilot to everything
MCP is the open protocol that lets Copilot talk to external tools, data sources, and services. Think of it as USB-C for AI — a universal connector. The GitHub MCP server is built-in and provides access to issues, PRs, repos, and Actions. But you can add any MCP server for databases, cloud providers, monitoring tools, and more.
The GitHub MCP Server — already there, already powerful
The GitHub MCP server gives Copilot read/write access to your GitHub data. It is built into Copilot CLI and available without additional configuration. In VS Code, it connects automatically via OAuth. This means you can say things like:
Adding custom MCP servers
In VS Code, add MCP servers to your workspace .vscode/settings.json or user settings:
{
"mcp": {
"servers": {
"playwright": {
"type": "local",
"command": "npx",
"args": ["@playwright/mcp@latest"]
},
"postgres": {
"type": "local",
"command": "npx",
"args": ["@modelcontextprotocol/server-postgres",
"postgresql://user:pass@localhost/mydb"]
},
"context7": {
"type": "http",
"url": "https://mcp.context7.com/mcp"
}
}
}
}
In Copilot CLI — even easier
# Interactive add
$ copilot
> /mcp add
# Or edit ~/.config/github-copilot/mcp.json directly
{
"mcpServers": {
"playwright": {
"type": "local",
"command": "npx",
"args": ["@playwright/mcp@latest"],
"tools": ["*"]
}
}
}
Best MCP servers to add in 2026
| MCP Server | What It Does | Use Case |
|---|---|---|
| GitHub (built-in) | Issues, PRs, repos, Actions, Copilot Spaces | Project management from chat |
| Playwright | Read, interact with, and screenshot web pages | UI testing, visual regression |
| Context7 | Up-to-date library documentation | Always-current API references |
| PostgreSQL | Query and inspect database schemas | Write queries with real schema context |
| Azure | Azure resource management | Cloud infrastructure from terminal |
| Filesystem | Read/write access to local files | Broader file context for agents |
| Knowledge Graph Memory | Persistent local knowledge graph | Long-term context across sessions |
Copilot CLI — your terminal becomes an AI agent
Copilot CLI is not just “Copilot in a terminal.” It is a full agent runtime with its own ecosystem of commands, built-in specialist agents, persistent memory, session history search, cloud delegation, and a plugin marketplace. If you have not tried it, you are missing the most powerful Copilot surface.
Installation
# macOS (Homebrew)
brew install gh
gh extension install github/gh-copilot
# Windows (WinGet)
winget install GitHub.GitHubCLI
gh extension install github/gh-copilot
# npm (cross-platform)
npm install -g @githubnext/github-copilot-cli
# Start it
$ copilot
# Authenticate
> # Follow browser OAuth flow — one-time setup
/chronicle — search your AI history
This experimental feature lets you query your own chat history across all sessions. Trying to remember which file you refactored last Tuesday? What command fixed that build error? Which PR you referenced?
> /chronicle show me the Prisma query I wrote for the user dashboard
> /chronicle which PR did I reference when fixing the payment bug?
/memory — persistent context
The /memory command gives the CLI persistent context that survives across sessions. Set project-specific facts once, and they stay active:
> /memory set "This project uses pnpm, not npm. Always use pnpm commands."
> /memory set "The staging server is at staging.myapp.com"
> /memory set "Database migrations require running: pnpm prisma migrate dev"
> /memory list
> /memory clear
/delegate — hand off to cloud agent
For well-defined tasks, you can delegate directly from the CLI to the cloud agent. Copilot preserves your current session context, creates a new branch, opens a draft PR, and makes the changes on GitHub Actions infrastructure — while you keep working locally.
> /delegate Add comprehensive error handling to the payment
processing module. Follow the patterns in src/lib/errors.ts.
Include retry logic for network failures.
# Copilot creates a GitHub issue, starts a cloud agent session,
# and you get a PR notification when it's done.
Built-in specialist agents
| Agent | Command | What It Does |
|---|---|---|
| Explore | /agent explore | Fast codebase analysis. Ask questions about your code without cluttering main context. |
| Task | /agent task | Runs commands like tests and builds. Focused execution. |
| Custom | /agent my-agent | Any .agent.md file from .github/agents/ or ~/.github/agents/ |
Plugins — install community extensions
# Install a plugin from the Awesome Copilot marketplace
copilot plugin install security-auditor@awesome-copilot
copilot plugin install test-generator@awesome-copilot
# List installed plugins
copilot plugin list
# If marketplace isn't registered (older CLI versions)
copilot plugin marketplace add github/awesome-copilot
copilot plugin install <plugin-name>@awesome-copilot
Real CLI workflow — review and fix
[Copilot reads the file, analyzes it, provides specific feedback]
> Fix the issues you found. Write the corrected code.
[Copilot edits the file in place]
> Now write tests for the changes you made.
[Copilot creates test file, runs them]
> /delegate Create a PR with these changes titled “fix: improve payment error handling”
Agent mode & Autopilot — autonomous coding in VS Code
Agent mode is when Copilot stops being an autocomplete and becomes an autonomous coding agent. It takes a goal, breaks it into steps, edits multiple files, runs terminal commands, checks results, and iterates until the task is done. Activate it with Ctrl+Shift+I or by selecting “Agent” from the chat mode picker.
Three permission levels
| Level | What Happens | When to Use |
|---|---|---|
| Default | Copilot asks for approval before running terminal commands or editing files | Unfamiliar codebases, sensitive code |
| Bypass Approvals | Copilot runs commands and edits files without asking — but you can intervene | Trusted projects, known patterns |
| Autopilot ⚠ | Copilot approves its own actions, auto-retries on errors, and works autonomously until complete | Well-defined tasks on non-critical branches |
Agent mode prompts that actually work
New in April 2026: Inline diffs, browser tab sharing, terminal read/write
Agents now show inline diffs directly in the chat — so you can review multi-file changes without switching tabs. They can share your browser tabs (for debugging web apps) and have read/write access to any open terminal. Combined with configurable thinking effort (control how deeply reasoning models think before responding), agent mode feels genuinely collaborative.
Cloud agent — close the IDE, get a PR
The cloud agent (formerly “coding agent”) runs on GitHub Actions infrastructure, not your local machine. You assign it a task — from VS Code, the CLI, GitHub.com, Slack, Teams, Jira, or Linear — and it creates a GitHub issue, clones your repo, does the work asynchronously, and opens a pull request when done. You can close your laptop. The work continues without you.
Three ways to trigger cloud agent
copilot user to any GitHub issue. The cloud agent picks it up and works on it./delegate with context from your current session preserved.New: Branch-only mode & plan-first mode
Since April 2026, the cloud agent no longer requires creating a PR. It can work on a branch without opening a PR — review the full diff, iterate with Copilot, and only create a PR when you are ready. You can also ask for a plan first and review the approach before any code is written.
Best use cases (and where it struggles)
| Great For | Not Great For |
|---|---|
| Well-defined bugs with clear reproduction steps | Ambiguous tickets that need product judgment |
| Dependency bumps and version upgrades | Cross-cutting architectural changes |
| Adding tests to existing code | Exploratory back-and-forth design |
| Documentation updates | UI/UX work requiring visual review |
| Conventional refactors (rename, extract, move) | Security-critical code changes |
Copilot Spaces — curated knowledge bundles
Copilot Spaces are curated collections of repos, docs, and transcripts that you bundle together so Copilot grounds its answers in your specific context. Think of it as a custom knowledge base — pick a set of repositories, internal documentation, and meeting transcripts, and Copilot references them when answering questions.
Create a Space from GitHub.com, add your repos and docs, and every Copilot interaction within that Space is grounded in your team’s actual context — not generic training data. The GitHub MCP server includes Copilot Spaces tools, so they are accessible from both VS Code and the CLI.
Smart Actions — right-click AI powers
VS Code includes predefined AI-powered actions that most developers never find because they are buried in context menus. Right-click on code or use the Command Palette:
| Smart Action | What It Does | Where to Find It |
|---|---|---|
| Generate Commit Message | AI-writes your commit message from staged changes | Source Control panel — sparkle icon ✨ |
| Generate PR Description | Summarizes all changes into a structured PR description | GitHub PR creation |
| Rename Symbol | AI-suggested rename that considers usage context | Right-click → Rename Symbol |
| Fix Error | Reads the error, suggests a fix | Hover over red squiggly → Quick Fix |
| Explain This | Explains selected code in plain English | Right-click → Copilot → Explain This |
| Generate Tests | Writes tests for selected code | Right-click → Copilot → Generate Tests |
| Generate Docs | Writes JSDoc/docstring comments | Right-click → Copilot → Generate Docs |
| Semantic Search | Search by meaning, not just text match | Command Palette → “Copilot: Semantic Search” |
#-mentions — the context trick that changes everything
When chatting with Copilot, you can use #-mentions to explicitly include files, symbols, or entire workspaces as context. This is the difference between Copilot guessing what you mean and Copilot knowing what you mean.
| Mention | What It Adds | Example |
|---|---|---|
#file | A specific file’s content | #file:src/auth.ts explain this |
#selection | Currently selected code | Refactor #selection to use async/await |
#codebase | Your entire workspace (indexed) | #codebase where is the user model defined? |
#terminalLastCommand | Last terminal command output | #terminalLastCommand why did this fail? |
#terminalSelection | Selected terminal text | #terminalSelection explain this error |
#problems | Current VS Code problems panel | #problems fix all TypeScript errors |
#changes | Git uncommitted changes | #changes summarize what I've done today |
@workspace | Full workspace context | @workspace how is authentication handled? |
In Copilot CLI, use @ to reference files: @src/api/payments.ts reads the file into context.
Agent skills — reusable scripts agents can call
Skills are bundled scripts and instructions that agents or prompt files can invoke. They live in .github/skills/ (also discovered from .claude/skills/ and .agents/skills/). A skill might contain a SKILL.md with instructions and a set of scripts — an agent reads the instructions and runs the scripts as needed.
name: performance-audit
description: “Run Lighthouse audit and report results”
—
Use this skill when asked to audit performance. Steps:
1. Run `npx lighthouse http://localhost:3000 –output json –output-path ./lighthouse.json`
2. Parse the JSON for scores: Performance, Accessibility, Best Practices, SEO
3. Identify any metric below 90 and suggest specific fixes
4. Output a summary table with scores and recommendations
Hooks — event-triggered automations
Hooks let you set up event-triggered automations during Copilot coding agent sessions — useful for session logging, governance auditing, and custom post-processing. When an agent starts a session, commits code, or opens a PR, your hook scripts run automatically. These are defined in your repo configuration and are particularly useful for enterprise teams that need audit trails for AI-generated code.
Model selection — pick the right brain for the task
Most developers never change the default model. But Copilot now supports multiple AI models that you can switch between from the model picker in VS Code or the /model command in the CLI. Different models excel at different tasks:
| Model | Best For | Premium Requests |
|---|---|---|
| GPT-5.3-Codex (default) | General coding, completions, chat | 1x (LTS until Feb 2027) |
| Claude Sonnet 4.6 | Complex reasoning, architecture, debugging | Premium |
| GPT-5 mini | Fast responses, simple tasks | 0x (included free) |
| GPT-4.1 | Legacy compatibility | 0x (deprecated June 2026) |
In prompt files and agent files, specify the model in the YAML frontmatter: model: claude-sonnet-4-6. For complex code reviews or architectural decisions, switching to Claude Sonnet 4.6 often produces significantly better results.
GitHub repos — everything you need, bookmarked
The complete Copilot customization file tree
When to use which Copilot surface
| Scenario | Inline Suggestions | Chat | Agent Mode | CLI | Cloud Agent |
|---|---|---|---|---|---|
| Quick code completion | Best ✓ | — | — | — | — |
| Explain unfamiliar code | — | Best ✓ | — | Good | — |
| Multi-file feature | — | — | Best ✓ | Good | Good |
| Fix a well-defined bug | — | — | Good | Good | Best ✓ |
| Code review | — | Good | — | Best ✓ | — |
| Large refactor | — | — | Best ✓ | — | Good |
| CI/CD debugging | — | — | — | Best ✓ | — |
| Backlog triage | — | — | — | — | Best ✓ |
| Learning a codebase | — | Good | — | Best ✓ | — |
Cheat sheet — tricks and prompts at a glance
.github/copilot-instructions.md — one file, auto-included in every chat for every team member. Include: project overview, coding standards, testing conventions, git workflow, and build commands. The highest-ROI Copilot customization you can make..prompt.md files in .github/prompts/ — type /review or /generate-api and get consistent, team-standard workflows. Custom .agent.md files in .github/agents/ — specialist personas like security auditor, planner, implementer with handoff chains./chronicle. Set persistent context with /memory. Hand off tasks to cloud agent with /delegate. Install community plugins with copilot plugin install. The CLI’s biggest feature drop shipped May 2026.#file:, #codebase, #terminalLastCommand, #problems, #changes to give Copilot precise context. Add MCP servers for GitHub, Playwright, PostgreSQL, and more — so Copilot can interact with external tools and data sources directly.Key takeaways
Start with copilot-instructions.md — today
If you take one thing from this article, create a .github/copilot-instructions.md file in your main repo. Five minutes of work, permanent improvement in every Copilot interaction for your entire team. Use the auto-generate feature if you do not know where to start.
Learn the three keyboard shortcuts that matter
Partial accept (Ctrl+→), cycle alternatives (Alt+]), and inline chat (Ctrl+I). Master these before exploring anything else. They change the daily feel of working with Copilot more than any agent feature.
Try the CLI — it is not what you expect
Copilot CLI is not “Copilot in a terminal.” It is a full agent runtime with persistent memory, session history search, cloud delegation, and a plugin marketplace. The /chronicle command alone — searching your own AI history — is worth the install.
Use agent mode for multi-file work, cloud agent for async tasks
Agent mode shines for interactive, multi-file features where you want to stay in the loop. Cloud agent shines for well-defined tasks you can fire and forget — bug fixes, test additions, dependency bumps. Use both. They complement, not compete.
Customize in layers: instructions → prompts → agents → MCP
Start with global instructions. Add prompt files for workflows you repeat. Create agents for specialist roles. Connect MCP servers for external tools. Each layer multiplies the effectiveness of the ones below it. Do not try to set up everything at once — add layers as the value of the previous one becomes clear.