code-pointer

Open files in VSCode at precise line and column positions.

1|Updated Nov 13, 2025
One-click install
npx skills add https://github.com/cadrianmae/claude-marketplace --skill code-pointer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-pointer
Source: https://github.com/cadrianmae/claude-marketplace/tree/main/plugins/code-pointer/skills/code-pointer
Command: npx skills add https://github.com/cadrianmae/claude-marketplace --skill code-pointer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Open files in VSCode at precise line (and optional column) positions to guide explanations, debugging, or code reviews.

Core Features & Use Cases

  • Open at line: code -g path/to/file.js:42
  • Open at line and column: code -g path/to/file.js:42:10
  • Best practices: use absolute paths, quote paths with spaces, validate file existence

Quick Start

Open at a specific location: code -g path/to/file.js:42

Frequently Asked Questions about code-pointer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I open a file at a specific line in VSCode from the command line?

Open files at precise line numbers using `code -g path/to/file.js:42`. This command launches VSCode and positions the cursor at line 42. For line and column positioning, use `code -g path/to/file.js:42:10` to jump to line 42, column 10. Use absolute paths and quote paths containing spaces for reliable navigation.

Can I use VSCode navigation to jump to exact locations during code reviews?

Yes. The `-g` flag with line and column syntax guides reviewers directly to code sections: `code -g file.js:42:10` opens the file with cursor at the specified position. This streamlines code review workflows by eliminating manual navigation and ensuring all reviewers reference the same location.

What's the best way to reference code locations in debugging workflows?

Use `code -g path/to/file.js:line:column` to open files at exact debugging locations. Validate file existence and use absolute paths beforehand. Optional window controls (`-n`, `-r`, `-w`) manage how VSCode opens the file, making it ideal for automated debugging workflows and documentation references.

How do I navigate TODOs and inline documentation across configuration files?

The `-g` flag works across any file type—source code, configs, and documentation. Combine absolute path resolution with line targeting: `code -g config.yml:15` jumps directly to the TODO or reference. Quote paths with spaces; validate existence to avoid errors in navigation workflows.

Does this approach work with paths containing spaces or special characters?

Yes, provided you quote the file path. For example: `code -g "path/with spaces/file.js:42"`. Path quoting prevents shell interpretation errors. Always use absolute paths and validate file existence before constructing the command to ensure reliable cursor positioning.

What are the limitations when opening files at line positions in VSCode?

The command requires valid absolute paths and existing files; non-existent files will fail silently or open VSCode without cursor positioning. Column positioning works only for valid line numbers. Window controls (`-n`, `-r`, `-w`) affect display behavior but cannot override VSCode's default file-handling rules.