Claude Code

Claude Code in VS Code: How to Set up and Use (2026)

minhaskills.io Claude Code in VS Code: How to Set up and Use (2026) Claude Code
minhakills.io 2 Apr 2026 13 min read

You already use Claude Code in the terminal and like it. But switching between the editor and terminal all the time breaks your workflow. What if Claude Code could run inside VS Code, alongside your code, with direct access to open files?

The Claude Code extension for VS Code does just that. Same power as the terminal, integrated into the editor you already use. In this tutorial, you will learn how to install, configure, and use Claude Code in VS Code to maximize your productivity.

1. The Claude Code extension for VS Code

Anthropic has released the official Claude Code extension for VS Code, integrating the AI ​​agent directly into the editor. The extension is not an autocomplete plugin -- it is the complete Claude Code, with all its capabilities, running within VS Code.

What the extension offers:

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

2. Step-by-step installation

Prerequisites

Step 1: install the extension

VS Code
# Opcao 1: pelo Marketplace (dentro do VS Code)
1. Abra VS Code
2. Ctrl+Shift+X (abrir Extensions)
3. Busque "Claude Code"
4. Clique "Install" na extensao da Anthropic

# Opcao 2: pela linha de comando
$ code --install-extension anthropic.claude-code

Step 2: authenticate

After installing, VS Code shows the Claude Code icon in the sidebar. When you click, it asks for authentication:

If you have already authenticated Claude Code on the terminal, the extension can reuse the existing authentication automatically.

Step 3: check

Painel Claude Code
> ola, me diga qual projeto esta aberto e quantos arquivos tem

Claude Code: Voce esta no projeto "meu-app-react" com 147
arquivos. Stack detectada: React 19, TypeScript, Vite, Vitest.

If Claude responded with information about his project, everything is working.

3. Configuration and authentication

The extension has specific settings accessible inSettings > Extensions > Claude Code:

Settings What it does Recommendation
claude-code.modelModel to useLeave it at default (use the best available)
claude-code.autoApproveAutomatically approve actionsStart with "off", turn it on after getting used to it
claude-code.terminalProfileWhich terminal to use for commandsUse the system default
claude-code.maxFileSizeMaximum file size to read10MB (default)

VS Code settings.json

CLAUDE.md works the same

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

4. Getting to know the interface

The extension adds three elements to VS Code:

Side panel (Chat)

The main panel where you talk to Claude Code. It works like the terminal, but with a visual interface. You type messages, Claude responds, and actions (create/edit files, run commands) appear with approve/reject buttons.

Status bar

In the bottom bar of VS Code, an indicator shows the status of Claude Code: connected, processing, or waiting. Click to see details such as tokens consumed in the session.

Inline actions

When Claude suggests edits to a file, they appear as inline diffs -- you see exactly what will change before accepting. Green for additions, red for removals. "Accept" and "Reject" buttons for each change.

5. Essential Keyboard Shortcuts

Shortcut Acao
Ctrl+Shift+P> "Claude"See all Claude Code commands
Ctrl+LOpen/focus chat panel
Ctrl+IOnline chat (to the editor, about the selected code)
Ctrl+Shift+ISend text selection to Claude
EscapeCancel the current operation

Productivity tip: use Ctrl+Ifrequently. Select a code snippet, pressCtrl+Iand ask Claude to explain, refactor, add types or write tests. It's the fastest workflow for one-off edits.

Customize shortcuts

In VS Code, openKeyboard Shortcuts(Ctrl+K Ctrl+S) and search for "claude" to see and costmize all the extension's shortcuts.

6. Integrated terminal vs extension panel

You have two ways to use Claude Code in VS Code: through the integrated terminal and through the extension panel. Both work, but there are practical differences.

VS Code built-in terminal

