Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Context CollectorNew to Visual Studio Code? Get it now.
Context Collector

Context Collector

Krishna Gupta

| (0) | Free
Capture multiple code selections with file paths & line numbers as context for Claude Code — like Cursor's Antigravity feature.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Context Collector

A VSCode extension that replicates Cursor's Antigravity feature — select code, press a key, and accumulate multiple snippets as formatted context for Claude Code.

How it works

  1. Select any code in the editor
  2. Press Ctrl+Shift+L (Cmd+Shift+L on Mac) to capture it
  3. Repeat for as many snippets as you want
  4. Open the panel (Ctrl+Shift+;) and click Copy Context
  5. Paste into your Claude Code chat

The copied context looks like this (ready for Claude Code to understand):

// extension/src/extension.ts (lines 10–25)
function handleCapture() { ... }
// scripts/utils.py (line 42)
def process_data(items): ...

Setup (dev / local install)

cd extension
npm install
npm run compile

Then press F5 in VSCode to launch the Extension Development Host.

To install permanently, package it:

npm install -g @vscode/vsce
vsce package          # produces context-collector-0.1.0.vsix
code --install-extension context-collector-0.1.0.vsix

Keybindings

Action Default
Capture selection Ctrl+Shift+L / Cmd+Shift+L
Open panel Ctrl+Shift+; / Cmd+Shift+;

Change the capture keybinding

Option A — from the panel: Click the Keybinding button in the panel header.

Option B — manually:

  1. Open File > Preferences > Keyboard Shortcuts (Ctrl+K Ctrl+S)
  2. Search for Context Collector: Capture Selection
  3. Click the pencil icon and press your preferred key combo

Commands

All commands are available via Ctrl+Shift+P:

  • Context Collector: Capture Selection — add current selection
  • Context Collector: Open Panel — show/focus the context panel
  • Context Collector: Clear All Snippets — wipe all captured snippets
  • Context Collector: Configure Keybinding — open keybinding editor

Settings

Setting Default Description
contextCollector.showNotificationOnCapture true Show toast after each capture
contextCollector.copyFormat markdown markdown = fenced code blocks, plain = raw text

File structure

extension/
├── src/
│   └── extension.ts    # all logic + webview UI
├── out/                # compiled JS (generated)
├── package.json
├── tsconfig.json
└── .vscodeignore

Install permanently

Install permanently as a .vsix

npm install -g @vscode/vsce
vsce package      # produces context-collector-0.1.0.vsix
code --install-extension context-collector-0.1.0.vsix

run below command in new windows powershell, it should reutrn like

# Open Start Menu → search "PowerShell" → open it (outside VS Code)
code --install-extension "C:\Users\Krishna Gupta\Desktop\Context-gpt\extension\context-collector-0.1.0.vsix"
  • Note if facing problem using the vscode terminal ->

Using the extension

Action Shortcut
Capture selection Ctrl+Shift+L / Cmd+Shift+L
Open panel Ctrl+Shift+; / Cmd+Shift+;
All commands Ctrl+Shift+P → type "Context Collector"

Customizing keybindings in VSCode

Once installed, you can change any shortcut via VSCode's built-in keybinding editor.

How to find them:

  1. Press Ctrl+K then Ctrl+S to open Keyboard Shortcuts
  2. Search by command ID or display name:
Display Name Command ID Default Key
Context Collector: Capture Selection contextCollector.capture Ctrl+Shift+L
Context Collector: Open Panel contextCollector.openPanel Ctrl+Shift+;
  1. Click the pencil icon next to any command and press your preferred key combo

Note: The capture shortcut only fires when editorTextFocus && editorHasSelection — so it won't conflict with other shortcuts unless you also have text selected.

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