Claude Code

How to Use Claude Code in VS Code — Complete Installation Guide

minhaskills.io Como Usar Claude Code no VS Code — Guia Completo Claude Code
myskills.io Apr 15, 2026 15 minutes reading

You use Claude Code on the terminal and love the productivity. But every time you have to switch between the editor and the command line, you waste precious seconds — and lose flow. Now imagine Claude Code running inside VS Code, alongside your code, with direct access to open files, the error panel and git history. No alt-tab. No copying and pasting.

The official Claude Code extension for Visual Studio Code does just that. And in this complete guide, you will learn everything: from installation to advanced techniques that few developers know about. We'll cover every detail so you can leave here using Claude Code in VS Code like a pro.

If you are looking forhow to use Claude Code in VS Codein the most efficient way possible, this is the definitive tutorial. Let's get started.

1. What is the Claude Code extension for VS Code

Anthropic has released the official Claude Code extension for VS Code, bringing the full AI agent into the editor. We're not talking about a simple autocomplete like Copilot — it's the entire Claude Code, with all its reading, writing, command execution and reasoning capabilities, natively integrated into Visual Studio Code.

To understand what the extension offers, see the comparison with other AI tools in VS Code:

Feature Claude Code VS Code GitHub Copilot Cursor
Inline autocompleteYes (via inline chat)SimSim
Side chatSimSimSim
Executing commands in the terminalYes (self-employed)LimitedSim
Standalone multi-file editingSimNaoSim
Reading the entire projectYes (up to 1M tokens)LimitedSim
Custom skills/commandsYes (.claude/commands/)NaoRules
Git integrationYes (commit, PR, review)LimitedSim
Approval of actions with diffYes (accept/reject)NaoSim
1M Token ContextSimNaoNao

The Claude Code extension stands out especially in three areas:autonomy(performs complex tasks alone),context(read the entire project with 1M window tokens) andcustomization(customized skills for any domain).

What the extension offers in practice

Important:the extension uses the same backend as the Claude Code terminal. Your plan, credits, settings and skills are shared. It's not a separate product — it's the same Claude Code with a different interface within VS Code.

2. How to install Claude Code in VS Code

Installing Claude Code in VS Code is simple, but there are some prerequisites that you need to meet first. Let's go through the complete step by step.

Mandatory prerequisites

Requirement Minimum version How to check
VS Code1.96+code --version
Node.js18+node --version
Claude Code CLILatest versionclaude --version
Anthropic AccountMax plan or API keyconsole.anthropic.com

