GitHub Copilot: the developer side.
Microsoft 365 Copilot and GitHub Copilot share the name but are different products. If you write code — even occasionally — GitHub Copilot dramatically changes your workflow. This lesson covers the four use modes that matter: code completion, chat in your IDE, agent mode, and pull request summaries.
The mental model
GitHub Copilot is a pair programmer, not a replacement.
The trap most developers fall into: accepting suggestions blindly, ending up with code they didn't write and don't understand. The pattern that works: drive deliberately, accept selectively, always read what you accept.
Workflow 01 Code completion: the inline workflow
Tab-to-accept, with judgment
Type a comment or function signature; Copilot suggests the next lines as you type. Tab to accept. The win is sustained: 30-40% fewer keystrokes on routine code.
The prompt that works
Best use cases
- Boilerplate (CRUD endpoints, validation, error handling)
- Routine algorithms (sorting, parsing, formatting)
- Tests for code you just wrote
- Repetitive patterns within a file
Workflow 02 Chat in the IDE: ask, don't search
Replace Stack Overflow with inline chat
Highlight code → ask Copilot Chat anything: "why doesn't this compile?" / "refactor this to use async/await" / "explain what this does."
The prompt that works
Best use cases
- Debugging unfamiliar code
- Learning a new codebase
- Refactoring without breaking behavior
- Writing tests you'd otherwise skip
Workflow 03 Agent mode: let it do the multi-step work
Hand off the boring multi-step tasks
Agent mode (in VS Code, Visual Studio, JetBrains) takes a goal and works across multiple files autonomously — proposing changes you review before accepting.
The prompt that works
Best use cases
- Repetitive multi-file changes
- Library upgrades with known breaking changes
- Adding observability or logging across modules
- Codebase migrations and refactors
Workflow 04 Pull request summaries: ship cleaner PRs
Generate the PR description you should have written
When you open a PR, Copilot drafts the description, summarizing changes, files affected, and rationale.
The prompt that works
Best use cases
- Open-source contributions
- Internal PRs that need to onboard reviewers fast
- PRs spanning many files where context is hard to skim
- Documentation PRs where the writing is the artifact
Final challenge: refactor something with Copilot in the loop
Pick a small refactor you've been meaning to do — extract a duplicated function, modernize an old class, migrate to a newer API. Use all four modes:
- Chat: explain the current code to Copilot, ask for refactor suggestions
- Agent mode: propose the change across the affected files
- Code completion: write the new function manually, accepting Copilot suggestions selectively
- PR summary: generate, then heavily edit before submitting
Track: where did Copilot save real time? Where did it cost time (wrong suggestions, debugging hallucinated code)? Calibrate your trust accordingly.
What you can do now
- Use code completion with judgment (read every suggestion before accepting)
- Replace Stack Overflow trips with inline IDE chat for most questions
- Use agent mode for multi-file refactors and migrations (always reviewed)
- Generate PR descriptions that actually onboard reviewers
- Recognize hallucinated code patterns specific to your language/framework