GitHub Copilot — Quick reference
AI pair programmer built into your editor — turns a plain-English comment into working code as you type. Runs in VS Code, JetBrains, Visual Studio & Xcode. Free tier, no credit card.
At a glance
Free $0/mo 2,000 code completions + limited chat & agent usage per month, no credit card · Pro $10/mo unlimited completions + $15/mo AI Credits · Students verified .edu account → unlimited completions free via the GitHub Student Developer Pack.
Lives inside an IDE — install the editor + extension first. Best for writing code, automating, data work in Python/R.
Setup & first edit
Install
Install VS Code → add the GitHub Copilot extension from the Extensions panel → sign in with a GitHub account. Free plan needs no credit card.
First suggestion
Open a .py file and type a comment describing what you want. Copilot proposes the next lines as faint ghost text — press Tab to accept, or keep typing to ignore.
# Load gene_counts.csv, normalize by library size, and plot a
# heatmap of the top 50 most variable genes with seaborn
Type the comment above, then press Tab through each suggestion — Copilot writes ~15 lines of pandas + seaborn. Edit the filename to match a real CSV before running.
Key commands & shortcuts
| Action | What it does |
Tab | Accept the greyed-out ghost-text suggestion. Keep typing to reject and re-suggest. |
Type a # comment | Comment-driven code: name the input, operation & output shape — Copilot fills the next line, function, or block. |
| Open Chat panel | From the Copilot icon. Select code first for context, then ask in plain language: explain / fix / refactor. |
| Mode dropdown → Agent | In the Chat panel, switch to Agent so Copilot can plan, write, run & iterate across multiple files. |
| Model picker | In the Chat panel, choose which model answers — even Free gives access to multiple models incl. Claude & GPT. |
| Keep / Undo | After an Agent run, review the "files changed" list — Keep to accept or Undo to discard each edit. |
Copilot CLI: ? | In the terminal CLI, type ? for help. Use @ to mention files and / to run commands. |
| Assign Copilot to an issue | On a GitHub issue, open Select assignees and pick Copilot like a teammate — it works the issue and proposes a PR. |
Prompting patterns
Comment-driven
Be specific, then sign the function
# Read a FASTA file of protein sequences, count amino-acid frequencies, and return a pandas DataFrame sorted by frequency — then start def count_amino_acids(path): and let Copilot complete the body.
Chat: explain & fix
Debug in plain language
"Why does this code throw a KeyError, and how do I fix it? Then refactor this loop into a single pandas operation." Select the code first so chat has context.
Agent: multi-file
Hand off a longer task
"Split my analysis script into a data-loading module and a plotting module, add type hints throughout, and write a quick test for the loader."
Model + verify
Make it justify itself
"Use a stronger model to refactor this function, then explain each change so I can confirm it's correct." Then run and sanity-check the result.
CLI
Glue work in the terminal
"Write a shell command that finds every .fasta file under this folder and counts the sequences in each." Read the command before running it.
Coding agent
Delegate a whole issue
"Allow users to pin side panels — add the setting, persist it, and update the layout." Assign it on the GitHub issue and review the PR.
Context & modes
Add context
In Chat, select a block of code before asking so the answer is scoped to it. In the CLI, mention files with @ and run actions with /.
Pick a mode
Inline = autocomplete as you type · Chat = explain/fix/refactor one block · Agent = plan & edit across many files · CLI = write/test/debug in the terminal · Coding agent = assigned to a GitHub issue.
GitHub also lists third-party agents in the issue assignee menu — Claude (Anthropic) and Codex (OpenAI) — so you choose which agent takes the task.
Pricing & limits
| Plan | Price | What you get |
| Free | $0/mo | 2,000 code completions + limited chat & agent usage per month, multiple models, no credit card. |
| Pro | $10/mo | Unlimited completions + $15/mo in GitHub AI Credits. |
| Pro+ | $39/mo | Premium models + $70/mo in AI Credits. |
| Max | $100/mo | $200/mo in Credits, priority access to new models. |
| Business | $19/seat/mo | Org plan, per seat. |
| Enterprise | $39/seat/mo | Org plan, per seat. |
| Students | Free | Verified .edu → unlimited completions via the GitHub Student Developer Pack. |
Credits: code completions never spend AI Credits. Chat, agents, code review & CLI features DO consume AI Credits — a deep multi-file Agent run costs more than a single chat. Premium models draw on your Credit allowance.
Gotchas & tips
• Always run & verify. Copilot can produce plausible-but-wrong API calls or reference libraries that don't exist — treat every suggestion as a draft, not a fact.
• Agent Mode can over-reach. Read each changed file and use Keep / Undo before you accept — you stay the reviewer.
• Weaker on architecture & domain logic. Multi-file architectural changes and your specific biology-domain rules need extra guidance and sanity-checks against a known result.
• Editor-only setup barrier. No browser or standalone UI — install VS Code (or JetBrains / Visual Studio / Xcode) and the extension first.