open-in-vscode

Opens local Windows and WSL files in VS Code at a specified line and column.

Updated Aug 31, 2026
One-click install
npx skills add https://github.com/pikachu0310/codex-agent-ops-public --skill open-in-vscode-pikachu0310
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: open-in-vscode
Source: https://github.com/pikachu0310/codex-agent-ops-public/tree/main/.agents/skills/open-in-vscode
Command: npx skills add https://github.com/pikachu0310/codex-agent-ops-public --skill open-in-vscode-pikachu0310

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? When working in an AI chat environment, opening a specific local file in VS Code at an exact line normally requires manual navigation or fragile UI automation. This Skill launches VS Code directly from the command line, routing both Windows paths and WSL paths (including \wsl.localhost UNC paths) to the correct editor context without Computer Use. ## Core Features & Use Cases - Explicit-invocation boundary: Runs only when the user explicitly asks to open a file in VS Code, never merely because a document was created, updated, or reviewed. - Windows and WSL path routing: Detects Linux paths and WSL UNC paths, validates the distribution, file, and workspace, and opens them through the official Remote - WSL extension. - Line and column targeting: Passes --goto coordinates so the editor tab opens at the relevant line and column while reusing an existing window. - Use Case: After reviewing a generated Markdown report, you ask to open it in VS Code at line 12; the helper validates the file and workspace, then opens the tab at that exact position. ## Quick Start Ask the assistant to open a specific file in VS Code at a given line, for example by saying to open C:\path\to\document.md in VS Code at line 12.

Frequently Asked Questions about open-in-vscode

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

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

Use the VS Code CLI with the --goto flag, passing the file path followed by line and column, such as code --goto file.md:12:1. This Skill's PowerShell helper wraps that call and adds validation for the file, workspace, and editor installation.

How do I open WSL files in VS Code from Windows?

Run the code command inside the WSL distribution so the Remote - WSL extension handles the session. The helper accepts Linux paths or \\wsl.localhost UNC paths, verifies the distribution and file exist, then invokes code --reuse-window with --goto inside WSL.

Does opening WSL files in VS Code require the Remote - WSL extension?

Yes, the official ms-vscode-remote.remote-wsl extension is required for WSL targets. The helper checks the installed extension list and fails with a clear error if Remote - WSL is missing rather than attempting a fallback.

Why does VS Code not appear after opening a WSL file?

A brief foreground change during the initial VS Code or Remote - WSL connection is normal. If the expected WSL window never appears, inspect code --status and the Remote - WSL log instead of retrying through UI automation.

When should this Skill not be used to open files?

Do not invoke it merely because a document was created, updated, or reviewed; it runs only on an explicit user request to open a file in VS Code. It also avoids Computer Use for known paths, reserving UI control for actions the CLI cannot perform.