Claude Code Assistant — VS Code Extension
An AI-powered code assistant that highlights syntax errors, suggests optimizations, and improves code performance using the Claude API.
Features
- 🔴 Syntax Error Detection — flags bugs and errors with red squiggles
- ⚡ Performance Analysis — spots slow patterns and suggests faster alternatives
- 💡 Optimization Suggestions — recommends cleaner, more efficient code
- 🔵 Code Quality Hints — catches readability and maintainability issues
- 📋 Problems Panel Integration — all issues appear in VS Code's built-in Problems panel (
Ctrl+Shift+M)
- 💾 Auto-analyze on Save (optional) — analyze every time you save a file
Supported Languages
JavaScript, TypeScript, Python, Java, C, C++, C#, Go, Rust, PHP, Ruby, Swift, Kotlin
Setup Instructions
Step 1 — Install Prerequisites
Make sure you have:
Install the VS Code Extension CLI tool:
npm install -g @vscode/vsce
Step 2 — Get Your Anthropic API Key
- Go to https://console.anthropic.com
- Sign in or create a free account
- Navigate to API Keys → Create Key
- Copy the key (starts with
sk-ant-...)
Step 3 — Install the Extension
Option A: Install from folder (easiest for development)
- Open VS Code
- Press
Ctrl+Shift+P → type "Extensions: Install from VSIX..." or use the steps below
- Go to File → Open Folder and open the
claude-code-assistant folder
- Press
F5 to launch a new VS Code window with the extension loaded
Option B: Package and install as .vsix
cd claude-code-assistant
vsce package
code --install-extension claude-code-assistant-1.0.0.vsix
Step 4 — Add Your API Key
- In VS Code, go to File → Preferences → Settings (or
Ctrl+,)
- Search for "Claude Code Assistant"
- Paste your API key into the Api Key field
How to Use
Analyze the whole file
- Right-click anywhere in the editor → Claude: Analyze File for Issues & Optimizations
- Or press
Ctrl+Shift+P → Claude: Analyze File
Analyze selected code only
- Select some code
- Right-click → Claude: Analyze Selected Code
View results
- Red/yellow squiggles appear inline on the affected lines
- Open the Problems panel with
Ctrl+Shift+M to see all issues
- Hover over a squiggle to read the suggestion
Auto-analyze on save
In Settings, enable Claude Code Assistant: Auto Analyze On Save
Clear all markers
Ctrl+Shift+P → Claude: Clear All Diagnostics
Settings Reference
| Setting |
Default |
Description |
claudeAssistant.apiKey |
(empty) |
Your Anthropic API key |
claudeAssistant.autoAnalyzeOnSave |
false |
Auto-run analysis on every save |
claudeAssistant.model |
claude-sonnet-4-20250514 |
Claude model to use |
Troubleshooting
"Claude API key not set" — Follow Step 4 above to add your key in Settings.
"Language not supported" — The extension supports the most common languages. Open an issue to request more.
No squiggles appearing — Check the Problems panel (Ctrl+Shift+M). If it's empty, Claude may have found no issues — that's good!
API errors — Make sure your API key is valid and your Anthropic account has credits.
Project Structure
claude-code-assistant/
├── src/
│ └── extension.js ← Main extension logic
├── package.json ← Extension manifest & config
└── README.md ← This file