editor-context
Installation
SKILL.md
Editor Context via one-ide-cli
Run the following to detect the current editor context:
one-ide-cli context /path/to/current/workspace
When to activate
Always run on the first coding turn of a new session — before answering, fetch context so the response is grounded in what the user actually has open.
Also activate when the question is code-adjacent and the active file is unknown. Trigger phrases include:
- explicit: "this file", "current file", "selected code", "what I have open"
- implicit: "this", "that", "it", "this field", "this function", "this class", "what does this mean", "explain this", "why is this"
Skip only when:
- The AI already has the file content or path in context (e.g. user pasted code directly)
- The question clearly refers only to pasted content with no ambiguity
Output
{
"activeProject": "/Users/you/project",
"activeFile": "/Users/you/project/src/main.ts",
"activeSelection": {
"startLine": 10,
"startColumn": 0,
"endLine": 20,
"endColumn": 5
},
"openedFiles": [
"/Users/you/project/src/main.ts",
"/Users/you/project/src/utils.ts"
],
"activeFileText": "...full file content...",
"activeSelectionText": "...selected text..."
}
activeFile— absolute path of the focused file,nullif no file is openactiveSelection— line/column range of selected text,nullif nothing is selectedactiveFileText— full content of the active file,nullif no file is openactiveSelectionText— the selected text,nullif nothing is selectedopenedFiles— all open editor tabs, empty array if none
Compatibility
Works with any IDE that has the One-IDE plugin installed: VS Code, Cursor, Windsurf, JetBrains IDEs (IntelliJ, WebStorm, PyCharm, etc.) and their forks.
If
one-ide-cliis not found, install it:npm install -g one-ide-cli
Other Commands
one-ide-cli active-project # workspace root of the active project
one-ide-cli active-file <project-path> # active file in the given project
one-ide-cli opened-files <project-path> # all open files in the given project (JSON array)
one-ide-cli ide # active IDE name (e.g. VSCode, IntelliJ IDEA)
one-ide-cli --help