Learn from the code you just wrote. Patch Tutor explains each change in your git
working tree right on the code, then quizzes you on it.
Features
Explain this change. Every changed hunk gets an Explain button. The
explanation opens on the code, with Simpler and Go deeper to change the level,
and Refresh to explain it again.
Ask follow-ups. Reply under an explanation to ask a question, ask for a dry run, or
push back when something looks wrong. If you are right, the explanation is corrected.
Quiz me. A few short questions on the change, graded as you answer. Answer in
the thread, or move the quiz to the Quiz chat in the sidebar.
Progress. See which concepts you have mastered and which need practice.
Your model, your data. Use a model you already have in VS Code, or your own
API key. No account, no backend, no telemetry.
Getting started
Install Patch Tutor and open a git repository.
Pick a model: open the Patch Tutor sidebar, then ⚙ in the Quiz chat.
Change some code and click Explain this change above the hunk.
The Get started with Patch Tutor walkthrough (Help → Welcome) shows the same steps.
Models
Provider
What you need
VS Code models
GitHub Copilot, or any extension that adds models to VS Code.
Anthropic
An Anthropic API key.
OpenAI-compatible
A key for OpenAI, OpenRouter, Groq, or a local LM Studio server.
Ollama
Ollama running locally. Nothing leaves your machine.
Privacy
Your diff and related code are sent only to the model provider you choose.
API keys are kept in VS Code's secret storage, never in settings files.
Quiz history and progress stay on your machine.
Settings
Setting
Default
Description
patchTutor.contextTokenBudget
6000
How much context to send with each explanation.
patchTutor.maxOutputTokens
1200
Maximum length of each explanation.
patchTutor.gutterIcons
true
Show an icon in the gutter on changed hunks.
patchTutor.highlightChangedLines
true
Softly highlight lines Patch Tutor can explain.
Provider and model are easiest to change from ⚙ in the Quiz chat.
Contributing
Issues and pull requests are welcome.
npm install
npm run build
npm test # unit tests
npm run test:integration # runs inside VS Code
Press F5 in VS Code to launch an Extension Development Host.