一键导入
offloader
Use for dispatching a command from the current git repo to a remote machine in order to offload work for execution.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use for dispatching a command from the current git repo to a remote machine in order to offload work for execution.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create, locate, inspect, and safely remove linked Git worktrees. Use when the user wants an isolated branch checkout under a repository's .worktrees directory or needs to inspect or tear down an existing worktree.
Use when the user wants to run a long or resource-heavy task on another computer so their local machine stays free, the work continues if they close their laptop or lose connection, and the result returns as a reviewable branch in their project. Use this skill also when no offload target exists yet and the user needs help setting one up.
Use this to inspect long-running tasks the user dispatched to this machine through Offloader. This is relevant when the user asks about dispatched task status, dispatched task logs or output, whether a related command is still alive, or what branch/worktree a dispatched run used.
Use this to check or configure auth and config state on a remote device via a Offloader transport -- this is `offloader-configurator`.
Use when the user asks to view, open, test, share, or find the URL for a running web service or dev server from this environment. Convert localhost dev-server URLs through Nestail using Bash `$HOSTNAME`: `http://$HOSTNAME/<port>/<rest-of-url>`. If Nestail auth is enabled, generate an auth grant with `nestail token` instead of giving a plain URL.
Use when wrapping a running workflow with `vusperize` so a Hermes-backed LLM agent can receive live status updates and decide when to surface them to the user.
| name | offloader |
| description | Use for dispatching a command from the current git repo to a remote machine in order to offload work for execution. |
Use offloader when the user wants a command from the current git repository to run in a matching worktree on a remote target machine.
Run it from inside the source repository. Offloader pushes the current HEAD to the selected repo remote, pushes a run branch named offloader/<run-id>, reaches the target through a transport command, creates or safely fast-forwards a clean target worktree, and runs the requested command there. It refuses to overwrite a modified or diverged worktree; use a fresh run id unless deliberately resuming an untouched dispatch.
Typical usage:
offloader -- npm run dev
offloader -- npm run test
offloader -- bash scripts/start.sh --port 3000
offloader --command 'npm run dev'
OFFLOADER_COMMAND='npm run test' offloader
Offloader is provider-agnostic. It reaches the target through a transport: one local command that reads a script on stdin, runs it under bash -s on the remote, and forwards stdout, stderr, and exit status.
Set the transport with OFFLOADER_TRANSPORT or --transport. Multiple adapters ship with the project, and any command with the same stdin/stdout/stderr/exit-status contract can be used:
export OFFLOADER_TRANSPORT='offloader-ssh box.lab' # plain SSH
export OFFLOADER_TRANSPORT='offloader-tailscale box.lab' # Tailscale SSH
export OFFLOADER_TRANSPORT='offloader-fly --app my-app --machine 0123456789' # Fly.io
offloader -- npm run test
The adapter named in the transport must be on PATH. For SSH and Tailscale, the first argument is the host; extra args pass through to the adapter. Offloader has no default transport, so one must be set before launch.
The dispatched command runs in the foreground of the transport session and dies with it if the connection drops. Detach anything that should outlive the connection — long tests, dev servers, agentic runs — with setsid (nohup on targets without it, such as macOS); the dispatch then returns immediately and the run's output lands beside the worktree:
run_cmd=$(cat <<'CMD'
setsid bash -lc "<command>" > "${PWD}.log" 2>&1 < /dev/null &
echo "detached: pid ${!}, log ${PWD}.log"
CMD
)
offloader --command "${run_cmd}"
Dispatch plainly (no wrapper) only for short commands watched live, where stdout and the exit status should flow back through the transport.
Dispatches running at the same time — including from different agent sessions on the same local machine — use separate branches and worktrees keyed by run id. Let offloader generate the run id. If you set OFFLOADER_RUN_ID (or OFFLOADER_RUN_BRANCH, OFFLOADER_WORKTREE_NAME), keep it unique across live runs and lowercase — branch and directory names derive from it, and ids differing only by case collide on case-insensitive filesystems.
Before launching, confirm these are true:
OFFLOADER_TRANSPORT (or --transport), and the named transport command is installed.OFFLOADER_REPO_URL is set explicitly.If the repo has no remote, set OFFLOADER_REPO_URL. If the desired remote is not the current upstream or origin, set OFFLOADER_REMOTE_NAME.
OFFLOADER_REPO_ROOT sets the source repo root when $PWD is not enough.OFFLOADER_REPO_URL sets the remote URL pushed to and cloned from.OFFLOADER_REMOTE_NAME selects which local git remote to use.OFFLOADER_REPO_PATH overrides the target repo path segment under repos/.OFFLOADER_RUN_ID fixes the run id instead of generating one.OFFLOADER_WORKTREE_NAME overrides the target worktree directory name. By default it is derived from the run branch, so offloader/<run-id> becomes offloader-<run-id>.OFFLOADER_RUN_BRANCH overrides the pushed run branch.OFFLOADER_REMOTE_ROOT changes the target root, defaulting on the remote to ~/.remote-work.OFFLOADER_REMOTE_DIR and OFFLOADER_WORKTREE_DIR override the exact remote directories.OFFLOADER_COMMAND provides a shell command when not using --command or -- COMMAND.OFFLOADER_TRANSPORT sets the transport command; --transport overrides it per call.After dispatching, report:
offloader/<run-id>
~/.remote-work/repos/<repo-path>/.worktrees/offloader-<run-id>
For later status checks on the target machine, use the offloader-target skill.