[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B0P223ZACHY5X00R334RBY":3,"skill-same:01M7B0P223ZACHY5X00R334RBY":73},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":13,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":42,"install":43,"resources":56},"01M7B0P223ZACHY5X00R334RBY","codespace-vscode-open",null,"Auto-discover VS Code CLI in Codespaces and open files in connected editor","gitricko\u002F.minions","gitricko","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F18060558?v=4","01M7B0KG9EHG0CZ0QT1EN5YPCR","01M7B0KGA0ZV14R7SKBF3B5SCT",2,"MIT","https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Fcodespace-vscode-open\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: codespace-vscode-open\ndescription: Auto-discover VS Code CLI in Codespaces and open files in connected editor\nversion: 1.0.0\nauthor: Hermes Agent\nlicense: MIT\nplatforms: [linux]\nmetadata:\n  hermes:\n    tags: [codespace, vscode, editor, cli]\n    related_skills: [codespace-gh-auth, codespace-port-visibility]\n---\n\n# codespace-vscode-open\n\nAuto-discovers the VS Code remote CLI path in GitHub Codespaces (`\u002Fvscode\u002Fbin\u002Flinux-x64\u002F\u003Ccommit>\u002Fbin\u002Fremote-cli\u002Fcode`) and provides a simple command to open files in the user's connected VS Code instance.\n\n## Problem\n\nThe bare `code` command often fails in Codespaces because it's not on PATH or the shim is broken. The real CLI lives at a commit-specific path under `\u002Fvscode\u002Fbin\u002Flinux-x64\u002F`.\n\n## Solution\n\nA script that finds the CLI automatically and opens files. Works in any Codespace with VS Code connected.\n\n## Installation\n\n```bash\n# Run the install script to copy vscode-open.sh to ~\u002F.hermes\u002Fscripts\u002F\n~\u002F.hermes\u002Fskills\u002Fminions\u002Fcodespace-vscode-open\u002Fscripts\u002Finstall.sh\n\n# Or from the skill directory\nskills\u002Fcodespace-vscode-open\u002Fscripts\u002Finstall.sh\n```\n\nThe script is installed to `~\u002F.hermes\u002Fscripts\u002Fvscode-open.sh` by the install script.\n\n## Usage\n\n```bash\n# As a command\n~\u002F.hermes\u002Fscripts\u002Fvscode-open.sh \u002Fpath\u002Fto\u002Ffile.md\n\n# Or from skill dir\nskills\u002Fcodespace-vscode-open\u002Fscripts\u002Fvscode-open.sh \u002Fpath\u002Fto\u002Ffile.md\n```\n\n## How It Works\n\n1. Finds the **active VS Code server PID** (`pgrep -f \"server-main.js\"`)\n2. **Extracts commit SHA** from the server's command line to get the exact matching CLI\n3. **Fallback**: if commit SHA extraction fails, picks the newest `code` binary by mtime\n4. Executes the CLI with the provided file path — opens in the user's connected VS Code\n\nThis ensures we always use the CLI from the **active VS Code server**, not a stale version from a previous update.\n\n## Files\n\n- `scripts\u002Fvscode-open.sh` — Main executable script\n- `scripts\u002Finstall.sh` — Installs vscode-open.sh to `~\u002F.hermes\u002Fscripts\u002F`\n- `references\u002Fvscode-cli-discovery.md` — Discovery pattern and troubleshooting\n\n## Pitfalls\n\n| Pitfall | Symptom | Fix |\n|---------|---------|-----|\n| **Stale CLI selected** | File opens against old VS Code server, doesn't reach connected editor | Use active server's commit SHA (from `\u002Fproc\u002FPID\u002Fcmdline`) or fallback to newest by mtime |\n| **Script not installed** | `~\u002F.hermes\u002Fscripts\u002Fvscode-open.sh: No such file or directory` | Run `scripts\u002Finstall.sh` — it's not auto-linked like skills |\n| **VS Code not connected** | `VS Code server not running` error | Connect VS Code desktop to Codespace before running |\n| **Multiple VS Code versions** | Arbitrary `find \\| head -1` picks wrong version | Sort by mtime (`-printf \"%T@ %p\\n\" \\| sort -n \\| tail -1`) |\n\n## Related Skills\n\n- `codespace-persistent-symlinks` — Same symlink pattern for persisting scripts to `~\u002F.hermes\u002Fscripts\u002F`\n- `codespace-gh-auth` — GitHub auth in Codespaces (token extraction from VS Code server)\n- `codespace-port-visibility` — Port forwarding in Codespaces\n\n## Mnemon Persistence\n\nThis skill follows the repo's persistent knowledge pattern:\n1. Skill in `skills\u002Fcodespace-vscode-open\u002F` (git-tracked)\n2. Script symlinked to `~\u002F.hermes\u002Fscripts\u002Fvscode-open.sh` (runtime)\n3. Wiki article in `..\u002Fwiki\u002Fvscode-cli-codespaces.md`\n4. Mnemon entry in `mnemon\u002Fseed.json` (validated via `mnemon import --dry-run`)\n\nThe `start-hermes.sh` repair guard (from `codespace-persistent-symlinks`) ensures the symlink survives rebuilds.","# codespace-vscode-open\n\nAuto-discovers the VS Code remote CLI path in GitHub Codespaces (`\u002Fvscode\u002Fbin\u002Flinux-x64\u002F\u003Ccommit>\u002Fbin\u002Fremote-cli\u002Fcode`) and provides a simple command to open files in the user's connected VS Code instance.\n\n## Problem\n\nThe bare `code` command often fails in Codespaces because it's not on PATH or the shim is broken. The real CLI lives at a commit-specific path under `\u002Fvscode\u002Fbin\u002Flinux-x64\u002F`.\n\n## Solution\n\nA script that finds the CLI automatically and opens files. Works in any Codespace with VS Code connected.\n\n## Installation\n\n```bash\n# Run the install script to copy vscode-open.sh to ~\u002F.hermes\u002Fscripts\u002F\n~\u002F.hermes\u002Fskills\u002Fminions\u002Fcodespace-vscode-open\u002Fscripts\u002Finstall.sh\n\n# Or from the skill directory\nskills\u002Fcodespace-vscode-open\u002Fscripts\u002Finstall.sh\n```\n\nThe script is installed to `~\u002F.hermes\u002Fscripts\u002Fvscode-open.sh` by the install script.\n\n## Usage\n\n```bash\n# As a command\n~\u002F.hermes\u002Fscripts\u002Fvscode-open.sh \u002Fpath\u002Fto\u002Ffile.md\n\n# Or from skill dir\nskills\u002Fcodespace-vscode-open\u002Fscripts\u002Fvscode-open.sh \u002Fpath\u002Fto\u002Ffile.md\n```\n\n## How It Works\n\n1. Finds the **active VS Code server PID** (`pgrep -f \"server-main.js\"`)\n2. **Extracts commit SHA** from the server's command line to get the exact matching CLI\n3. **Fallback**: if commit SHA extraction fails, picks the newest `code` binary by mtime\n4. Executes the CLI with the provided file path — opens in the user's connected VS Code\n\nThis ensures we always use the CLI from the **active VS Code server**, not a stale version from a previous update.\n\n## Files\n\n- `scripts\u002Fvscode-open.sh` — Main executable script\n- `scripts\u002Finstall.sh` — Installs vscode-open.sh to `~\u002F.hermes\u002Fscripts\u002F`\n- `references\u002Fvscode-cli-discovery.md` — Discovery pattern and troubleshooting\n\n## Pitfalls\n\n| Pitfall | Symptom | Fix |\n|---------|---------|-----|\n| **Stale CLI selected** | File opens against old VS Code server, doesn't reach connected editor | Use active server's commit SHA (from `\u002Fproc\u002FPID\u002Fcmdline`) or fallback to newest by mtime |\n| **Script not installed** | `~\u002F.hermes\u002Fscripts\u002Fvscode-open.sh: No such file or directory` | Run `scripts\u002Finstall.sh` — it's not auto-linked like skills |\n| **VS Code not connected** | `VS Code server not running` error | Connect VS Code desktop to Codespace before running |\n| **Multiple VS Code versions** | Arbitrary `find \\| head -1` picks wrong version | Sort by mtime (`-printf \"%T@ %p\\n\" \\| sort -n \\| tail -1`) |\n\n## Related Skills\n\n- `codespace-persistent-symlinks` — Same symlink pattern for persisting scripts to `~\u002F.hermes\u002Fscripts\u002F`\n- `codespace-gh-auth` — GitHub auth in Codespaces (token extraction from VS Code server)\n- `codespace-port-visibility` — Port forwarding in Codespaces\n\n## Mnemon Persistence\n\nThis skill follows the repo's persistent knowledge pattern:\n1. Skill in `skills\u002Fcodespace-vscode-open\u002F` (git-tracked)\n2. Script symlinked to `~\u002F.hermes\u002Fscripts\u002Fvscode-open.sh` (runtime)\n3. Wiki article in `..\u002Fwiki\u002Fvscode-cli-codespaces.md`\n4. Mnemon entry in `mnemon\u002Fseed.json` (validated via `mnemon import --dry-run`)\n\nThe `start-hermes.sh` repair guard (from `codespace-persistent-symlinks`) ensures the symlink survives rebuilds.",{"name":5,"author":23,"license":14,"version":24,"metadata":25,"platforms":35,"description":7},"Hermes Agent","1.0.0",{"hermes":26},{"tags":27,"related_skills":32},[28,29,30,31],"codespace","vscode","editor","cli",[33,34],"codespace-gh-auth","codespace-port-visibility",[36],"linux","main","e95aec76487a22bbbc23b63234724bc7178d4692","skills\u002Fcodespace-vscode-open","https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions","https:\u002F\u002Fgithub.com\u002Fgitricko","2026-11-13 16:00:00",{"source":8,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add gitricko\u002F.minions --skill codespace-vscode-open",{"tool":49,"command":50},"bunx","bunx skills add gitricko\u002F.minions --skill codespace-vscode-open",{"tool":52,"command":53},"pnpm","pnpm dlx skills add gitricko\u002F.minions --skill codespace-vscode-open","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Fcodespace-vscode-open\u002FSKILL.md",true,[57,63,69],{"path":58,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Fvscode-cli-discovery.md","REFERENCE","参考文档",1816,"https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Fcodespace-vscode-open\u002Freferences\u002Fvscode-cli-discovery.md",{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},"scripts\u002Finstall.sh","SCRIPT","脚本",514,"https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Fcodespace-vscode-open\u002Fscripts\u002Finstall.sh",{"path":70,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":71,"sourceHtmlUrl":72},"scripts\u002Fvscode-open.sh",1285,"https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Fcodespace-vscode-open\u002Fscripts\u002Fvscode-open.sh",[74,81,88,95,102,109],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M7B0VJ3Q0YMCTJY69FEJ4100","version-single-source","Use when adding a new component dependency or versioning a binary in install\u002Fboot scripts.","https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Fversion-single-source\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M7B0V888DV8J3JY5W9Z6WCF3","tdd","Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions \"red-green-refactor\", or wants integration tests.","https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Ftdd\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":18},"01M7B0TVFM38JH3PBA2K219Z2X","shell-path-login","Use when a binary or script works in one shell context but not another (interactive vs non-interactive login vs non-login shell).","https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Fshell-path-login\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":18},"01M7B0TKFCTVQBTSNF9WF1MXJ6","self-update-fix","Fix a failing dependency update PR. Use when a self-update PR's CI fails, or when invoked by scripts\u002Fself-update-fix.sh.","https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Fself-update-fix\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":18},"01M7B0TB57WEW0E6E9874K3C72","pr-change-log","Use when a multi-commit PR needs its description written\u002Fupdated, or when closing out a long branch with many fix commits.","https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Fpr-change-log\u002FSKILL.md",[],[],{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":18},"01M7B0T2FGSV0ZFRZ46PG4BBY2","persistent-knowledge","Persistent skills\u002Fknowledge in Codespace via symlinks.","https:\u002F\u002Fgithub.com\u002Fgitricko\u002F.minions\u002Fblob\u002Fmain\u002Fskills\u002Fpersistent-knowledge\u002FSKILL.md",[],[]]