VS Code Extensions
Copy for Claude

Copy for Claude

by Yusef-Ahmed

Copy filename and selected line range to clipboard for use with Claude Code

Downloads

67

Rating

5.0 / 5 (1)

Version

0.1.4

Last updated

Jun 22, 2026

A VS Code extension that copies file references — with or without selected code — directly to your clipboard, formatted for use with Claude Code.

Features

Copy File & Lines — copies a @workspace/path/to/file.ts:line reference so Claude Code can jump straight to the location.

Copy File, Lines & Code — copies the same reference plus the selected code wrapped in a fenced code block, ready to paste into a Claude conversation.

Reference link navigation — recognize @workspace/path/to/file.ts:line references in text and click them to open the file with the specified line range selected. Use Ctrl+Click on Windows/Linux or Cmd+Click on macOS to follow the link.

Example output

Reference only:

@my-project/src/utils/auth.ts:42

Reference with code:

@my-project/src/utils/auth.ts:42-58

export function verifyToken(token: string): boolean {
  ...
}

Usage

Action Windows / Linux macOS
Copy reference Ctrl+Shift+C Cmd+Shift+C
Copy reference + code Ctrl+Shift+X Cmd+Shift+X

Both commands are also available in the editor right-click context menu under Copy for Claude.

Installation

Install from the VS Code Marketplace, or download the .vsix from the releases page and run:

code --install-extension copy-for-claude-*.vsix

License

MIT

Related extensions