Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Claude AI AgentNew to Visual Studio Code? Get it now.
Claude AI Agent

Claude AI Agent

HuynhLeVu

|
5 installs
| (0) | Free
The most powerful free AI coding agent for VS Code — Claude-powered agentic tool use, multi-file editing, diff preview, git integration, inline chat, auto-complete, and extended thinking.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

🤖 Claude AI Agent for VS Code

The most powerful AI coding agent for VS Code — powered by Claude.

Version VS Code License Model Installs


🆕 What's New in v1.2.0

🎯 .clauderules File Support

Customize Claude for each project! Create a .clauderules file in your workspace root to define project-specific AI behavior, coding standards, and restrictions. Auto-loads on startup, watches for changes. Similar to Cursor's .cursorrules.

Quick start: Ctrl+Shift+P → "Claude: Create .clauderules File"

⚡ Model Selector UI

Quick model switching right in the chat header! Dropdown with 6 Claude models (Sonnet, Opus, Haiku + dated versions). Change models in 2 clicks, no need to open Settings.

🔍 Chat History Search

Find old conversations instantly! Search box in sidebar lets you filter through hundreds of chats by title or date. Instant filtering, Escape to clear.

💰 Cost Calculator

Know what you're spending! Real-time $ cost display for every message. Shows per-message cost and session total. Color-coded warnings for expensive queries (green <$0.10, red >$0.10).

⚙️ Quick Settings Panel

Beautiful modal with 7 key settings (model, thinking, tools, safe mode, auto scroll, tokens, compact). Click ⚙️ icon in header, change settings, save — all in 5 seconds!

⚡ Performance Improvements

10-20× faster startup! Fixed all blocking issues. Extension now activates in <200ms (was 2-4s). No more "Window is not responding" errors.

📖 Full Release Notes · 🧪 Testing Guide

✨ Features

🧠 Full Agentic Loop

Claude doesn't just answer — it acts. Give it a task and it will autonomously read files, run commands, edit code, check for errors, and iterate until the job is done.

🛠️ 22+ Built-in Tools

Tool Description
bash Execute shell commands (npm, git, pip, cargo...)
read_file Read files with partial line support
write_file Create/overwrite files with diff preview
write_file_chunked Write large files in chunks (no size limits)
replace_in_file Surgical text replacement with diff preview
list_dir Browse directory structure
search_files Regex search across all workspace files
find_files Glob pattern file finder
web_fetch Fetch and parse web content
get_diagnostics Read VS Code errors & warnings
get_selection Access currently selected text
get_open_files List all open editor tabs
get_git_status Git branch, diffs, commit history
get_project_structure Full project overview + tech stack
get_file_info File metadata (size, lines, language)
get_symbols Extract functions/classes/methods from files
run_tests Run test suites (auto-detects npm/pytest/cargo/go)
create_terminal Open VS Code terminal and run commands
format_document Format files with VS Code formatters
get_workspace_info VS Code version, settings, environment
list_checkpoints List file change history
rollback Undo file changes to any checkpoint

🔍 Diff Preview System

Every file write/edit shows a side-by-side diff before applying. Accept or reject changes with one click. Full checkpoint history for rollback.

🔒 Safe Mode

Automatically warns before running potentially destructive commands (rm -rf, DROP TABLE, format, etc.). You stay in control at all times.

💬 Chat Features

  • Sidebar chat with persistent history across sessions
  • Streaming responses with live token counter
  • Extended thinking mode (Claude thinks step-by-step)
  • Context files — pin any file to be included in every message
  • Image support — paste screenshots directly into chat
  • Chat export to Markdown
  • Collapsible tool call blocks — see exactly what Claude did

⌨️ Editor Integration

  • Right-click context menu on any selection:
    • Explain, Fix, Refactor, Add Tests, Add Docs, Inline Chat
  • Inline Chat (Ctrl+Shift+I) — edit code in place
  • AI Auto-complete — Tab-triggered suggestions
  • Smart status bar — model name + generation indicator
  • Git commit messages — AI-generated from your staged diff

🔁 Retry & Error Handling

  • 3 automatic retries on transient errors (network, rate limits, server errors)
  • Exponential backoff — 1s → 2s → 4s between retries
  • Friendly error messages — actionable guidance for auth/network/API errors

📦 Installation

Install from VS Code Marketplace (Recommended)

  1. Open VS Code
  2. Press Ctrl+Shift+X to open Extensions
  3. Search for "Claude AI Agent" or "HuynhLeVu"
  4. Click Install

Or install via command line:

code --install-extension HuynhLeVu.free-claude-vscode

Install from .vsix file

code --install-extension free-claude-vscode-1.2.0.vsix

Or in VS Code: Ctrl+Shift+P → Extensions: Install from VSIX... → select the file.


🚀 Quick Start

1. Set your API key

On first install, a setup guide appears automatically. Or run:

Ctrl+Shift+P → Claude: Set Anthropic API Key

Get your API key at console.anthropic.com → API Keys → Create Key

Keys start with sk-ant-api03-...

2. Open the chat panel

Click the Claude icon in the Activity Bar (left sidebar).

