Getting Started with GitHub Copilot: Autocomplete, Chat, and Agent in VS Code
- GitHub Copilot is an AI tool that, inside your editor, suggests code (inline suggestions), answers questions (Ask), makes plans (Plan), and edits files directly (Agent).
- This tutorial is based on VS Code and goes in this order: install → inline suggestions → chat → agent mode → custom instructions.
- Code completion (inline suggestions) doesn’t use credits and is unlimited on paid plans. Chat and agents use GitHub AI Credits (as of 2026-11-02).
- You review and accept the changes the agent makes. By default, commands also ask for approval before they run.
- Prices are in US dollars. We couldn’t confirm in official documentation whether it’s offered in Korea or what the KRW price is.
What you’ll be able to do after this tutorial
Section titled “What you’ll be able to do after this tutorial”- Connect Copilot to VS Code and log in.
- Accept or ignore the gray suggestions that appear as you type.
- Tell the Ask, Plan, and Agent chat modes apart and pick the right one for the situation.
- Hand a small app build to the agent and review the changes.
- Put a custom instructions file in your repository so Copilot follows your rules.
Concepts to know first
Section titled “Concepts to know first”| Term | Meaning |
|---|---|
| Inline suggestion | A suggestion for the next code that appears in gray text while you type. Accept it with Tab. |
| Copilot Chat | A chat window beside the editor. It answers based on the open file or the code you’ve selected. |
| Ask mode | A mode for code questions, concept explanations, and code suggestions. |
| Plan mode | A mode that creates an implementation plan before changing code. |
| Agent mode | You give a high-level task, and Copilot decides which files to edit, edits them, and runs commands if needed, iterating as it goes. |
| GitHub AI Credits | The unit of usage consumed by features that use AI models, like chat and agents. 1 credit is 0.01 US dollars. |
| Custom instructions | Instruction files you keep in your repository. They are automatically added to chat questions. |
In one line, the difference from Claude Code is that Copilot is a tool you use inside an editor (IDE), while Claude Code is an agent-style coding tool you use in the terminal, apps, and so on. We couldn’t find an official basis in this tutorial to compare the two on performance or price. Choose according to your purpose. For Claude Code, see C12 and Tutorial 6; for editor-style AI tools, see Tutorial 9, Cursor.
Plan summary (as of 2026-11-02, US dollars)
Section titled “Plan summary (as of 2026-11-02, US dollars)”| Plan | Price | Monthly credits | Notes |
|---|---|---|---|
| Copilot Free | Free | Has an allowance | Limited features, automatic model selection only, 2,000 code completions per month |
| Copilot Student | Free (verified students) | Has an allowance | Automatic model selection only, unlimited code completions |
| Copilot Pro | $10/month | 1,000 base + 500 variable | Some users are noted as possibly getting it free |
| Copilot Pro+ | $39/month | 3,900 base + 3,100 variable | Access to premium models |
| Copilot Max | $100/month | 10,000 base + 10,000 variable | Priority access |
| Business | $19/month per seat | 1,900 per user | For organizations |
| Enterprise | $39/month per seat | 3,900 per user | For GitHub Enterprise Cloud |
Step-by-step guide
Section titled “Step-by-step guide”-
Connect Copilot and log in
First you need a plan that lets you use Copilot (Free works too). According to the official docs, in VS Code the required extension is installed automatically the first time you set up. You don’t need to download it yourself. Log in to GitHub following the on-screen instructions. The step-by-step guide links to “Set up GitHub Copilot in Visual Studio Code” in the VS Code docs.
Screen guide: The screen for logging in to Copilot in VS CodeSee this screen in the official help ↗
If you use another editor: for JetBrains, install the GitHub Copilot plugin from the Marketplace in the Plugins settings, restart, then choose Login to GitHub under GitHub Copilot in the Tools menu. Instructions for Visual Studio, Eclipse, and Xcode are in the installation doc above. For login problems, see the Troubleshooting guidance in the official docs.
-
Try an inline suggestion
Create a new JavaScript file (
*.js) and type just the function header below. This is the example from the official quickstart.function calculateDaysBetweenDates(begin, end) {Copilot suggests the function body in gray text. If you like it, accept it with
Tab; if not, ignore it and keep typing. The suggestion may differ every time. If you’re not used to coding, ask what the accepted code does in the chat in the next step. -
Ask about code in Ask mode
With a code file open, open the chat window. In VS Code, press
Ctrl+Alt+I(Windows/Linux) orControl+Command+I(macOS), or click the chat icon in the title bar. If you don’t see the icon, right-click the title bar and turn on the Command Center. In the mode dropdown at the bottom of the chat window, choose Ask and ask your question.Copy and paste this promptwhat does this file do
We couldn’t confirm in official documentation whether you can ask in Korean or whether answers come back in Korean. The English example is the sentence from the quickstart.
You can also select a line of code and type
explain this line. Copilot answers based on the open file or selected code, so you don’t need to attach the explanation separately. If you openUsed n referencesabove the answer, you can see which files it referred to.There are also tools you can use.
/slash commands: run frequent tasks in short form. Type/and a list appears.#chat variables: add context such as a specific file.@participants and@github: call helpers for specific areas or GitHub-related features. If you include#web, you can use web search.- Inline chat, to ask right in the editor:
Ctrl+I(Command+Ion macOS)
-
Get a plan first in Plan mode
For big, vague tasks, it’s better to get a plan first. The official docs also advise creating an implementation plan first for big tasks. Select Plan in the mode dropdown and say what you want to do.
Copy and paste this promptCreate a task manager web app with the ability to add, delete, and mark tasks as completed. Plan which files you will create before changing anything.
Read the list and order of files to be created in the plan, and if you don’t like it, fix it with a follow-up message. According to the official Plan mode docs (checked 2026-11-02), Plan mode analyzes the codebase with read-only tools and creates a plan with a summary, a step-by-step plan, and open questions, and it doesn’t change code until you approve. If you like the plan, you can choose Start Implementation (switches to agent mode and implements) or Open in Editor (opens the plan as Markdown). Plan mode is available in VS Code, JetBrains, Xcode, and Eclipse, and not in Visual Studio. The Xcode and Eclipse docs mark it as a public preview.
-
Hand off a task in Agent mode
Choose Agent in the mode dropdown and describe the task. You can use the example from the quickstart above as is. Starting by opening an empty folder in VS Code makes the result easier to check.
Copy and paste this promptCreate a task manager web app with the ability to add, delete, and mark tasks as completed
You’ll see Copilot creating and editing files stream into the editor. If it needs to run a terminal command while working, by default it asks for approval before running. Read the command and allow or decline it. An administrator or your editor settings can also make some commands run automatically.
Handing off to the agent and receiving the result - Copilot Chat windowSelect Agent in the mode dropdown and enter the task→ Edits stream into the editor
- During the runRead proposed terminal commands and approve or decline them; adjust direction with follow-up prompts if needed→ It gets edited in the direction you want
- EditorReview the changes and undo any edits you don't want→ Only reviewed changes remain
- IDE controlsAccept the changes, save, and commit when satisfied→ Task complete
This is a simplified flow. See the official help page for the actual screens.
How to run the generated app depends on the result. If you get stuck, ask in chat, like “how do I run this app?”. You can pick up the feel of opening a web page file in a browser in Tutorial 27.
-
Create custom instructions for your repository
If you don’t want to repeat the same rules every time, create an instructions file. VS Code supports three kinds (per the official docs, enabled by default).
- Whole repository: Create
.github/copilot-instructions.mdin the repository root and write your rules in plain sentences (Markdown). If there’s no.githubfolder, create one. - By path: Create
name.instructions.mdinside.github/instructions/, and in the frontmatter at the top, write the file pattern to apply to withapplyTo. - For agents:
AGENTS.md. The file in the nearest folder takes priority. Support for files outside the repository root is off by default.
Copy and paste this promptCreate .github/copilot-instructions.md for this project. Rules: explain changes in simple English, keep everything in index.html, never add code that sends data to external servers, and ask me before deleting any file.
The instructions file is automatically added to chat questions. These rules are only “requests”, so you still need to check the agent’s results yourself.
- Whole repository: Create
-
Check your usage
Chat and agents use credits. According to the official docs, agent mode consumes credits per prompt, and because it calls the model multiple times in one task, it can use far more than a simple chat question. Your model choice matters too (switching to a less expensive model lets your allowance last longer). Credits reset at 00:00:00 UTC on the 1st of each month and don’t roll over. You’re told you can see usage on GitHub’s usage dashboard.
Quick reference
Section titled “Quick reference”Choosing a mode
Section titled “Choosing a mode”| What you want to do | Mode | Notes |
|---|---|---|
| Know what the code does | Ask | Answers based on the open file or selected code |
| Settle the order of a big task first | Plan | Makes a plan before changing code |
| Hand off work that edits multiple files | Agent | Commands run after approval by default |
| Keep writing quickly while typing code | Inline suggestions | Accept with Tab, uses no credits |
| Ask just one line right away | Inline chat | Ctrl+I / Command+I |
Frequently used shortcuts (VS Code, per the official docs)
Section titled “Frequently used shortcuts (VS Code, per the official docs)”| Action | Windows/Linux | macOS |
|---|---|---|
| Open chat | Ctrl+Alt+I |
Control+Command+I |
| Inline chat | Ctrl+I |
Command+I |
| Quick chat | Ctrl+Shift+Alt+L |
Shift+Option+Command+L |
| Accept inline suggestion | Tab |
Tab |
Custom instructions locations
Section titled “Custom instructions locations”| Type | Location |
|---|---|
| Whole repository | .github/copilot-instructions.md |
| By path | .github/instructions/name.instructions.md (applyTo required) |
| For agents | AGENTS.md (nearest file takes priority) |
Common sticking points
Section titled “Common sticking points”There’s no Agent in the mode selector
Section titled “There’s no Agent in the mode selector”- Cause: An organization or enterprise administrator may have turned off agent mode in your IDE.
- Fix: Contact your administrator. With a personal account, agent mode is included in all personal plans (limited on Free, as of 2026-11-02).
Chat doesn’t work because I’m on an organization account
Section titled “Chat doesn’t work because I’m on an organization account”- Cause: If an organization owner turns off Copilot Chat, people who use Copilot through the organization can’t use chat (per the official docs).
- Fix: Ask your organization administrator to check the policy.
I’m stuck at login or authentication
Section titled “I’m stuck at login or authentication”- Cause: There are several, such as account, network, or plan problems.
- Fix: See “Troubleshooting common issues with GitHub Copilot” in the official docs. We didn’t open that page to confirm it for this tutorial.
Suggestions are off-base or the code doesn’t work
Section titled “Suggestions are off-base or the code doesn’t work”- Cause: Suggestions can differ every time, and they can be wrong.
- Fix: Read before accepting, and run the changes the agent makes and check them yourself before saving or committing. The official quickstart also advises accepting changes after reviewing them.
Credits drop quickly
Section titled “Credits drop quickly”- Cause: Agent mode and long conversations consume a lot.
- Fix: Try using Ask or inline suggestions for small tasks, and switch to a lighter model. When credits run out, you choose between upgrading your plan, setting an extra usage budget, and waiting until next month (per the official docs, as of 2026-11-02).
Practical tips
Section titled “Practical tips”- Start by handing off small tasks. One feature at a time is easier to review than a whole app at once.
- Make requests specific. Include file names, constraints to follow, and an example of the result you want.
- Don’t commit without reviewing. Read the changes and run them yourself before saving or committing.
- Don’t put secrets in code files. If a file with passwords or API keys is in your working folder, it can be used as chat context. In the official plan table, file exclusion (content exclusion) isn’t included on personal plans (Free through Max) and is included on Business and Enterprise (as of 2026-11-02). We couldn’t confirm how to use it in this tutorial.
- Can I use Claude models? According to the model table on the official plans page (as of 2026-11-02), Pro includes the Claude Haiku and Sonnet families, and Pro+, Max, Business, and Enterprise include up through the Opus and Fable families (Free and Student get automatic model selection only). The model list changes often, so check the exact model names in the official table. Claude’s own plans are separate from this; see C2.
- A role-splitting idea: Use inline suggestions while typing code, Ask and Plan for explanations and plans, and Agent for multi-file work, and you can save credits too. For a feel for dividing roles among models, see C15.
Next tutorials
Section titled “Next tutorials”- 9. Understanding and fixing existing code with Cursor — comparing editor-style AI tools
- 27. Build your first web app with Claude Code, no coding needed — an introductory exercise for non-developers
- 10. Delegating recurring work to agents — delegating to agents
- Developer guide · Student guide — how to use it by role
Sources
Last verified: Nov 16, 2026
- Quickstart for using GitHub Copilot in your IDE docs.github.com
- Plans for GitHub Copilot docs.github.com
- Installing the GitHub Copilot extension in your environment docs.github.com
- Asking GitHub Copilot questions in your IDE docs.github.com
- Using agent mode in your IDE docs.github.com
- Usage-based billing for individuals docs.github.com
- Using plan mode in your IDE docs.github.com
- Adding repository custom instructions for GitHub Copilot in your IDE docs.github.com
Prices, limits, and menu names change often. Before making an important decision, check the official pages above for the latest details.
Finished this tutorial?
Progress is saved only in this browser and never sent anywhere.