Skip to content

GitHub Copilot: Advanced

Advanced

At this level Copilot stops being something you prompt line by line and starts doing multi-step work on its own. The skill shifts from writing prompts to setting up guardrails: a plan, the right tools, and a verification step you trust.

The single biggest quality lever is separating planning from coding. VS Code ships a built-in Plan agent: run /plan <task>, or press ⌃⌘I (Ctrl+Alt+I) and pick Plan from the agents dropdown. It researches your codebase, asks clarifying questions, and produces a plan with implementation and verification steps. Iterate on the plan before any code changes (it’s saved to /memories/session/plan.md), then hand it to agent mode to implement.

Agent mode runs a real loop: it builds a prompt, calls tools (edit files, run terminal commands), reads the output (compile errors, lint, test results, the Problems panel), and corrects itself, repeating until the task is done or it hits a limit. This is how AI coding tools work at full extension.

By default it pauses for approval before editing files or running terminal commands. Read what it proposes before approving.

Several models offer an extended 1M-token context window in VS Code and the CLI, useful for large tasks. They consume more credits, and the model roster shifts often, so check the live picker rather than assuming.

Model Context Protocol servers give Copilot new tools: a database, an issue tracker, your internal APIs.

  1. Create .vscode/mcp.json in your workspace, or open the user config via MCP: Open User Configuration.

  2. Add the server entry.

  3. Approve the trust prompt when Copilot picks it up.

Two file types turn one-off prompting into versioned assets your whole team shares through the repo.

Prompt files (default location .github/prompts) store reusable prompts you invoke as slash commands. A release-notes prompt at .github/prompts/release-notes.prompt.md:

.github/prompts/release-notes.prompt.md
---
description: "Draft release notes from the changes since the last tag"
agent: agent
tools: ['search/codebase']
---
Draft release notes for version ${input:version}.
Group entries under Added / Changed / Fixed.
Match the tone and format of CHANGELOG.md.
Flag anything that looks like a breaking change.

Type /release-notes in chat to run it; ${input:version} asks for the value. Anything you’d otherwise paste from a snippets file belongs here.

Agent files in .github/agents define custom agents: their own instructions, tool set, and model, selectable from the agents dropdown. Frontmatter takes name, description, tools, model, and handoffs; reference tools in the body as #tool:<name>. A read-only reviewer at .github/agents/reviewer.agent.md:

.github/agents/reviewer.agent.md
---
name: reviewer
description: "Reviews changes against project conventions without editing"
tools: ['search/codebase', 'search/usages']
handoffs:
- label: Fix the findings
agent: agent
prompt: Fix the issues raised in the review above.
---
You are a strict code reviewer. Never edit files.
Check every change against the conventions you find with #tool:search/codebase.
Report findings as a numbered list: severity, file, line, and why it matters.

The handoffs entry offers a one-click transition to the default agent to implement the fixes, so review and repair stay separate steps.

Get a review pass before a human looks.

  • In VS Code: the Copilot Code Review button next to CHANGES in Source Control reviews your uncommitted changes; results show inline and in the Problems tab.
  • On GitHub.com: add Copilot as a reviewer on a pull request.

Copilot also runs in the terminal as a scriptable agent. It ships with the GitHub MCP server preconfigured, reads your instruction files, and can branch, implement, and open a PR in one flow.

Slash commandWhat it does
/modelSwitch model
/mcpManage MCP servers
/skillsManage Agent Skills
/pluginManage plugins
/settingsOpen settings
/themeChange theme

For non-interactive runs you can enable auto-approval (/yolo or /autoApprove), with the same caution as in the IDE.

  • ✅ You’ve planned a task with /plan, then implemented it in agent mode, approving each step
  • ✅ You’ve added an MCP server via .vscode/mcp.json
  • ✅ Your repo has at least one .prompt.md or .agent.md file the team actually uses
  • ✅ You’ve run Copilot Code Review and know it can’t block a merge
  • ✅ You’ve tried a task from the Copilot CLI

Ready to hand work to the autonomous cloud agent, run sessions in parallel, and govern Copilot across an org?