Open the VS Code terminal (Ctrl+`) and typeclaude. It's exactly the same as using it in the external terminal, but inside VS Code. Useful if you prefer the pure CLI interface.

Terminal integrado VS Code
$ claude
Claude Code v1.x | Modelo: claude-opus-4 | Contexto: 1M tokens

> crie um componente Button com variantes primary e secondary

Extension panel

The side panel (Ctrl+L) offers a more visual experience:

Want to master this faster?

Everything you are learning here becomes 10x more powerful with ready-made skills. Instead of typing commands manually, skills do the heavy lifting for you. 748+ professional skills, installs in 2 minutes.

Quero as Skills — $9

7. Productivity workflows

Workflow 1: edit code with context

  1. Open the file you want to edit
  2. Select the relevant code snippet
  3. pressCtrl+I(online chat)
  4. Describe the change: "add error handling", "convert to async/await", "add TypeScript typing"
  5. Claude shows the inline diff -- accept or reject

This workflow is faster than copying code to the chat and pasting it back. Claude sees exactly which section you selected and applies the change in the right place.

Workflow 2: generate tests from the editor

  1. Open the component/function you want to test
  2. In the chat panel (Ctrl+L), type: "create tests for active file"
  3. Claude analyzes the open file and generates tests
  4. Tests appear as new file -- accept to create
  5. Claude can runnpm testautomatically to check

Workflow 3: debug with editor errors

  1. VS Code shows a red error on some line (TypeScript error, lint error)
  2. Select the row with error
  3. Ctrl+I: "fix this error"
  4. Claude reads the VS Code diagnostic error and applies the fix

Workflow 4: refactoring in multiple files

Painel Claude Code
> renomeie a interface UserData to User em todo o projeto.
Atualize todos os imports e referencias.

Claude finds all files that referenceUserData, shows the diffs for each one, and you approve it in batch. Global refactoring in seconds.

8. Advanced tips

Mention files in chat

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

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

Use Problems panel errors

VS Code has a "Problems" panel (Ctrl+Shift+M) that lists errors and warnings. You can ask Claude:

Painel Claude Code
> corrija todos os erros de TypeScript listados no painel
Problems. Faca as correcoes uma por uma e me mostre cada diff.

Multi-root workspaces

If you use workspaces with multiple folders in VS Code, Claude Code has access to them all. Useful for monorepos or projects with setote frontend + backend.

Integrate with existing extensions

Claude Code works alongside its other extensions. It respects the settings of ESLint, Prettier, TypeScript and others. If Prettier formats when saving, the files that Claude creates are also formatted automatically.

9. Terminal vs extension: when to use each

Scenario Best option Why
Quick code editingExtensionCtrl+I inline is faster
Complex multi-file tasksTerminal or extensionBoth work equally
Data analysis/CSVTerminalExtensive output looks better on the terminal
Visual debuggingExtensionDiff online are clearer
Automation with /loopTerminalLoop runs better on a dedicated terminal
Code reviewExtensionVisual diffs make review easier
Generate project from scratchTerminalMore control over structure creation
One-off refactoringExtensionSelect + Ctrl+I and the ideal workflow

The pragmatic answer:use both. The extension for quick and contextual edits within the editor. The terminal for long tasks, automation and analysis. You can have both running simultaneously without conflict.

Combined use in practice:use the extension for daily development (edits, tests, debug). Use the terminal for infrastructure tasks (deploy, migration, automation with /loop). The skills work on both, so you don't need to double setup.

Next step: install skills and see the difference

You already know the basics. Now imagine Claude Code knowing how to do all this himself — SEO, copywriting, code review, deployment, data analysis. That's what skills do. Lifetime access, updates included.

Ver o Mega Bundle — $9
SPECIAL OFFER — LIMITED TIME

The Largest AI Skills Package on the Market

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

748+
Professional Skills
Marketing, SEO, Copy, Dev, Social
12
GitHub Bonus Packs
8,107 skills + 4,076 workflows
100K+
AI Prompts
ChatGPT, Claude, Gemini, Midjourney
135
Ready-Made Agents
Automation, data, business, dev

Was $39

$9

One-time payment • Lifetime access • Free updates

GET THE MEGA BUNDLE NOW

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

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

FAQ

The main functionality is identical -- the same Claude Code runs on both. The difference is the interface. In the terminal, you have a purely command-line experience. In the VS Code extension, you have visual integration: Claude appears in a side panel, can reference open files, and edits are applied directly to the editor files with visual diff. The terminal is faster for those who prefer CLI; the extension is more visual and integrated into the editor's workflow.

No. The VS Code extension is free. You use the same plan as Claude Code (Max or Anthropic's API). If you already have access to Claude Code on the terminal, you can use the extension at no additional cost. Token consumption is the same, regardless of whether you use a terminal or extension.

Yes. Skills (files in.claude/commands/) work in both the terminal and the VS Code extension. You configure the skills once and they are available in both environments. In the extension, you can invoke skills directly from the chat panel using/nome-da-skill. The package ofskills dev from minhakills.ioworks in both environments without any additional configuration.

Share este artigo X / Twitter LinkedIn Facebook WhatsApp
PTENES