agentleFS
diegoferigodiegoferigo/dotfiles/.agents/skills/opening-zed/SKILL.md

opening-zed

Skill4 starsChanged 21 days agoMITView on GitHub

Opens the Zed IDE on the current directory or worktree from an agent session, whether it runs locally or over SSH (also inside herdr panes). Locally it runs zed; over SSH it prints the zed ssh:// command to paste on the laptop. Use whenever the user asks to open, show or edit something in Zed, to open the IDE, the worktree or the project, or to get the command to open Zed against this remote machine, even if they do not name this skill. For a diff-only review use opening-hunk instead. Inside a Zed agent session use working-in-zed.

The file

Files
SKILL.md

Opening Zed

Zed is a GUI: it needs the user's desktop. In an SSH session the agent has no display, so it must never run zed itself there. The script decides.

Run

~/.agents/skills/opening-zed/scripts/open-zed.sh [--print] [path]
  • path defaults to the current directory and is resolved to the git toplevel, so a worktree opens as its own project.
  • --print only prints the command to paste on the laptop. Use it when the user asks for the command, not for the window.

The first output line is context: local or context: ssh. Report it, plus whatever the script printed, to the user.

What the script does

ContextAction
Localzed <path>
SSHPrints zed ssh://user@this-host/path to paste on the laptop

SSH is detected from SSH_CONNECTION, then from an sshd ancestor. In a herdr pane the variable can be missing or stale, so the host in the printed command can be wrong: say so if the user reports a failure.

Requirements and limits

  • --print and the SSH output are identical: the user runs the command on the laptop.
  • ZED_OPEN_REMOTE_HOST sets the host or ssh alias used in the URL, for when the laptop cannot resolve the address in SSH_CONNECTION. The port from SSH_CONNECTION is then not added: the alias carries its own.
  • The first project opened on a new server downloads the Zed server binary there, so it can take a while.
  • Zed has no native way to open its local UI from a remote shell. Opening it without copy and paste is a TODO in the script.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.