When I first used GitHub Copilot, I only thought it was a tool that helps autocomplete code.
You know… you type half a function, and it magically finishes it for you.
But after a while, I realized something crazy:
Copilot can act like a personal mentor inside VSCode.
Like a senior developer who is always free, never angry, and doesn’t judge your messy code.
In this blog, I’ll show you how I use Copilot as my “virtual mentor” every day.
The steps are simple, the English is simple, and the benefits are not simple at all.
Step 1: Ask Copilot to Explain Code Like You’re a child
Sometimes I open a file in my project and my brain says:
“Who wrote this? Oh wait… it was me.”
If you have confusing code (or inherited legacy code from another dev who left the company long ago), just select the code and use Copilot Chat:
Prompt:
“Explain this code to me in simple words.”
Copilot will break it down:
-
what the function does
-
what each part means
-
what the flow looks like
It’s like hearing a senior explain with zero stress.
Step 2: Ask Copilot to Review Your Code
A good mentor doesn’t just explain — they also review.
Highlight your code → open Copilot Chat → ask:
“Review this code and tell me what I should improve.”
Copilot can point out:
-
unnecessary conditions
-
performance issues
-
bad naming
-
missing error handling
-
duplicated logic
Sometimes it even suggests better patterns.
Honestly, it feels a bit embarrassing but also very helpful.
Step 3: Ask Copilot to Generate Tests for You
If you hate writing tests (like most developers do), Copilot can help.
Just copy your function or component and say:
Prompt:
“Write unit tests for this using Jest/Vitest.”
You’ll get a test file that is:
-
clean
-
readable
-
usually better than what I write
You can also ask:
“Write a Playwright test for this user flow.”
Boom. Full E2E script.
Your mentor is now your test writer.
Step 4: Let Copilot Refactor Your Messy Code
We all have code that we are not proud of.
Sometimes it works… but it looks like a bowl of spaghetti.
Instead of pretending everything is fine, just ask Copilot:
Prompt:
“Refactor this code to make it cleaner.”
or
Prompt:
“Rewrite this function in a more readable way.”
Copilot can:
-
split functions
-
simplify conditions
-
remove duplicated code
-
create better variable names
It feels like magic, but also feels like cheating a little bit.
Step 5: Use Copilot to Generate Boilerplate You Don’t Want to Write
A mentor normally gives advice.
But Copilot can also help with the boring stuff:
-
creating API handlers
-
writing TypeScript types
-
making React hooks
-
building CRUD services
-
writing config files (ESLint, Webpack, Tailwind…)
Just ask for it.
Prompt:
“Generate a new React hook for fetching user data.”
Prompt:
“Create a controller for this API route.”
Prompt:
“Write TypeScript interfaces for this JSON.”
It saves a ton of time.
Step 6: Use Copilot to Understand a Whole Project
If you join a big project and have no idea what is happening (very common), Copilot can help.
Prompt:
“Give me an overview of this project.”
Prompt:
“Explain how authentication works in this project.”
Prompt:
“Show me the flow of the checkout feature.”
A real senior might need a few hours to explain.
Copilot does it in a few seconds — and doesn’t get tired.
Step 7: Ask Copilot Anything You’re Afraid to Ask a Human
Sometimes in a real team, you don’t want to ask “stupid” questions.
We’ve all been there.
With Copilot, you don’t need to feel shy.
Ask anything:
-
“What does debounce mean?”
-
“Why do I need useCallback?”
-
“What is the difference between state and ref?”
-
“How does JWT work?”
Copilot answers patiently every time.
Your mentor never complains.
Final Thoughts
Using Copilot only for autocomplete is like buying a smartphone and using it only as a flashlight.
Copilot inside VSCode can:
-
explain code
-
review code
-
generate tests
-
refactor logic
-
write boilerplate
-
teach you concepts
-
help you understand the whole project
If you use it right, your productivity can easily double.