| title | Claude Code Setup Guide |
|---|---|
| description | Step-by-step installation and configuration of Claude Code for development |
| created | 2026-07-26 |
| updated | 2026-07-26 |
| type | guide |
A comprehensive guide to installing, configuring, and using Claude Code in your development workflow.
Claude Code is an official AI-powered development assistant for VS Code that helps with code generation, refactoring, debugging, and project-wide analysis. It integrates Claude's capabilities directly into your editor.
Key Features:
- Multi-file project analysis and code generation
- Intelligent debugging and error diagnosis
- Refactoring suggestions and automated improvements
- Documentation generation and standards enforcement
- Natural language code search across projects
- Built-in terminal for running commands
- Git integration and commit message generation
- VS Code: Version 1.86 or higher
- Operating System: macOS (Apple Silicon or Intel), Windows (10/11), or Linux (Ubuntu 18.04+)
- Internet Connection: Required for API calls to Claude
- Claude API Access: Active Anthropic API key (paid account required)
- Open VS Code
- Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
- Search for "Claude Code" (published by Anthropic)
- Click Install
- Wait for installation to complete (usually 30 seconds)
- After installation, you'll see a "Sign In" button in the VS Code sidebar
- Click "Authenticate with Claude Code"
- Your browser will open to claude.ai
- Sign in with your Anthropic account (create one if needed)
- Allow Claude Code to access your account
- Return to VS Code—you should be authenticated
If you prefer direct API key authentication:
- Open VS Code Settings (Code → Preferences → Settings)
- Search for "Claude Code API Key"
- Paste your API key from console.anthropic.com
- Save settings (Cmd+S / Ctrl+S)
Open VS Code Settings (Command Palette: Cmd+Shift+P → "Preferences: Open Settings") and configure:
| Setting | Value | Purpose |
|---|---|---|
claude.model |
claude-opus-5 or claude-sonnet-5 |
Choose reasoning capability |
claude.context-window |
200000 |
Max tokens per request |
claude.temperature |
0.7 |
Creativity level (0=precise, 1=creative) |
claude.project |
Your repo name | Tag requests by project |
claude.workspace-mode |
true |
Enable multi-file analysis |
- ESLint — Real-time linting feedback
- Prettier — Code formatting
- GitLens — Enhanced git integration
- GitHub Copilot — Complementary inline suggestions
Claude Code works best when it understands your project structure:
mkdir -p .claude
touch .claude/claude.jsonCreate .claude/claude.json:
{
"name": "Your Project Name",
"description": "Brief description of what this project does",
"language": "typescript",
"framework": "react",
"entry-points": [
"src/index.ts",
"src/App.tsx"
],
"documentation": "docs/",
"coding-standards": ".github/CLAUDE.md"
}Claude Code will automatically read:
.claude/CLAUDE.md— Project-specific rules.github/CLAUDE.md— Organization rulesREADME.md— Project overview
Open Command Palette (Cmd+Shift+P / Ctrl+Shift+P) and type:
| Command | Purpose |
|---|---|
Claude: Ask Claude |
General chat with Claude |
Claude: Generate Code |
Create code from description |
Claude: Refactor Code |
Improve selected code |
Claude: Add Tests |
Generate test cases |
Claude: Document Code |
Generate JSDoc/docstrings |
Claude: Fix Error |
Debug selected error |
Claude: Run Command |
Execute shell commands |
Claude: Create Agent |
Build custom agent |
Select any code and right-click to:
- Ask Claude About Selection — Get explanation
- Generate from Template — Code generation
- Add Unit Tests — Test generation
- Explain Error — Error diagnosis
The Claude Code panel (left sidebar) offers:
- Chat — Direct conversation with Claude
- Files — Project file tree and search
- Terminal — Run commands, view output
- Agents — Run pre-built agents
- Settings — Extension configuration
-
Open Command Palette →
Claude: Generate Code -
Describe what you need:
Create a React hook that manages form state with validation. Should handle text, email, and checkbox inputs. -
Claude generates the code
-
Review and accept (or iterate)
-
Code is pasted at cursor or in new file
- Select the error message or problematic code
- Right-click → Explain Error
- Claude analyzes the error and suggests fixes
- Accept the fix or ask follow-up questions
- Test your changes
- Select a function or component
- Right-click → Generate from Template
- Choose Unit Tests
- Claude generates test cases
- Review coverage and adjust as needed
-
Open Claude Chat (sidebar)
-
Describe the refactor goal:
I need to refactor my authentication module to use environment variables instead of hardcoded secrets. What's the safest approach? -
Claude analyzes your files and provides a plan
-
Execute the changes one step at a time
-
Commit after verification
Claude Code can edit multiple files in a single request:
-
Open Claude Chat
-
Ask for changes across files:
Add TypeScript types to all JavaScript files in src/utils/. Use strict typing with no implicit any. -
Claude identifies affected files and shows a changeset
-
Review and accept all changes at once
Create custom agents for repetitive tasks:
- Command Palette →
Claude: Create Agent - Define the agent:
- Name: e.g., "Test Coverage Analyzer"
- Description: What it does
- Trigger: When to run (manual, on save, on push)
- Instructions: Detailed behaviour rules
- Save your agent to
.claude/agents/ - Run from Agents panel anytime
Claude proposes terminal commands for your approval before execution:
-
In Claude Chat, ask Claude to run a command:
Run npm test and show me which tests failed -
Claude proposes the command — review it before approving, especially for destructive or network-affecting operations (e.g.
rm -rf, deployments, database changes) -
Approve to execute; Claude shows the output and you can ask follow-up questions
Solution:
- Open Command Palette →
Claude: Sign Out - Sign out completely
- Restart VS Code
- Sign back in
- If still failing, generate an API key at console.anthropic.com and use Step 3 above
Solution:
- Check your Anthropic account for active subscriptions
- Verify your API key is current (regenerate if needed)
- Check usage limits in your account dashboard
- Consider upgrading your plan if quota is exceeded
Solution:
- Ensure VS Code is opened at project root (where
.git/orpackage.jsonis) - Run Command Palette →
Claude: Reload Context - Check
.claude/CLAUDE.mdor.github/CLAUDE.mdexists - Verify
.gitignoreisn't hiding important files
Solution:
- Check internet connection
- Reduce context window in settings (set to
100000instead of200000) - Ask Claude to use a faster model:
Claude: Select Model→ chooseclaude-haiku-4-5 - Close other heavy applications
- Try again in a few minutes (service may be under high load)
Solution:
- Open Extension Details (left sidebar → Claude Code → three dots)
- Click Disable → Close VS Code → Open → Enable
- If still failing, uninstall completely:
- VS Code: Extensions → Claude Code → Uninstall
- Restart VS Code
- Reinstall from marketplace
- Check VS Code version (must be 1.86+):
Code → About Visual Studio Code
- ✅ Use clear, specific prompts — "Add unit tests for the
calculateTotal()function with edge case coverage" - ✅ Review generated code before committing — AI isn't perfect
- ✅ Provide context — Include file paths, existing patterns, and constraints
- ✅ Use multi-file mode for related changes (refactors, migrations)
- ✅ Keep conversations focused — Start a new chat for unrelated topics
- ✅ Run tests after Claude generates code
- ✅ Save your custom agents to
.claude/agents/for reuse
- ❌ Don't trust generated secrets or credentials — Always verify
- ❌ Don't commit API keys in settings or code
- ❌ Don't skip security review for generated authentication code
- ❌ Don't ask for exact copies of proprietary code
- ❌ Don't use without understanding the generated code
- ❌ Don't ignore linting errors after generation
- Command Palette →
Claude: Help - Open Extension Details → Read the Docs (link to full documentation)
- Click Report Issue to file a bug
- Official Claude Code Documentation — Features and API
- Anthropic API Reference — Models, pricing, rate limits
- GitHub Issues — Known issues and workarounds
- Team Help: GitHub issues with label
[plugin-help] - Escalations: Contact Ash Shaw (ashley@lightspeedwp.agency)
- Enterprise Support: Available via Anthropic account manager
- Pair With GitHub Copilot — Set up complementary inline suggestions
- Compare All Plugins — Understand when to use each tool
- VSCode Workspace Setup — Optimize your editor configuration
- Plugin Troubleshooting — Resolve common issues
| Version | Date | Changes |
|---|---|---|
| 1.0 | 2026-07-26 | Initial setup guide for Claude Code v1.0+ |
Created as part of Phase 4: Plugin Adoption Strategy