Installing Copilot is easy. Using it well is another story. In this guide we’re going to set up GitHub Copilot from scratch and build a workflow that actually accelerates your productivity — not just blindly accepting suggestions.
Prerequisites
- GitHub account with Copilot access (free plan available for individual developers, students, and open source maintainers)
- VS Code updated (or JetBrains if that’s your preference)
- A real project to work with — Copilot shines with context
Step 1: Installation
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X) - Search for “GitHub Copilot” and install the official extension
- Also install “GitHub Copilot Chat” if it doesn’t come included
- VS Code will ask you to authenticate with your GitHub account — follow the authorization flow
Verify it works: open any code file and start writing a function. You should see suggestions appearing in gray automatically. Press Tab to accept.
Step 2: Basic Configuration
Open Settings (Ctrl+,) and search for “copilot”. The key configurations:
Enable/disable by language:
"github.copilot.enable": {
"*": true,
"markdown": false,
"plaintext": false
}
This keeps Copilot active for code but disables it for text files where suggestions are usually more noise than help.
Essential keyboard shortcuts:
Tab— accept full suggestionCtrl+→— accept word by word (very useful for partially correct suggestions)Alt+]/Alt+[— navigate between alternative suggestionsEsc— reject suggestionCtrl+Shift+I(orCmd+Shift+Ion Mac) — open Copilot Chat
Step 3: Custom Instructions per Project
This is where most developers leave value on the table. Create a .github/copilot-instructions.md file at the root of your project:
# Copilot Instructions
## Tech Stack
- Frontend: React 18 with TypeScript
- Backend: Node.js with Express
- Database: PostgreSQL with Prisma ORM
- Testing: Vitest for unit tests, Playwright for E2E
## Code Conventions
- Use functional components with hooks, never class components
- Name files in kebab-case
- TypeScript types in separate files (.types.ts)
- Async/await functions, avoid .then() chains
- Comments in English for internal documentation
## Preferred Patterns
- Repository pattern for data access
- Zod for input validation
- Centralized error handling with custom middleware
This file gives Copilot specific context about your project. The difference in suggestion quality is noticeable.
Step 4: Workflow with Copilot Chat
Copilot Chat (Ctrl+Shift+I) is more powerful than it seems. Some practical workflows:
Explain unfamiliar code:
Select a code block → open Chat → type /explain. Copilot breaks down what the code does, line by line. Perfect when you’re entering a new project or reviewing a PR.
Generate tests:
Select a function → /tests. Copilot generates unit tests based on your function’s signature and logic. They’re not always perfect, but they give you a solid base to iterate on.
Refactor:
Select code → describe what you want: “refactor this to use async/await instead of callbacks” or “extract the validation logic into a separate function”.
Debugging:
Paste an error in the chat → “why am I getting this error?” Copilot analyzes the error in the context of your code and suggests solutions.
Document:
Select a function → /doc. Generates JSDoc/docstring with parameter descriptions and return types.
Step 5: Workflow for New Code
The trick to getting good code from Copilot is giving it context before you write:
// Function that calculates the final price of a product
// applying quantity discount and VAT according to country
// Supported countries: Chile (19%), Colombia (19%), Mexico (16%), Argentina (21%)
// If quantity is greater than 10, apply 5% discount
// If greater than 50, apply 10% discount
function calculateFinalPrice(
With those detailed comments, Copilot generates a much more accurate implementation than if you just write the function name. The pattern is: detailed comment → function signature → let Copilot complete.
Step 6: Code Review with Copilot
On GitHub (web or CLI), Copilot can review your Pull Requests:
- Create your PR normally
- On the PR page, click the Copilot icon to request a review
- Copilot analyzes the changes and leaves comments about potential bugs, performance improvements, and security issues
It doesn’t replace human review, but it catches things we sometimes miss.
Common Mistakes to Avoid
Accept everything without reading. Copilot is a very productive junior — it writes fast but needs review. Read each suggestion before accepting it.
Don’t give context. If you write code without comments or types, Copilot guesses. The more context you give it (types, comments, descriptive names), the better the suggestions.
Ignore alternatives. If the first suggestion isn’t ideal, use Alt+] to see other options. Sometimes the third or fourth option is the right one.
Don’t use Chat. Many developers only use autocomplete and never open Copilot Chat. You’re leaving half the tool unused.
Result
With this setup you have:
- Copilot understanding your project’s conventions
- A workflow that combines intelligent autocomplete with conversational chat
- Automated code review on your PRs
- A process for writing new code that maximizes suggestion quality
The key isn’t that Copilot writes all your code — it’s that it removes friction from repetitive parts so you can focus on business logic and architecture decisions.
Already using Copilot? Share your configuration and tricks in the comments. ![]()