code-pointer
Code Pointer
Quick Example
code -g src/publisher.py:36
# Opens publisher.py at line 36 in VSCode
Overview
Open files in VSCode at precise line (and optionally column) positions using the code CLI. Use this skill whenever pointing users to specific locations in code, configuration files, documentation, or any text file.
When to Use
Invoke this skill automatically when:
- Explaining code: Showing specific lines when discussing implementation
- Debugging: Pointing to error locations or problematic code sections
- Code reviews: Highlighting lines that need attention
- TODO navigation: Opening files at TODO(human) or other task markers
- Documentation references: Showing specific sections in config files or docs
- Teaching: Guiding users to exact locations for hands-on work
How to Use
Basic Syntax
Open file at specific line:
code -g path/to/file.js:42
Open file at line and column:
code -g path/to/file.js:42:10
Best Practices
1. Always validate file exists first:
if [[ -f "path/to/file.js" ]]; then
code -g path/to/file.js:42
else
echo "File not found: path/to/file.js"
fi
2. Use absolute paths for reliability:
# Convert to absolute path
ABS_PATH="$(cd "$(dirname "path/to/file.js")" && pwd)/$(basename "path/to/file.js")"
code -g "$ABS_PATH:42"
3. Quote paths with spaces:
code -g "my project/src/app.js:100"
4. Provide context to user:
echo "Opening publisher.py at line 36 (MQTT connection TODO)"
code -g PiPico/publisher.py:36
Common Patterns
Opening Multiple Locations
# Open several related files at their relevant sections
code -g src/publisher.py:36 -g src/subscriber.py:45
Window Control
# Open in new window (avoid disturbing current work)
code -n -g file.js:10
# Reuse existing window (add as new tab)
code -r -g file.js:10
Finding and Opening TODOs
# Search for TODOs, then open at found location
grep -n "TODO(human)" *.py
# Publisher has TODO at line 36
code -g publisher.py:36
Important Notes
Line and Column Numbering:
- Lines are 1-indexed (line 1 is the first line)
- Columns are 0-indexed (column 0 is the first character)
Path Resolution:
- Relative paths resolve from current working directory
- Absolute paths are more reliable for skills
- Paths with spaces must be quoted
Non-existent Files:
- VSCode will create empty file if path doesn't exist
- Position will be applied when user starts editing
Technical Reference
For detailed documentation, see:
references/cli_basics.md- Core syntax, line/column numbering, path handlingreferences/advanced_usage.md- Window control, multiple files, diff/mergereferences/troubleshooting.md- Common errors and solutionsreferences/integration_patterns.md- Best practices for scripts and automation
More from cadrianmae/claude-marketplace
datetime
Use the `date` command via Bash tool whenever you or the user mention time, dates, or temporal concepts. Verify current date/time before ANY temporal response, as environment context may be outdated. Parse expressions like "tomorrow", "next week", "3 days", "in 2 weeks", "next Monday at 3pm". Proactively invoke for deadlines, schedules, time-sensitive tasks, week numbers, or any date/time reference.
70pandoc
Automatically assist with Pandoc document conversions when user mentions converting markdown to PDF/DOCX/HTML or other formats. Validate YAML frontmatter, check dependencies (bibliography, images), and provide format-specific conversion guidance. Use when user asks about citations, academic papers, presentations, or document generation from markdown.
6update
Update the current development session with progress notes
5list
List all development sessions
5nvr-list
This skill should be used when the user asks to "list neovim instances", "show all nvim", "what neovim processes are running", "list all editors", "show all active neovim", or wants to see all running neovim instances across all projects.
5current
Show the current session status
5