Guide · Editor · ★☆☆☆☆
How to use Claude Code in VS Code
This whole site is built from the Claude Code panel in VS Code. It is the same Claude Code as the terminal, with diffs you can click and the file you have open shared for you.
By Arthur Hsiao · Last updated · 4 min read
What you need. VS Code 1.94.0 or newer and a paid Claude plan. This PC runs VS Code 1.144.0 with the extension anthropic.claude-code at version 2.1.325.
Checked against the VS Code docs on 15 Nov 2026.
1Install the extension
- Press
Ctrl+Shift+Xto open Extensions. - Search for
Claude Code. Pick the one published by Anthropic. - Click Install.
Or from a terminal:
code --install-extension anthropic.claude-code
The extension doesn't put claude on your PATH. To also use Claude Code in a terminal, do the Windows install as well.
2Open the panel
Any of these:
- Click the Spark icon at the top right of the editor (only shows when a file is open).
- Click ✻ Claude Code at the bottom right of the window (works with no file open).
Ctrl+Shift+P, typeClaude Code, pick an option such as Open in New Tab.
Ctrl+Esc moves the focus between the editor and the Claude prompt box.
3Share code without copying it
Select some lines in the editor and Claude sees them with your next message. To pin them in the prompt, press Alt+K: it inserts a mention with the file and line numbers, such as @app.ts#5-10.
The panel also tells Claude which file you have open. In this site's session logs, every prompt carries a line like this, added by the extension:
The user opened the file c:\...\ahdevstudio\ROADMAP.md in the IDE. This may or may not be related to the current task.
So "fix the typo in this file" works, as long as the right file is open.
4Review diffs in the editor
In Manual mode, a change opens as a side-by-side diff: the old file on the left, Claude's version on the right. You can:
- accept it,
- reject it,
- or type what to do instead.
Each change has its own Accept this change and Reject this change buttons, so you can keep half of an edit. A diff with more than 100 changes shows without them; review it as a whole file.
In Auto or Edit automatically mode, changes are saved without asking. You'll still see them in Source Control, which is one more reason to commit before a big task.
5Find the slash commands and modes
- Type
/in the prompt box, or click the/button, for the command menu:/model,/usage,/compact,/planand more. Some items open in the built-in terminal. - Click the mode name at the bottom of the prompt box to pick Auto, Manual, Plan or Edit automatically. What each one allows is in Claude Code permissions.
6Know what's different from the terminal
From the docs' comparison table, today:
| Feature | Terminal | VS Code panel |
|---|---|---|
| Commands and skills | All | A subset (type / to see) |
| Checkpoints and rewind | Yes | Yes |
| MCP servers | Yes | Yes |
! to run a shell command |
Yes | No |
| Tab completion | Yes | No |
Also, /config is a terminal screen; the panel doesn't open it, so change settings in the settings file instead. When you need something the panel lacks, open the built-in terminal with Ctrl+` and run claude there. The docs say it connects to the extension on its own.
Two sessions, one folder. The panel and a terminal session are separate conversations. Both can edit the same files, and neither sees the other's chat. Use one at a time per task, or you'll get edits that fight each other.
Keep going from your phone
A Claude Code session can also be driven from the Claude app when you're away from the desk: see Claude Code remote control. And if you're still deciding between the chat app and Claude Code, see Claude Code for beginners.
Next: every command from these guides on one page, in the Claude Code cheat sheet. New here? Start with Claude Code for beginners.