tmux
它能做什么
这项技能让智能体查看并输入由 tmux 管理的终端会话内容。适合在持久终端中运行长时间或需要交互的命令行工具的开发者。
适用场景
- ✓当某个命令已经在 tmux 会话中运行,而你希望智能体检查其输出时。
- ✓当某个交互式命令行工具需要你回复一段文字时。
- ✓当你希望为一项持续运行的任务启动后台终端会话的时候。
技能链接
https://github.com/EKKOLearnAI/ekko-studio/blob/main/packages/ekko-agent/skills/tmux/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请检查名为 worker 的 tmux 会话,告诉我构建是否仍在运行。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会列出会话和窗格,读取屏幕上显示的内容,并在被要求时发送按键或文字。在没有弄清确认提示的作用之前,它不会批准该提示。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
tmux
Use for interactive commands that are already running in tmux or need a persistent terminal. Use normal terminal execution for one-shot commands.
Prerequisite
command -v tmux
If the command is absent, tell the user that tmux must be installed; do not silently install it.
Basics
tmux ls
tmux list-windows -t shared
tmux list-panes -t shared:0
tmux capture-pane -t shared:0.0 -p
tmux capture-pane -t shared:0.0 -p -S -
Targets use session:window.pane, for example shared:0.0.
Send input
Send literal text and Enter separately:
tmux send-keys -t shared:0.0 -l -- "Please continue"
tmux send-keys -t shared:0.0 Enter
Special keys:
tmux send-keys -t shared:0.0 C-c
tmux send-keys -t shared:0.0 C-d
tmux send-keys -t shared:0.0 Escape
Use -l -- for arbitrary text. Never approve a confirmation prompt until its target and consequences are understood.
Sessions
tmux new-session -d -s worker
tmux rename-session -t old new
tmux kill-session -t worker
Killing a session is destructive. Do it only when the user requested that outcome or the session was created solely for the current task and is no longer needed.
Helpers
skill_view returns this Skill's baseDirectory. Use it to run:
<baseDirectory>/scripts/find-sessions.shto discover sessions, including custom socket paths.<baseDirectory>/scripts/wait-for-text.shto wait until pane output contains a pattern.
capture-pane -p writes to stdout, -S - includes full scrollback, and tmux sessions persist across SSH disconnects.
常见问题
它会安装 tmux 吗?
不会。如果缺少 tmux,智能体会告诉你需要先安装,而不会悄悄安装。
它可以关闭会话吗?
可以,但只有在你明确要求时,或会话仅为当前任务而创建且已不再需要时才会关闭。
会话和窗格是如何命名的?
目标使用 session:window.pane 的格式,例如 shared:0.0。
详情
作者的原始描述
Control tmux sessions and panes for interactive CLIs: discover sessions, capture output, send keys, paste text, and monitor prompts.
repo: EKKOLearnAI/ekko-studio
热度
- GitHub 星标
- 12k
- 排名
- #11578
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
1password
12k帮你的智能体使用 1Password CLI 为命令和配置文件获取机密信息,同时不在聊天、日志或已保存的文件中显示这些信息。
apple-notes
12k帮你的智能体在 Mac 上使用 memo 命令行工具创建、搜索、阅读、编辑、移动或删除 Apple 备忘录。
apple-reminders
12k帮你的智能体在 Mac 上使用 remindctl 工具列出、创建、编辑、完成或删除 Apple 提醒事项及提醒列表。
document-to-action-items
12k帮你的智能体把文档、会议记录或一组笔记,整理成一张清晰的任务、负责人、截止日期和决定的表格。