Step 1: install the Claude Code CLI (if you don't already have it)

If you don't already have Claude Code installed globally, start here:

Terminal
# Install Claude Code globally via npm
$ npm install -g @anthropic-ai/claude-code

# Check installation
$ claude --version
Claude Code v1.x.x

Step 2: Install the extension in VS Code

There are three ways to install the extension. Choose the one you prefer:

Extension installation
# Option 1: through the Marketplace (within VS Code)
1. Open VS Code
2. Ctrl+Shift+X (open Extensions)
3. Search for "Claude Code"
4. Click "Install" on the Anthropic extension

# Option 2: via the command line
$ code --install-extension anthropic.claude-code

# Option 3: via VS Code Quick Open
Ctrl+P → ext install anthropic.claude-code

Attention:make sure you install the official extensionAnthropic. There are unofficial extensions with similar names. The official extension has the verified seal and the publisher "Anthropic".

Step 3: authenticate

After installing, VS Code shows the Claude Code icon in the left sidebar. When clicked, the extension asks for authentication:

Step 4: check if it is working

Claude Code Panel
> ola, me diga qual projeto esta aberto, quantos arquivos tem e qual stack detectou

Claude Code: You are in the "my-app" project with 234 files.
Stack detected: React 19, TypeScript 5.4, Vite 6, Vitest,
Tailwind CSS 4, ESLint 9.

If Claude responded with correct information about your project, the installation is complete. If there are errors, the most common causes are: outdated Node.js, CLI not installed, or invalid API key.

Troubleshooting common installation problems

Problem Cause Solution
"Claude Code not found"CLI not installednpm install -g @anthropic-ai/claude-code
"Authentication failed"Expired tokenRode claudeon the terminal to re-authenticate
Extension does not appearOutdated VS CodeUpdate to v1.96+
"Node.js not found"Node is not in the PATHReinstall Node.js or add to PATH
Panel locks when openingConflict with another extensionDisable competing AI extensions and restart

3. Initial configuration: API key, model and permissions

With the extension installed and authenticated, it's time to configure it for your workflow. The extension has settings accessible inSettings > Extensions > Claude Codeor directly onsettings.json.

Main settings

Settings What it does Default value Recommendation
claude-code.modelModel to useAutomatic (best available)Leave it at default
claude-code.autoApproveAutomatically approve actionsoffStart off, turn on after getting used to it
claude-code.showDiffBeforeApplyShow diff before applyingtrueKeep it on
claude-code.terminalProfileWhich terminal to useDefaultUse the system default
claude-code.maxFileSizeMaximum file size10MBIncrease to 20MB if working with CSVs
claude-code.contextWindowContext windowMaximum availableLeave it at most

Recommended configuration in settings.json

Permission levels

Claude Code in VS Code operates with three permission levels, just like in the terminal:

You can control these permissions inCLAUDE.mdproject and extension settings. The recommendation for beginners is to keep everything with manual approval until you feel comfortable with Claude's behavior.

CLAUDE.md works identically

The fileCLAUDE.mdin the root of the project it works the same way in the extension. Custom instructions, conventions, restrictions and commands are respected. If you already have CLAUDE.md configured for the terminal, you don't need to change anything at all.

4. Interface: side panel, integrated terminal and inline suggestions

The extension adds several elements to VS Code. Let's detail each one so you can get the most out of it.

Side Panel (Chat Panel)

The main panel where you talk to Claude Code. Access withCtrl+L (ou Cmd+Lon Mac). It works like the terminal, but with a complete visual interface:

Integrated terminal

You can also use Claude Code via the CLI within the integrated VS Code terminal. Open the terminal (Ctrl+`) and typeclaude. It's exactly the same as running in the external terminal, but without leaving the editor.

VS Code integrated terminal
$ claude
Claude Code v1.x | Model: claude-opus-4 | Context: 1M tokens

> analise o projeto e sugira melhorias de performance

The difference between using the integrated terminal and the side panel: in the terminal you have the pure CLI experience. In the side panel you have visual diffs, approval buttons and automatic reference to the active file. Use whatever works best for each task.

Inline suggestions (Chat Inline)

The most powerful feature for quick edits. Select a code snippet in the editor, pressCtrl+Iand a chat field appears directly in the editor, next to the selected code.

Examples of using inline chat:

Claude applies changes as inline diffs — green for additions, red for deletions. You accept or reject each change individually.

Status bar

In the bottom bar of VS Code, an indicator shows the status of Claude Code in real time: connected (green), processing (yellow/animation), or disconnected (red). Click to see details such as tokens consumed, active model and session time.

Problems panel + Claude Code

One of the most useful integrations: Claude Code can access the dashboardProblemsfrom VS Code (Ctrl+Shift+M). This means that errors from TypeScript, ESLint, and other extensions are available as context. You can order:

Claude Code Panel
> corrija todos os erros de TypeScript listados no painel Problems
SPECIAL OFFER

Master Claude Code with 748+ Professional Skills

Everything you are learning in this guide becomes 10x more powerful with ready-made skills. Install in 2 minutes and transform Claude into the expert you need.

748+ Skills + 12 Bonuses + 120K Prompts

From R$197

R$19

Single payment • Lifetime access • 7 day guarantee

I WANT THE MEGA BUNDLE NOW

Install in 2 min • Claude Code, Cursor, ChatGPT

Shortcut for those who want to skip to the result

Everything you are reading becomes a ready-made template with 748 Skills.

See Skills R$19 →

5. Essential Keyboard Shortcuts

Mastering shortcuts is what separates those who use Claude Code in VS Code efficiently from those who waste time navigating menus. Here are all the shortcuts you need to memorize:

Top Shortcuts

Shortcut (Windows/Linux) Shortcut (Mac) Acao
Ctrl+LCmd+LOpen/focus the side chat panel
Ctrl+ICmd+IInline chat (about selected code)
Ctrl+Shift+ICmd+Shift+ISend text selection to chat
Ctrl+Shift+P> "Claude"Cmd+Shift+P> "Claude"See all extension commands
EscapeEscapeCancel Claude's current operation
Ctrl+EnterCmd+EnterSend message in chat (when multiline)
Ctrl+Shift+MCmd+Shift+MOpen Problems panel (use with Claude)

Useful navigation shortcuts with Claude Code

Shortcut Acao Why is it useful with Claude
Ctrl+`Open integrated terminalUse Claude Code CLI within VS Code
Ctrl+Shift+XOpen extensions panelCheck version of the Claude Code extension
Ctrl+K Ctrl+SOpen Keyboard ShortcutsCustomize Claude Code Shortcuts
Ctrl+,Open SettingsAdjust extension settings
Ctrl+Shift+GOpen Source ControlSee git changes after Claude edit

Productivity tip:Claude Code's fastest workflow in VS Code is: select code →Ctrl+I→ describe the change → accept the diff. For one-off edits, this is faster than any alternative, including the terminal.

Customize shortcuts

If the default shortcuts conflict with your extensions, customize themKeyboard Shortcuts(Ctrl+K Ctrl+S). Search for "claude" to see and edit all shortcuts for the extension. You can exchangeCtrl+Lin any combination you prefer.

6. How to use skills within VS Code

Skills are Claude Code's most powerful feature — and they work identically in VS Code. A skill and an instruction file in.claude/commands/which turns Claude into an expert in any domain: SEO, copywriting, code review, deployment, data analysis and much more.

How skills work in VS Code

In the VS Code extension, you invoke skills from the chat panel using/nome-da-skill. The skill carries the instructions and Claude starts to follow that specialized behavior.

Claude Code Panel — VS Code
# Invoke code review skill
> /review

# Invoke testing skill
> /test src/components/Button.tsx

# Invoke deploy skill
> /deploy staging

Structure of a skill

Where the skills are

Location Scope Path
ProjectJust for this repo.claude/commands/
UserAll projects~/.claude/commands/

748+ skills ready to install

Creating skills from scratch works, but it takes time. Minhaskills.io's package of 748+ professional skills offers ready-made skills for 7 categories: Digital Marketing, SEO & GEO, Copywriting, Development, Social Media, Monetization, and Workflows & Automation. You can install it in 2 minutes by copying the folders to.claude/commands/and they are all available in both the terminal and VS Code.

Checking available skills

In the VS Code chat panel, type/and the extension shows the list of all skills available with autocomplete. You can browse the list and select the skill you need.

7. Advanced tips: multi-file, git and debugging

With the basics mastered, let's move on to the advanced techniques that transform you from a casual user to a power user of Claude Code in VS Code.

Tip 1: Mention files with @

In the chat panel, use@followed by the name of the file to include as explicit context:

Claude Code Panel
> compare @utils/auth.ts com @utils/auth-v2.ts e me diga
o que mudou e se a v2 introduziu algum bug

Tip 2: Multi-file refactoring

Claude Code in VS Code does global refactorings that "Find & Replace" can't — because it understands semantics, not just text:

Claude Code Panel
> renomeie a interface UserData para User em todo o projeto.
Atualize todos os imports, tipos derivados e referencias.
Garanta que os testes continuem passando.

Claude finds all the affected files, shows diffs for each one, and you batch approve them. Secure global refactoring in seconds.

Tip 3: complete git integration

Claude Code in VS Code has full access to git. Use to automate versioning tasks:

After Claude makes changes via git, VS Code's Source Control panel (Ctrl+Shift+G) automatically updates, showing all modified files.

Tip 4: Assisted debugging

Combine the VS Code debugger with Claude Code for a powerful debugging experience:

  1. Put a breakpoint in the suspicious code
  2. Run the debugger (F5)
  3. When you stop at the breakpoint, open Claude's panel (Ctrl+L)
  4. Ask: "I'm stuck at this breakpoint, the variables are [copy from the Variables panel]. What's causing the bug?"
  5. Claude analyzes the context and suggests the correction

Tip 5: Multi-root workspaces

If you use workspaces with multiple folders (monorepos, frontend + backend), Claude Code has access to all folders in the workspace. You can ask for tasks that cross boundaries:

Tip 6: Use with existing extensions

The Claude Code respects its extensions. Files created or edited by Claude are formatted automatically if you have Prettier or ESLint configured to format on save. TypeScript errors appear in the Problems panel after edits. Everything integrated.

Tip 7: history and continuity

The chat panel keeps the conversation history. If you close VS Code and reopen, you can continue where you left off using/resumein chat. Claude recovers the context of the previous session.

8. Claude Code VS Code vs terminal — when to use each

With two ways to use Claude Code, the question is: when to use each one? Here is a practical guide based on real scenarios.

Scenario Best option Why
Quick code editingVS Code (Ctrl+I)Inline chat is the fastest workflow for one-off edits
Multi-file refactoringBothVS Code shows visual diffs, terminal shows full output
Data analysis/CSVTerminalExtensive output looks better on the terminal without visual limits
Visual debuggingVS CodeInline diffs + Problems panel + integrated debugger
Automation with /loopTerminalLong-lasting loop runs better on a dedicated terminal
Code reviewVS CodeSide-by-side visual diffs make review easier
Generate project from scratchTerminalMore control over creating directory structure
Write testsVS CodeActive file as context + inline suggestions
Deployment and CI/CDTerminalLong commands and extensive logs
DocumentationVS CodeEdit README/docs side by side with code
Git operationsBothVS Code for visual, terminal for batch operations
Specialized skillsBothSkills work identically in both

The pragmatic answer

Use both.The extension for daily development — edits, testing, debugging, code review. The terminal for long tasks — automation, deployment, data analysis, /loop. You can have both running simultaneously without conflict. Skills, configurations and authentication are shared.

Combined use in practice:Open VS Code with the extension active for your main development workflow. Maintain an external endpoint with Claude Code for infrastructure, monitoring, and automation tasks. The changes that the terminal makes to the filesystem automatically appear in VS Code.

Performance: extension vs terminal

Metric VS Code Extension CLI terminal
Response speedIdenticalIdentical
Token consumptionIdenticalIdentical
RAM Usage~100-200MB more (VS Code overhead)Lighter
Context windowUp to 1M tokensUp to 1M tokens
Edit latencyVisual diff adds ~1sDirect application

There is no functional difference between using Claude Code in VS Code or in the terminal. Processing takes place on the same Anthropic servers. The only difference is the presentation layer — visual diffs, approval buttons and integration with the editor.

SPECIAL OFFER — LIMITED TIME

The Largest AI Skills Bundle on the Market

748+ Skills + 12 Bonus Packs + 120,000 Prompts

748+
Skills Profissionais
Marketing, SEO, Copy, Dev, Social
12
Pacotes Bonus GitHub
8.107 skills + 4.076 workflows
100K+
Prompts de IA
ChatGPT, Claude, Gemini, Midjourney
135
Agents Prontos
Automacao, dados, negocio, dev

From R$197

R$19

Single payment • Lifetime access • Free updates

I WANT THE MEGA BUNDLE NOW

Install in 2 minutes • Works with Claude Code, Cursor, ChatGPT • 7 days guarantee

✓ SEO & GEO (20 skills) ✓ Copywriting (34 skills) ✓ Dev (284 skills) ✓ Social Media (170 skills) ✓ n8n Templates (4,076)

FAQ

Open VS Code, pressCtrl+Shift+XTo open the extensions panel, search for "Claude Code" and install the official Anthropic extension. Alternatively, runcode --install-extension anthropic.claude-codein the terminal. After installing, authenticate with your Anthropic account (Max plan) or enter your API key in the extension's settings. Check if it works by sending a test message in the chat panel (Ctrl+L).

The functionality is identical — the same Claude Code runs on both. The difference is the interface. In the terminal you have pure CLI experience. In the VS Code extension you get a side chat panel, inline visual diffs, approve/reject edit buttons, automatic reference to the active file and integration with the Problems panel. Skills, configurations and token consumption are shared between both environments.

Yes. Skills (files in.claude/commands/) work in both the terminal and the VS Code extension. Configure the skills once and they are available in both environments. In the extension, invoke skills through the chat panel using/nome-da-skill. The package of748+ skills from minhakills.ioworks in both environments without additional configuration.

No. The extension is free. You use the same plan as Claude Code — whether it's the Max plan or the Anthropic API. If you already have access to Claude Code on the terminal, the extension works at no additional cost. Token consumption is identical in both environments. You no longer pay for using VS Code.

The main shortcut andCtrl+L (Cmd+Lon Mac) to open the side chat panel. UseCtrl+Ifor inline chat about selected code — ideal for quick edits.Ctrl+Shift+Pand search for "Claude" to see all available commands. You can customize these shortcuts in Keyboard Shortcuts (Ctrl+K Ctrl+S).

Share this article X/Twitter LinkedIn Facebook WhatsApp
PT EN