opening-in-ide
Purpose
Use this skill when the user wants to open a file or project in a supported IDE from the CLI, while preserving solution, project, or workspace context when possible.
Behavior
- Accept a file or directory path (default
.) and an optional line number. - When the user names a specific supported IDE, use the matching launcher only.
- When the user asks for a generic IDE:
- Run the installed-IDE detection script for the current platform.
- If no supported IDE is installed, report that none of the supported IDEs are available.
- If exactly one supported IDE is installed, use it without asking.
- If multiple supported IDEs are installed, ask the user which one to use.
- Prefer an interactive multi-choice prompt when the runtime supports it.
- Populate the choices from the detected installed IDEs instead of hardcoding a fixed set.
- If the runtime does not support interactive choices, ask a single concise text question listing the available installed IDEs.
- Do not guess when multiple valid installed IDEs are available and the user did not specify one.
- If the user explicitly requests an IDE that is not installed, return a clear error and do not fall back to another IDE.
- Launch the chosen IDE in non-blocking mode (fire-and-forget) so the terminal session is not held open.
IDE-specific behavior
Rider
- Walk upward from the target location to find the nearest directory containing one or more
*.slnfiles. - If a solution is found, open Rider with the solution and target path.
- If no solution is found, fall back to the nearest
*.csproj. - If neither is found, open the target directly.
- When multiple matching files exist in one directory, prefer the file whose basename matches the directory name; otherwise choose alphabetically.
WebStorm
- Walk upward from the target location to find the nearest directory containing
.idea. - If
.ideais found, open WebStorm with that directory as context. - If no
.ideaexists, fall back to the nearest JavaScript or TypeScript project root containing one of:package.json,pnpm-workspace.yaml,yarn.lock,package-lock.json,bun.lock,bun.lockb,tsconfig.json, orjsconfig.json. - If no project root is found, open the target directly.
- When opening a file at a line, use JetBrains
--linebehavior. - When opening a file without an explicit line number, still pass
--line 1intentionally as a WebStorm workaround because some WebStorm builds can fail to open the file otherwise. - If WebStorm fails to open a requested file when only project context is provided, retry by anchoring the file open to line
1.
VS Code Family
- Walk upward from the target location to find the nearest directory containing one or more
*.code-workspacefiles. - If a workspace is found, open the chosen editor with that workspace as context.
- If no workspace is found, fall back to the nearest
*.slnand use that file's directory as context. - If no solution is found, fall back to the nearest
*.csprojand use that file's directory as context. - If neither is found, open the target directly.
- When opening a file at a line, use
--gotobehavior. - When multiple matching files exist in one directory, prefer the file whose basename matches the directory name; otherwise choose alphabetically.
Scripts
Use:
- Linux/macOS IDE detection:
./skills/opening-in-ide/scripts/list-installed-ides.sh - Windows IDE detection:
./skills/opening-in-ide/scripts/list-installed-ides.ps1 - Linux/macOS Rider launcher:
./skills/opening-in-ide/scripts/open-in-rider.sh <path> [--line <n>] - Windows Rider launcher:
./skills/opening-in-ide/scripts/open-in-rider.ps1 <path> [--line <n>] - Linux/macOS WebStorm launcher:
./skills/opening-in-ide/scripts/open-in-webstorm.sh <path> [--line <n>] - Windows WebStorm launcher:
./skills/opening-in-ide/scripts/open-in-webstorm.ps1 <path> [--line <n>] - Linux/macOS VS Code launcher:
./skills/opening-in-ide/scripts/open-in-code.sh <path> [--line <n>] - Windows VS Code launcher:
./skills/opening-in-ide/scripts/open-in-code.ps1 <path> [--line <n>] - Linux/macOS Cursor launcher:
./skills/opening-in-ide/scripts/open-in-cursor.sh <path> [--line <n>] - Windows Cursor launcher:
./skills/opening-in-ide/scripts/open-in-cursor.ps1 <path> [--line <n>] - Linux/macOS Windsurf launcher:
./skills/opening-in-ide/scripts/open-in-windsurf.sh <path> [--line <n>] - Windows Windsurf launcher:
./skills/opening-in-ide/scripts/open-in-windsurf.ps1 <path> [--line <n>]
Examples:
./skills/opening-in-ide/scripts/list-installed-ides.sh./skills/opening-in-ide/scripts/open-in-rider.sh src/MyFile.cs --line 120./skills/opening-in-ide/scripts/open-in-webstorm.sh src/app.ts --line 42./skills/opening-in-ide/scripts/open-in-code.sh src/MyFile.cs --line 120./skills/opening-in-ide/scripts/open-in-cursor.sh src/MyFile.cs --line 120./skills/opening-in-ide/scripts/open-in-windsurf.sh src/MyFile.cs --line 120./skills/opening-in-ide/scripts/open-in-rider.ps1 ../skills/opening-in-ide/scripts/open-in-webstorm.ps1 ../skills/opening-in-ide/scripts/open-in-code.ps1 ../skills/opening-in-ide/scripts/open-in-cursor.ps1 ../skills/opening-in-ide/scripts/open-in-windsurf.ps1 .
Notes
- Current supported IDE identifiers are
rider,webstorm,code,cursor, andwindsurf. - The detection scripts print one installed IDE per line and succeed even when none are installed.
- Rider requires CLI availability on
PATH(rideron Unix-like systems;rider,rider.bat, orrider64.exeon Windows). - WebStorm requires CLI availability on
PATH(webstormon Unix-like systems;webstorm,webstorm.bat, orwebstorm64.exeon Windows). - VS Code requires CLI availability on
PATH(codeon Unix-like systems;codeorcode.cmdon Windows). - Cursor requires CLI availability on
PATH(cursoron Unix-like systems;cursororcursor.cmdon Windows). - Windsurf requires CLI availability on
PATH(windsurfon Unix-like systems;windsurforwindsurf.cmdon Windows). - When more IDEs are added later, keep the generic-selection flow data-driven: detect installed IDEs, present only valid installed options, and preserve the same interactive-choice-then-fallback behavior.
More from linksofteu/linksoft_skills
test-skill
Use this skill when the user asks whether LinkSoft Skills are working, including minor wording variations or typos. Reply only with the fixed verification message.
13openspec-workitem-enrichment
Use this skill when creating a new OpenSpec spec whose name follows `wi-<azure-devops-work-item-id>-<change-name>` so the spec can be enriched from Azure DevOps through Azure CLI, including parent hierarchy and comments, instead of manual re-entry.
5creating-linksoft-skills
Create or improve Agent Skills that follow the Agent Skills specification and LinkSoft repository conventions. Use this skill when designing a new skill, tightening scope, writing descriptions, structuring references or scripts, adding evals, or reviewing an existing skill for clarity, discoverability, and reuse.
4opening-in-rider
Opens a file or folder in JetBrains Rider using the nearest .sln or .csproj context when available. Use when the user asks to open code in Rider from the CLI.
2