VS Code Extension
The CodePeel VS Code extension brings AI-powered code review directly into your editor. It analyzes working changes, staged files, or full branch diffs before you push, posting findings as inline editor comments with one-click fixes. Reviews use the same analysis engine as GitHub PR reviews, and findings can be routed to any AI coding agent for automated resolution.
Installation
Available on the VS Code Marketplace (VS Code 1.85+). Also works with VS Code forks: Cursor, Windsurf, and other Electron-based editors.
From Marketplace
- Open Extensions panel (
Ctrl+Shift+X/Cmd+Shift+X) - Search CodePeel
- Click Install
- CodePeel icon appears in Activity Bar
From VSIX File
- Download
.vsixfrom releases - Command Palette → "Install from VSIX"
- Select downloaded file
Authentication
Sign in once with your CodePeel account. No API key required. Session persists across restarts via VS Code's secrets API.
Signing In
- Click CodePeel icon in Activity Bar
- Click Sign In
- Browser opens to CodePeel auth page
- Sign in with GitHub
- Browser confirms and auto-closes
Local HTTP server starts on random port for callback, shuts down immediately after token received.
Token Management
- Tokens stored securely via VS Code secrets API
- Auto-refreshed in the background so you stay signed in
- Rarely need manual re-authentication
Signing Out
Click Sign Out in sidebar or run CodePeel: Sign Out from Command Palette. Removes all stored tokens.
Review Modes
Three review modes, each analyzing a different scope. All generate same findings with inline comments, diagnostics, and fix suggestions.
Working Changes (Default)
Analyzes full changes on current branch: committed changes relative to target branch + uncommitted + staged files. Equivalent to PR diff.
git diff <target>...HEAD (committed)
git diff (unstaged)
git diff --cached (staged)
Staged Changes
Analyzes only git add staged files. Ideal for pre-commit review.
git diff --cached
Branch Diff
Full diff between current branch and target branch. Prompts for target branch (defaults to codepeel.targetBranch setting).
git diff <target>...HEAD
Diff Size Limit
Diffs capped at 500 KB. Larger diffs truncated with warning. For large changesets, use staged changes mode in smaller batches.
Running a Review
- Open Git-tracked project with changes
- Click CodePeel icon in Activity Bar
- Select review mode from sidebar
- Click Review Changes or
Ctrl+Shift+R/Cmd+Shift+R
Real-time progress streaming:
| Stage | What Happens |
|---|---|
| Setup | Git diff generated, .codepeel.yml read if present |
| Analyzing | Diff sent to review API, AI analysis runs |
| Reviewing | Results processed and displayed |
Findings appear in three locations:
- Inline comments on exact lines
- Problems panel (
Ctrl+Shift+M) with severity-mapped diagnostics - Sidebar with per-file breakdown, finding counts, severity indicators
Configuration File Support
If .codepeel.yml exists in workspace root, extension reads and sends it with review request. Custom rules, ignored paths, security patterns, and review profile applied to IDE reviews same as GitHub PR reviews. See Configuration.
Understanding Findings
Finding Structure
| Field | Description |
|---|---|
| Title | Short description of the issue |
| Severity | critical, high, medium, low |
| Type | bug, security, performance, architecture |
| Explanation | "What's happening", "Impact", "Recommendation" |
| Problem code | Specific code that triggered finding |
| Fix code | Suggested replacement (when available) |
| Why explanation | Educational context on underlying principle |
Severity Mapping to VS Code Diagnostics
| CodePeel Severity | VS Code Diagnostic | Problems Panel Icon |
|---|---|---|
| Critical | Error | Red circle |
| High | Warning | Yellow triangle |
| Medium | Information | Blue circle |
| Low | Hint | Lightbulb |
Stale Finding Detection
After review, extension monitors file changes. Modified flagged lines marked as "stale" (visually dimmed but still visible).
Applying Fixes
Every finding with fixCode can be applied directly.
Direct Application
Click Apply Suggested Fix on inline comment or Quick Fix lightbulb in Problems panel. Replaces problem code with fix, matching surrounding indentation.
Logic: find a matching range in the file by comparing the original problem code, then apply the suggested fix.
Fix with AI
Click Fix with AI on inline comment to route to your preferred AI coding agent. Extension builds structured prompt with file, line, severity, explanation, problem code, suggested fix, dispatches to configured agent.
Auto-detects installed agents. Multiple agents → quick pick menu. Single agent → used directly.
Fix All Issues
CodePeel: Fix All Issues (Command Palette) or wand icon in sidebar. Applies all available fixes sequentially with indentation adjustment.
Copy Suggestion
Click Copy Suggestion on inline comment to copy finding details and fix code to clipboard.
Fix with AI Agent Integration
Supported Agents
| Agent | Setting Value | How It Works |
|---|---|---|
| GitHub Copilot | native | Opens Copilot Chat with fix prompt |
| Cursor AI | native | Opens Cursor composer/chat |
| Claude Code Extension | claude-code-extension | Opens panel, copies prompt |
| Cline | cline | Sends via cline.addPromptToChat |
| Roo Code | roo | Opens Roo panel, copies prompt |
| Kilo Code | kilo-code | Sends via kilo-code.startNewTask or copies |
| Augment Code | augment | Opens Augment panel, copies prompt |
| Clipboard | clipboard | Copies structured prompt to clipboard |
Auto-Detection
Default codepeel.agentType = "native" scans for installed AI agents in VS Code.
Prompt Structure
Fix the following code review finding in my codebase:
File: src/lib/auth.ts
Line: 42
Severity: high
Type: security
Issue: Hardcoded API key in source code
Explanation:
Secrets hardcoded in source code can be extracted...
Problem code:
const API_KEY = "sk-1234567890abcdef";
Suggested fix:
const API_KEY = process.env.API_KEY;
Instructions:
- Open the file src/lib/auth.ts and navigate to line 42
- Apply the suggested fix, adapting to surrounding context
- Verify the fix doesn't break existing functionality
- Only fix this specific issue, don't refactor unrelated code
Context Menu Actions
Right-click selected code → CodePeel AI submenu:
| Action | Description |
|---|---|
| Explain Selection | Plain-English explanation of selected code |
| Fix Selection | Identifies bugs, generates fixes |
| Refactor Selection | Cleanup, optimization, modernization suggestions |
| Generate Tests | Test cases covering selected code |
| Ask AI | Free-form question about the code |
Right-click without selection → Review This File (focused review on active file).
All context menu actions send selected code + working diff to chat API. Responses in "CodePeel Chat" output channel as Markdown. Each action consumes 1 review from monthly quota.
Sidebar Interface
Webview-based panel with:
- Review controls — trigger, stop, clear review, mode selection
- Progress indicator — animated stage transitions
- Findings list — grouped by file, severity badges, expand/collapse
- Review history — past reviews with timestamps, finding counts, restore/delete
- Account — email, plan tier, credit usage
Review History
Persisted in workspace state, survives restarts. Each entry: mode, timestamp, finding count, full findings data. Click to restore findings as inline comments. Delete unneeded reviews. Run "Fix All" on historical review.
Credit Display
Sidebar footer shows plan tier and remaining reviews. Updates automatically after each review. CodePeel: Show Credit Balance for detailed breakdown.
Settings Sync
CodePeel: Sync Review Settings → quick pick menu:
| Setting | Description |
|---|---|
| Strict Mode | Stricter criteria, flags more issues |
| Security Only | Only security findings (skips bugs, performance, architecture) |
| Ignore Formatting | Suppresses style/formatting issues |
| Custom Instructions | Free-text applied to all reviews (e.g., "Focus on React best practices") |
| Ignored Paths | Glob patterns to exclude (e.g., dist/**, *.config.js) |
Changes immediately reflected on web dashboard and vice versa. Apply to both IDE and GitHub PR reviews.
Feedback and Learning
Marking Findings
Each inline comment has feedback buttons:
- Mark as Correct (thumbs up) — confirms finding valid, reinforces pattern
- Mark as Incorrect (thumbs down) — flags false positive, optional explanation → dismissed, AI learns to avoid similar flags
Learning Rules
Click Learn: Never flag this on any finding → permanent suppression rule stored on server, applied to all future reviews for this repository. Can include path patterns for directory-scoped suppression.
Learned rules visible in web dashboard under Learnings section.
How It Works
- Diff generation — Git provider runs
git diffper review mode (capped 500 KB) - Configuration loading — Reads
.codepeel.ymlfrom workspace root if present - API request — Diff, repo info, and config sent to the CodePeel review API
- Analysis — Same analysis pipeline as GitHub PR reviews: secret scanning, AI analysis, SAST, architecture review (unless
securityOnlyenabled) - Response processing — Findings normalized, explanations structured, why-explanations from pattern library
- Display — Inline comments via VS Code Comment API, diagnostics in Problems panel, sidebar grouped by file
- Credit deduction — Each review consumes 1 review from monthly quota. Sidebar updates automatically.
Retry Logic
- Up to 3 retries for server errors
- Auto-retry after rate limit using
Retry-Afterheader
Settings Reference
Configure via File > Preferences > Settings → search "CodePeel" or edit settings.json.
| Setting | Type | Default | Description |
|---|---|---|---|
codepeel.agentType | string | "native" | AI agent for "Fix with AI" |
codepeel.autoReviewMode | string | "prompt" | Behavior after file save: prompt, automatic, disabled |
codepeel.autoStartTask | boolean | true | Auto-start task for AI agents |
codepeel.targetBranch | string | "main" | Default base branch for branch diff mode |
codepeel.showInlineComments | boolean | true | Show findings as inline comments |
Auto-Review Modes
| Value | Behavior |
|---|---|
prompt | Notification asking if you want to review |
automatic | Automatically triggers review after save |
disabled | Never auto-reviews; manual trigger only |
Commands Reference
All via Command Palette (Ctrl+Shift+P):
| Command | Description |
|---|---|
CodePeel: Review All Changes | Trigger review of all changes |
CodePeel: Review Uncommitted Changes | Review only uncommitted working tree changes |
CodePeel: Review Committed Changes | Review only staged changes |
CodePeel: Stop Review | Cancel in-progress review |
CodePeel: Clear Review | Remove all findings from current review |
CodePeel: Fix All Issues | Apply all available fixes sequentially |
CodePeel: Show Review Summary | Display walkthrough summary in panel |
CodePeel: Show Credit Balance | Show current plan and remaining reviews |
CodePeel: Sync Review Settings | Open settings sync quick pick menu |
CodePeel: Sign In | Authenticate with CodePeel account |
CodePeel: Sign Out | Remove stored authentication tokens |
CodePeel: Collapse All Comments | Collapse all inline comment threads |
CodePeel: Expand All Comments | Expand all inline comment threads |
CodePeel: Settings | Open extension settings |
Keyboard Shortcuts
| Action | Shortcut |
|---|---|
| Review all changes | Ctrl+Shift+R / Cmd+Shift+R |
Additional shortcuts configurable in File > Preferences > Keyboard Shortcuts.
Troubleshooting
"No Git repository found"
Extension requires Git repo with at least one commit:
git init && git commit --allow-empty -m "init"
If opened subfolder, open root folder instead.
"Not authenticated. Please sign in."
Session expired or tokens cleared:
CodePeel: Sign Out- Restart VS Code
- Click Sign In in sidebar
If browser flow fails (firewall blocks localhost), check no other process using the random port.
"Rate limit exceeded"
Hit per-minute rate limit (20 requests/minute across all tiers). Extension shows wait time. Resumes automatically when slot opens. See rate limits or upgrade.
"Request timed out"
For very large diffs, reviews may time out. To avoid this:
- Use staged changes mode for smaller batches
- Split work into smaller commits
- Check network connection
Findings not appearing
- Verify
codepeel.showInlineComments=true - Ensure file is in Git diff (untracked files excluded)
- Check Output panel → CodePeel for errors
- File must be open in editor (inline comments only on open files)
"No changes found to review"
Git diff returned empty. Causes:
- All changes committed, selected "Staged changes"
- Target branch same as current branch
- No uncommitted changes, no commits ahead of target
Extension not detecting AI agent
- Set
codepeel.agentTypeexplicitly in settings - Ensure agent extension installed and enabled
- Restart VS Code after installing new agent
FAQ
Does the extension work offline? No. Requires internet for the CodePeel review API. All analysis runs on CodePeel's servers. The extension handles diff generation, auth, and display.
Works with Cursor, Windsurf? Yes. Compatible with any VS Code fork supporting Extension API 1.85+. "Fix with AI" detects Cursor's composer/chat for native integration.
How much does each IDE review cost? Each IDE review = 1 review from monthly quota (regardless of diff size). Different from GitHub PR reviews (1–5 based on diff size). See Billing.
Are code changes sent to external servers? Yes. Diff sent to the CodePeel review API. Processed by the review engine, not stored permanently after review. No code shared with third parties beyond the AI providers that power CodePeel.
Can I use extension without a GitHub account? Yes. Sign in with a GitHub account; you do not need to install the GitHub App to use the extension. The GitHub App is only needed for automatic PR reviews. The extension works with any Git repository (GitHub, GitLab, Bitbucket, Azure DevOps, self-hosted).
What languages supported? Any language in a Git diff. AI handles all major languages: TypeScript, JavaScript, Python, Go, Rust, Java, C#, Ruby, PHP, Swift, Kotlin, and more. Auto-detected from file extensions.
Related Documentation
- Billing — Plans, review quotas, rate limits
- Configuration —
.codepeel.ymlreference for custom rules and review settings - MCP Server — Programmatic access to same review engine from any AI agent