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
- Select any code in the editor
- Press
Ctrl+Shift+L (Cmd+Shift+L on Mac) to capture it
- Repeat for as many snippets as you want
- Open the panel (
Ctrl+Shift+;) and click Copy Context
- 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:
- Open
File > Preferences > Keyboard Shortcuts (Ctrl+K Ctrl+S)
- Search for
Context Collector: Capture Selection
- 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:
- Press
Ctrl+K then Ctrl+S to open Keyboard Shortcuts
- 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+; |
- 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.