在 Manus 中运行任何 Skill
一键导入
一键导入
一键在 Manus 中运行任何 Skill
开始使用tmux
星标38
分支0
更新时间2026年2月9日 08:33
Remote-control tmux sessions for interactive CLIs
安装
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
SKILL.md
readonly菜单
Remote-control tmux sessions for interactive CLIs
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Be proactive - schedule follow-ups, reminders, and check-ins
Periodic self-assessment, goal tracking, and proactive improvement
Interact with GitHub using the `gh` CLI
Get weather forecasts using wttr.in (no API key required)
基于 SOC 职业分类
| name | tmux |
| description | Remote-control tmux sessions for interactive CLIs |
| always | false |
| triggers | ["tmux","terminal","session","multiplexer"] |
| requires | ["bin:tmux"] |
| metadata | {"pocketrb":{"emoji":"🧵","os":["darwin","linux"]}} |
Control tmux sessions via socket for isolated agent workspaces. This allows running and interacting with persistent terminal sessions.
Use a dedicated socket directory to avoid conflicts:
SOCKET_DIR="${POCKETRB_TMUX_SOCKET_DIR:-${TMPDIR:-/tmp}/pocketrb-tmux-sockets}"
mkdir -p "$SOCKET_DIR"
SOCKET="$SOCKET_DIR/pocketrb.sock"
# Create a new session
tmux -S "$SOCKET" new-session -d -s mysession
# Create session with initial command
tmux -S "$SOCKET" new-session -d -s mysession "irb"
# List sessions
tmux -S "$SOCKET" list-sessions
# Kill a session
tmux -S "$SOCKET" kill-session -t mysession
# Attach to session (interactive)
tmux -S "$SOCKET" attach -t mysession
# Send keys (commands) to a session
tmux -S "$SOCKET" send-keys -t mysession "ls -la" Enter
# Send literal text (no Enter)
tmux -S "$SOCKET" send-keys -t mysession -l "some text"
# Send special keys
tmux -S "$SOCKET" send-keys -t mysession C-c # Ctrl+C
tmux -S "$SOCKET" send-keys -t mysession C-d # Ctrl+D
tmux -S "$SOCKET" send-keys -t mysession Up # Arrow up
# Capture visible pane content
tmux -S "$SOCKET" capture-pane -p -t mysession
# Capture with history (last 200 lines)
tmux -S "$SOCKET" capture-pane -p -J -t mysession -S -200
# Capture to file
tmux -S "$SOCKET" capture-pane -p -t mysession > output.txt
# Send command
tmux -S "$SOCKET" send-keys -t mysession "ruby script.rb" Enter
# Wait for completion (simple approach)
sleep 2
# Capture output
tmux -S "$SOCKET" capture-pane -p -J -t mysession -S -50
# Start IRB session
tmux -S "$SOCKET" new-session -d -s ruby "irb"
# Send Ruby commands
tmux -S "$SOCKET" send-keys -t ruby "require 'pathname'" Enter
tmux -S "$SOCKET" send-keys -t ruby "puts Pathname.pwd" Enter
# Get output
sleep 1
tmux -S "$SOCKET" capture-pane -p -t ruby
# Start SSH session
tmux -S "$SOCKET" new-session -d -s remote "ssh user@host"
# Wait for connection, then send commands
sleep 3
tmux -S "$SOCKET" send-keys -t remote "ls -la" Enter
-l flag with send-keys for literal text to avoid interpretation-J flag in capture-pane joins wrapped lines-S -N in capture-pane to capture last N lines of history