Lesson 07 · Copilot Mastery Pro ~14 min read 4 use modes

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

1

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

The patternWrite a clear function name and a comment describing what it should do. Wait for Copilot's suggestion. Read it before tabbing. If wrong, ignore and type your version. Iterate.

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
Copilot will confidently generate plausible-looking code that doesn't actually compile or has subtle bugs. Especially in newer language features and libraries. Always run before committing.
Time savings: 30-50% reduction in keystrokes on routine code. Compound effect over a career: enormous.

Workflow 02 Chat in the IDE: ask, don't search

2

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

Common chat promptsExplain what this function does line by line. This is throwing [error]. What's the cause? Refactor this to be more readable without changing behavior. Write tests for this function covering the edge cases.

Best use cases

  • Debugging unfamiliar code
  • Learning a new codebase
  • Refactoring without breaking behavior
  • Writing tests you'd otherwise skip
Chat doesn't know your full codebase context unless you give it. Paste in or @-reference the relevant files. Otherwise you get plausible-but-wrong answers.
Time savings: 10 min of Stack Overflow + Googling → 60 sec of chat.

Workflow 03 Agent mode: let it do the multi-step work

3

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

Good agent tasksAdd a new feature flag and wire it through the affected services. Upgrade this codebase from React 18 to 19, fixing breaking changes. Find all places where we still use the deprecated API and migrate to the new one.

Best use cases

  • Repetitive multi-file changes
  • Library upgrades with known breaking changes
  • Adding observability or logging across modules
  • Codebase migrations and refactors
Always review every change before accepting. Agent mode will sometimes make changes that pass local tests but break in production. Run full test suite + manual sanity check.
Time savings: Multi-file refactors: hours → minutes (with review).

Workflow 04 Pull request summaries: ship cleaner PRs

4

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

Use patternOpen PR → click 'Copilot: Generate description' → review and edit → submit. Skip the lazy 'fixes #123' descriptions; ship PRs reviewers actually understand.

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
Copilot's PR summary is decent but generic. Always add: why you made this change, how you tested it, and any reviewer notes that aren't in the diff.
Time savings: PR description quality: huge improvement. Review cycle time: cut measurably.

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:

  1. Chat: explain the current code to Copilot, ask for refactor suggestions
  2. Agent mode: propose the change across the affected files
  3. Code completion: write the new function manually, accepting Copilot suggestions selectively
  4. 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
Pro+
Up next in Copilot Mastery

Lesson 8+ · Plus: rollout, governance, prompt libraries, and more

Adoption playbooks for IT admins, prompt-library templates by department, security & compliance settings, measuring real ROI — the advanced curriculum for people deploying Copilot at scale. See pricing →