GitHub Copilot has over 20 million users. It is the most widely adopted AI coding tool in the world. But most developers use it as a fancy autocomplete — they type code, Copilot suggests the next few lines, and they press Tab.
That is maybe 30% of what Copilot can do. This article covers the rest: Agent Mode, the coding agent that turns issues into PRs, the CLI tool, and the features that make Copilot uniquely powerful for teams.
For the comparison with Claude Code and Cursor, see Cursor vs Claude Code vs Copilot.
Note: Copilot features evolve rapidly. Some features mentioned here may be in preview or GA depending on when you read this. Check GitHub’s Copilot documentation for the latest status.
Autocomplete: The Foundation
Let us start with what most people know — and show how to get more from it.
Copilot autocomplete is context-aware. It does not just look at the current line. It reads your open files, your imports, your comments, and your function signatures. The more context you give, the better the suggestions.
Writing Comments That Guide Copilot
Copilot reads your comments and uses them to generate code. Detailed comments produce better suggestions.
Vague comment — mediocre suggestion:
# process data
def process(data):
# Copilot suggests generic processing logic
Detailed comment — excellent suggestion:
# Parse CSV data, validate each row has 5 columns,
# convert the date column (index 2) to ISO format,
# and return only rows where the amount (index 4) > 100
def process_csv_data(raw_csv_data):
# Copilot generates exactly what you described
The comment acts like a mini-prompt. Be specific about inputs, outputs, and edge cases.
Function Signatures That Work
Copilot generates better code when your function signature is descriptive:
// Less helpful
function handle(data: any): any
// Much better — Copilot knows exactly what to generate
function calculateShippingCost(
weight: number,
distance: number,
expedited: boolean
): { cost: number; estimatedDays: number }
Type annotations, descriptive parameter names, and clear return types give Copilot the context it needs to generate correct implementations.
The “Example” Pattern
One of the most powerful autocomplete patterns: write one example, and Copilot generates the rest.
COUNTRY_CODES = {
"United States": "US",
"United Kingdom": "GB",
# After typing two examples, Copilot suggests the rest:
"Germany": "DE",
"France": "FR",
"Japan": "JP",
# ... continues for dozens of countries
}
This works for mappings, test cases, enum values, and any repetitive pattern. Write 2-3 examples, and Copilot fills in the rest.
Copilot Chat: Conversations About Code
Copilot Chat is available in VS Code, JetBrains, and the CLI. It lets you have conversations about your code.
In VS Code
Open Copilot Chat from the sidebar. You can ask about code, generate new code, fix bugs, and explain logic.
Useful patterns:
Explain code:
/explain What does this regex do?
Fix a bug:
/fix The function returns undefined when the input array is empty
Generate tests:
/tests Generate unit tests for the selected function
The slash commands (/explain, /fix, /tests) give Copilot a clear task to focus on.
Inline Chat
Press Ctrl+I (Cmd+I on Mac) in VS Code to open inline chat. This is similar to Cursor’s Cmd+K — you type a prompt and Copilot edits the code in place.
Add input validation for email format and password length
Copilot modifies the selected code directly. You see the diff and accept or reject.
Copilot Edits: Multi-File Changes
Copilot Edits lets Copilot make changes across multiple files — similar to Cursor Composer.
Open the Edits panel in VS Code. Add files to the working set (the files Copilot can read and modify). Then describe your change:
Add form validation to the signup page. Validate email format,
password strength (min 8 chars, uppercase, lowercase, number),
and matching password confirmation. Show inline error messages.
Copilot generates changes across the form component, validation utility, and styles. You review each file’s changes and accept or reject.
Tip: Add only the relevant files to the working set. Adding your entire project slows down Copilot and can reduce quality. Be selective — include the files Copilot needs to read and the files it should change.
Agent Mode: Autonomous Coding
Agent Mode is Copilot’s most powerful feature. When enabled, Copilot can:
- Read your project files
- Make changes across multiple files
- Run terminal commands (build, test, lint)
- Iterate on errors automatically
- Install dependencies
How to use it:
In VS Code, switch to Agent Mode in the Copilot Chat panel. Then describe your task:
Add a caching layer to the API. Use Redis for caching GET
endpoints. Add cache invalidation when data is updated via
POST/PUT/DELETE. Set TTL to 5 minutes for list endpoints
and 1 hour for single-item endpoints.
Agent Mode reads your codebase, plans the changes, creates files, modifies existing files, and runs your tests. If tests fail, it reads the error and tries to fix it.
When Agent Mode works well:
- Building new features with clear requirements
- Fixing bugs with clear error messages
- Adding standard patterns (auth, caching, logging, testing)
- Refactoring code to follow a new pattern
When Agent Mode struggles:
- Very large codebases where it cannot read all relevant files
- Tasks requiring deep architectural understanding
- Novel problems without existing patterns
Agent Mode is improving rapidly. Each update makes it more capable.
Copilot Coding Agent: Issue to PR
This is different from Agent Mode. The Copilot coding agent runs in the cloud and can autonomously work on GitHub issues.
How it works:
- You assign a GitHub issue to Copilot (or use the
@copilotmention). - Copilot creates a branch, reads the codebase, and writes code.
- It opens a pull request with the changes.
- You review and merge — just like reviewing a human’s PR.
Example: You create an issue:
Title: Add rate limiting to the API
Description:
- Add rate limiting middleware to all API endpoints
- Use a sliding window algorithm
- Limit to 100 requests per minute per IP
- Return 429 status with retry-after header when exceeded
- Add tests for the rate limiting logic
Assign it to Copilot. Within minutes, you get a PR with the implementation, tests, and a description of what was changed.
What makes this special: It works asynchronously. You do not need to have your editor open. You create the issue, assign it, and come back later to review the PR. This is great for:
- Bug fixes that are well-described in the issue
- Feature requests with clear requirements
- Routine maintenance tasks
- Issues from your backlog that never get prioritized
Limitations: The coding agent works best for medium-complexity tasks. Very simple tasks (one-line fixes) are faster to do yourself. Very complex tasks (large features, architecture changes) need human guidance.
gh copilot: The CLI Tool
If you prefer the terminal, Copilot has a CLI tool built into the GitHub CLI.
Installation:
gh extension install github/gh-copilot
Usage:
Ask Copilot to explain a command:
gh copilot explain "find . -name '*.log' -mtime +7 -delete"
Output:
This command finds all files with the .log extension that were
last modified more than 7 days ago and deletes them.
Ask Copilot to suggest a command:
gh copilot suggest "find all Python files larger than 1MB"
Output:
find . -name "*.py" -size +1M
This is useful for developers who work in the terminal but cannot remember complex command syntax. It is not a full coding agent like Claude Code — it helps with individual commands.
Copilot in JetBrains
Copilot works in all JetBrains IDEs: IntelliJ IDEA, Android Studio, PyCharm, WebStorm, and more.
What works well:
- Autocomplete — same quality as VS Code
- Chat panel — conversations about code
- Inline suggestions — Tab to accept
What is different from VS Code:
- Agent Mode features may lag behind VS Code
- Copilot Edits (multi-file) may not be available yet in all JetBrains IDEs
- Some keyboard shortcuts differ
For Android Studio users: Copilot is one of the best AI tools for Kotlin and Compose development. It understands Compose patterns, ViewModel structures, and Android-specific APIs well.
Setup tip: In JetBrains settings, go to Copilot settings and enable “suggestions for all languages.” By default, it may only suggest for some file types.
copilot-instructions.md: Teaching Copilot About Your Project
Just like CLAUDE.md for Claude Code and .cursorrules for Cursor, Copilot has its own context file: .github/copilot-instructions.md.
This file lives in your repository and tells Copilot about your project’s coding standards, architecture, and preferences.
Example:
# Copilot Instructions
## Project
This is a Spring Boot 3 application with Kotlin, using
coroutines for async operations.
## Coding Standards
- Use Kotlin coroutines (suspend functions), not callbacks
- Use Result type for error handling, not exceptions
- All database operations go through the repository layer
- DTOs for API input/output, domain models for business logic
- Follow MVVM pattern for Android modules
## Testing
- Use JUnit 5 with MockK for mocking
- Every public function needs a test
- Use testcontainers for integration tests
## Naming
- Repositories: UserRepository, NoteRepository
- Services: UserService, NoteService
- DTOs: CreateUserRequest, UserResponse
When Copilot reads this file, it follows your project’s conventions instead of guessing.
Cross-tool compatibility: If your team uses multiple AI tools, you can maintain parallel context files:
.github/copilot-instructions.mdfor CopilotCLAUDE.mdfor Claude Code.cursorrulesfor Cursor
The content is similar. Some teams keep one source of truth and copy it to all three locations. Read more about this in Context Engineering.
Free vs Pro vs Pro+
Copilot offers multiple tiers. Here is what you get at each level:
Free tier:
- Limited completions per month
- Limited chat messages
- Access to Copilot in VS Code and JetBrains
- Good enough for casual use
Pro tier:
- Unlimited completions
- More chat messages
- Agent Mode access
- Copilot coding agent
- Good for individual developers who code daily
Pro+ tier:
- Everything in Pro
- Access to more powerful models
- Higher usage limits
- Priority access to new features
- Good for power users and professionals
Enterprise tier:
- Everything in Pro+
- IP indemnity (GitHub indemnifies you against copyright claims)
- Audit logs and usage analytics
- Policy controls (restrict which repos can use Copilot)
- Knowledge bases (index your private documentation)
- Required for large companies
Check github.com/features/copilot for current pricing. Prices change frequently.
When Copilot Beats the Competition
Copilot is not the best at everything. But it is the best at specific things:
Editor support: Copilot works in VS Code, JetBrains, Neovim, Vim, Emacs, Eclipse, and Xcode. No other tool comes close to this range.
Enterprise readiness: IP indemnity, audit logs, and policy controls are critical for large companies. Claude Code and Cursor are catching up but Copilot leads here.
GitHub integration: The coding agent that turns issues into PRs, the deep integration with GitHub Actions, and the PR review features make Copilot uniquely powerful for teams that live on GitHub.
Autocomplete quality: Copilot’s autocomplete is fast and context-aware. For pure autocomplete (not chat or agent), it is arguably still the best.
Where Copilot falls behind:
- Agent Mode is less capable than Claude Code for complex refactors
- The editor experience is not as polished as Cursor
- Model quality for complex reasoning is below Claude Opus
The best approach for most developers: use Copilot for autocomplete and GitHub integration, and add Claude Code or Cursor for complex tasks. See Choosing Your AI Coding Tool for stack recommendations.
Key Takeaways
- Write detailed comments and type annotations. They are mini-prompts that guide Copilot’s autocomplete.
- Agent Mode lets Copilot work autonomously — reading files, making changes, running commands, and fixing errors.
- The Copilot coding agent turns GitHub issues into pull requests. Assign an issue to Copilot and review the PR.
- Use copilot-instructions.md to teach Copilot about your project’s standards and patterns.
- Copilot’s unique strengths are editor breadth, enterprise features, and GitHub integration. Combine it with Claude Code for complex tasks.
What’s Next?
In the next article, we cover Context Engineering — the most important AI coding skill in 2026. Learn how to write CLAUDE.md, .cursorrules, and copilot-instructions.md files that dramatically improve AI output.
For a quick reference on Copilot commands and shortcuts, check the AI Coding Tools Cheat Sheet.
This is part 7 of the Vibe Coding series.