teleport
它能做什么
它把任务从当前会话转移到另一台机器上的新会话。适用于希望在沙盒、云虚拟机或远程电脑上继续工作的 HumanLayer 用户。
适用场景
- ✓当你想在云端机器或沙盒中继续这项任务时。
- ✓当你当前的电脑不适合继续运行这项任务时。
- ✓当你希望新会话从交接文件和已推送的分支开始时。
技能链接
https://github.com/humanlayer/humanlayer/blob/main/apps/riptide-humanlayer-claude-plugin/skills/teleport/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请把这项任务转移到云虚拟机上,这样我离开时它也能继续运行。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会收集会话和分支的详细信息,先一次性问你一组问题,然后推送分支并写出交接文件。新会话从该文件开始。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Move this task to a new session on another host. Ask every question up front, then do the work without more check-ins. Keep messages short.
The remote session is a new session in the same task. It does not resume this conversation. It starts from handoff.md and the pushed branch.
1. Gather context, then ask once
Before asking anything, collect:
Stage: use
produnlessHUMANLAYER_SESSION_URLor the user points elsewhere.app.humanlayer.com= prod,app.codelayer.cloud= beta,app.dev.codelayer.gg= dev.Session, task, task slug, workspace, and host IDs, plus the coding agent, provider, model, effort, and permission mode: read them from the
<humanlayer_session>block in your system prompt.Task directory:
.humanlayer/tasks/<task-slug>/.Git: branch,
git status, and the remote to push to (for exampleoriginorupstream). If there is only one remote, use it.Saved defaults:
.humanlayer/teleport.json, if present.Project workspace, if the workspace ID is set. The new host builds its worktree from the workspace's branch on the project's remote, so read both:
humanlayer api project-workspaces get-status --task-id <task-id> > /tmp/hl-workspace.json jq -r '.workspace.projectId, (.workspace.repositories[] | [.repositoryIdentity, .remoteUrl, .branch, .default] | @tsv)' /tmp/hl-workspace.jsonPush to the git remote whose URL matches the project's
remoteUrl, not a fork. If more than one remote matches, ask.Secret files:
.envfiles, local settings, and keys that git does not carry. Find them and list their key names with references/secrets.md. Never print a value.
Then ask one message covering only what is still unknown:
- Compute:
- Sandbox: Freestyle, Daytona, E2B, Modal, or any other service that can run Linux
- Cloud VM: EC2, GCP, or another provider; new or existing
- Existing machine over SSH or Tailscale (for example a Mac mini)
- How to reach the host (SSH alias, user, provider account or project).
- Which agents to install and sign in: Claude Code, Codex, or both. Default to the agent running this session.
- Stage, if it is not clear.
- Which remote to push to, if there is more than one. List them and mark the branch's tracking remote, if any.
- Which secret files to copy. List each file with its key count and your advice (copy, skip, or ask), and flag keys that look tied to this machine or to production. Name keys; never show values.
If the worktree is dirty, say in the same message: "Uncommitted changes will be committed and pushed to <branch> before the move." Do not ask a separate question about it.
If the user gives reusable answers that are not in teleport.json, offer to save them in that same message.
2. Saved defaults
.humanlayer/teleport.json holds project defaults. The user's words in this session win over the file. Never save secrets, tokens, one-time codes, or session IDs. secretFiles holds paths only.
{
"stage": "prod",
"compute": "freestyle",
"host": "my-dev-vm",
"access": "freestyle-ssh",
"agents": ["claude"],
"daemonSupervisor": "systemd",
"secretFiles": [".env", "packages/db/.env"],
"notes": ["Persistent VM. Do not stop it after the move."]
}
3. Save the work
- Commit all changes and push the branch. Stop if a file looks like a secret (
.env, keys, credentials) or no writable remote exists, and tell the user the exact blocker.- For a project workspace, push to the project's remote. If the current branch is not the workspace branch, push both, and name the current branch in the session prompt. The new host starts from the workspace branch as pushed; unpushed commits stay behind.
- Write
.humanlayer/tasks/<task-slug>/handoff.mdwith everything the next agent needs:- goal and current status
- decisions made and why
- work done, work left, and the next step
- open questions and known problems
- key files and artifacts to read
- repo, branch, remote, and commit SHA
- source session URL
4. Prepare the host
Use the provider CLIs already signed in on this machine. Check --help when unsure. Do not stop or delete compute when done.
Run every interactive step in a named tmux session on the host (hl-auth, hl-claude, hl-codex, hl-gh, hl-daemon). Read the pane with tmux capture-pane -p, show the user any URL or code, and send their answers with tmux send-keys.
- Install missing tools:
tmux,git, Node
常见问题
新会话会记得这段对话吗?
不会。它从交接文件和已推送的分支开始,而不是从这段聊天开始。
它会问我几个问题?
它会一次性提前问完所有问题,然后不再打扰你,直接完成工作。
它使用哪个 HumanLayer 环境?
除非提供会话地址或你指定其他环境,否则使用生产环境。
详情
作者的原始描述
Move the current task to a new HumanLayer session on another host (sandbox, cloud VM, or a machine you can SSH into).
repo: humanlayer/humanlayer
热度
- GitHub 星标
- 13k
- 排名
- #11395
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
asd-ste100
13k教你的智能体把难懂的英文改写成短句、每句只有一个意思,方便人和其他软件阅读。
better-github-skill
13k帮你的智能体查看拉取请求的状态、阅读其审查评论,并借助现成的 GitHub 脚本找出 CI 构建失败的原因。
calldiff
13k帮你的智能体比较代码库中两个 git 版本之间的函数调用链,让代码审查能看出行为发生了什么变化。
chrome-devtools-cli
13k帮你的智能体通过终端控制 Chrome,打开页面、点击、填写表单,并截取页面快照,用于浏览器自动化和测试。