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

Context Link

UberKaeL

|
3 installs
| (0) | Free
Copy file path with line references in Claude (@path/file#L10-20) or OpenCode (path/file:10-20) format for sharing code context with AI assistants
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Context Link (VSCode Extension)

VS Code Marketplace

Context Link Icon

Simple VSCode extension to:

Copy to the clipboard file paths with line references to use as context with AI assistants like Claude, OpenCode etc.

Features

  • Copy file path with line references in one keystroke
  • Support for both Claude and OpenCode formats
  • Works with selections or entire files
  • Context menu integration

Usage

  1. Open a file in VS Code
  2. Select lines (optional)
  3. Press Ctrl+Alt+U (Windows/Linux) or Cmd+Alt+U (macOS)
  4. The context link is copied to clipboard

Output Formats

Format No Selection Single Line Line Range
Claude @path/file @path/file#L10 @path/file#L10-20
OpenCode @path/file path/file:10 path/file:10-20

Extension Settings

This extension contributes the following settings:

  • contextLink.format: Output format for the context link
    • claude (default): Claude format with @ prefix and #L for lines
    • opencode: OpenCode format with : for line references
  • contextLink.showNotification: Show a notification when the context link is copied (default: false)
  • contextLink.pathType: Path type for the context link
    • relative (default): Relative path from workspace root
    • absolute: Absolute file system path

Keyboard Shortcuts

Command Windows/Linux macOS
Copy Context Link Ctrl+Alt+U Cmd+Alt+U

Context Menu

Right-click in the editor and select "Copy Context Link" from the context menu.

Use with AI Assistants

Paste the copied link into your AI assistant to provide context:

Check the error handling in @src/utils/parser#L45-60

The AI assistant will understand the file path and line references, making it easier to discuss specific code sections.

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