3. Start coding!

"Create a REST API in Express with user authentication and JWT"
"Find and fix all TypeScript errors in this project"
"Refactor this file to use async/await instead of callbacks"
"Run the tests and fix any failures"
"Generate a complete React dashboard with charts"

⌨️ Keyboard Shortcuts

Shortcut Action
Ctrl+Shift+I Inline Chat (edit selected code)
Ctrl+Shift+N New Chat
Ctrl+Shift+A Add current file to context
Ctrl+Shift+E Analyze & fix all errors
Ctrl+Shift+X Explain selection
Escape Stop generation

⚙️ Configuration

Open Ctrl+, and search for "Claude", or press Ctrl+Shift+P → Claude: Open Settings.

Setting Default Description
freeClaude.model claude-sonnet-4-5 Claude model to use
freeClaude.apiBase https://api.anthropic.com API base URL
freeClaude.apiKeyType anthropic Key type: anthropic or proxy
freeClaude.maxTokens 16384 Max output tokens per response
freeClaude.thinkingBudget 0 Extended thinking tokens (0 = off)
freeClaude.enableTools true Enable built-in tools
freeClaude.maxToolIterations 30 Max agentic loop iterations
freeClaude.enableDiffPreview true Show diff before file changes
freeClaude.safeMode true Warn before destructive commands
freeClaude.enableAutoComplete false AI Tab auto-complete
freeClaude.showTokenCount true Show token usage
freeClaude.autoSaveChat true Persist chat history
freeClaude.maxChatHistory 100 Max saved chat sessions
freeClaude.fontSize 13 Chat panel font size

Available Models

Model Speed Intelligence Best For
claude-sonnet-4-5 ⚡⚡⚡ ★★★★☆ Daily coding (recommended)
claude-opus-4-5 ⚡⚡ ★★★★★ Complex architecture & reasoning
claude-haiku-4-5 ⚡⚡⚡⚡ ★★★☆☆ Quick edits, auto-complete

💡 Tips & Tricks

Use Context Files

Pin important files (e.g. types.ts, schema.sql) so Claude always has context:

  • Right-click any file → Free Claude: Add File to Context
  • Or Ctrl+Shift+A in the editor

Extended Thinking

For complex architectural decisions, enable thinking mode:

  • Ctrl+Shift+P → Free Claude: Toggle Extended Thinking
  • Recommended budget: 10000–32000 tokens

Inline Chat

The fastest way to edit code:

  1. Select the code you want to change
  2. Press Ctrl+Shift+I
  3. Type your instruction — Claude edits in place with diff preview

Large File Generation

Claude automatically handles files of any size using chunked writing. Just ask naturally:

"Create a complete landing page in index.html"
"Generate a 500-line Express API with full CRUD operations"

Agentic Tasks

Claude works best with clear, specific goals:

✅ "Add input validation to all API endpoints in src/routes/"
✅ "Migrate this project from JavaScript to TypeScript"
✅ "Find all TODO comments and implement them"
❌ "Improve the code" (too vague)

Rollback

If Claude makes a mistake, you can undo:

  • Ctrl+Shift+P → Claude: Rollback File to Checkpoint
  • Or ask Claude: "Rollback the last change to src/index.ts"

🏗️ Project Structure

free-claude-vscode/
├── src/
│   ├── extension.ts        # Commands, keybindings, status bar, auto-complete
│   ├── chatViewProvider.ts # Webview provider, agentic loop, streaming
│   ├── apiClient.ts        # Anthropic API client with retry logic
│   ├── tools.ts            # 22+ built-in tools implementation
│   ├── diffManager.ts      # Diff preview & checkpoint system
│   └── auth.ts             # Secure token storage (VS Code SecretStorage)
├── webview/
│   ├── index.html          # Chat UI (dark/light/monokai/dracula themes)
│   └── icons/
├── package.json
├── CHANGELOG.md
└── README.md

🔧 Troubleshooting

❌ "Authentication failed (401)"

→ Run Ctrl+Shift+P → Claude: Set Anthropic API Key and re-enter your key.
→ Make sure freeClaude.apiKeyType is set to anthropic for official keys.

❌ "Connection refused" or "DNS error"

→ Check your internet connection.
→ Verify freeClaude.apiBase is https://api.anthropic.com.

❌ "Rate limited (429)"

→ Wait a few seconds — Claude will retry automatically (3× with backoff).

❌ Tool calls not working

→ Check that freeClaude.enableTools is true in settings.

❌ Diff preview not showing

→ Check that freeClaude.enableDiffPreview is true.

❌ Large file not writing completely

→ Claude uses write_file_chunked automatically for large files. If it stops mid-way, just say "continue" or "keep going".

❌ Build errors

cd free-claude-vscode
npm install
npm run compile

📄 License

MIT — free to use, modify, and distribute.


🙏 Credits

Built with:

  • Anthropic Claude API — AI backbone
  • VS Code Extension API — editor integration
  • TypeScript + Node.js

⬇️ Install from Marketplace · 📖 Documentation · 🐛 Report Issue

Made with ❤️ — Claude AI Agent v1.2.0

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft