Token导航 LogoToken导航

Agent Skill · 研究检索

tmux(tmux 终端复用)

tmux 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

tmux 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为可写文件;许可证为 MIT,暂无第三方扫描结果,按安装量在研究检索类的 73,675 个 Skill 里排第 59,803。

总安装 376周安装 16GitHub Stars 公开资料未说明下载 132核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:tmux(tmux 终端复用)
来源仓库:https://github.com/knoopx/pi
仓库路径:skills/tmux
安装命令:
npx skills add knoopx/pi --skill "tmux"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add knoopx/pi --skill "tmux"

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于查找、检索和筛选相关信息,支持基于关键词的任务适配。适用于日常信息搜集、知识库查询等研究检索类场景。通过 npx skills add 命令从 GitHub 仓库安装,兼容 Codex、Claude 等宿主。使用前需确认权限范围与维护状态,避免触发不必要的联网操作。

建议结合原始 README 进一步核验具体功能与调用方式。

来源仓库内路径:skills/tmux

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add knoopx/pi --skill "tmux";命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要可写文件,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

tmux 怎么安装?

在终端执行 npx skills add knoopx/pi --skill "tmux"。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

tmux 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

tmux 需要什么权限?

权限级别是可写文件。该 Skill 可能写入或修改本地文件,使用前需要确认目标目录和修改范围。

tmux 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

tmux 用的人多吗?

公开数据是累计安装 376 次,近一周安装 16 次,下载 132 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

tmux 安全吗?

没有查到第三方扫描结果,安全性无法从公开资料判断,安装前请自行审查源码、依赖和命令行为。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 没有第三方扫描结果,安全性只能靠自己读源码判断。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 要求有安全扫描结论才肯安装的团队。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
tmux

tmux 终端复用 · 本页

376—可写文件MIT未收录

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
tmux
description
Spawn background processes, run interactive tools detached, and capture command output using tmux sessions. Use when running long-running commands, capturing output from background processes, or managing multiple concurrent tasks.

tmux Skill

Terminal multiplexer for background processes, output capture, and session management. Essential for headless/automated environments.

Contents

Quick Reference

CommandDescription
tmux new -d -s name 'cmd'Run command in background session
tmux capture-pane -t name -pCapture output from session
tmux send-keys -t name 'text' EnterSend input to session
tmux kill-session -t nameTerminate session
tmux lsList all sessions
tmux has -t nameCheck if session exists

Running Background Processes

Start a Detached Session

# Run a command in a new detached session
tmux new-session -d -s myserver 'python -m http.server 8080'

# With a specific working directory
tmux new-session -d -s build -c /path/to/project 'make build'

# Run shell command and keep session alive after completion
tmux new-session -d -s task 'command; exec bash'

Run and Wait for Completion

# Run command and wait for it to finish
tmux new-session -d -s job 'long-running-command'
tmux wait-for job-done  # Blocks until signaled

# In the command, signal completion:
tmux new-session -d -s job 'long-running-command; tmux wait-for -S job-done'

Capturing Output

Capture Pane Contents

# Capture visible output (prints to stdout)
tmux capture-pane -t mysession -p

# Capture entire scrollback history
tmux capture-pane -t mysession -p -S -

# Capture last N lines
tmux capture-pane -t mysession -p -S -100

# Capture specific line range (0 = first visible, negative = scrollback)
tmux capture-pane -t mysession -p -S -50 -E -1

# Save to file
tmux capture-pane -t mysession -p > output.txt

# Capture with escape sequences (preserves colors)
tmux capture-pane -t mysession -p -e

Pipe Output in Real-Time

# Pipe pane output to a file (real-time logging)
tmux pipe-pane -t mysession -o 'cat >> /tmp/session.log'

# Stop piping
tmux pipe-pane -t mysession

# Pipe to a processing command
tmux pipe-pane -t mysession -o 'grep --line-buffered ERROR >> errors.log'

Sending Input

Send Keys to Session

# Send text followed by Enter
tmux send-keys -t mysession 'ls -la' Enter

# Send special keys
tmux send-keys -t mysession C-c        # Ctrl+C
tmux send-keys -t mysession C-d        # Ctrl+D (EOF)
tmux send-keys -t mysession Escape     # Escape key
tmux send-keys -t mysession C-z        # Ctrl+Z (suspend)

# Send literal text (no key interpretation)
tmux send-keys -t mysession -l 'literal text with C-c in it'

# Send to specific window:pane
tmux send-keys -t mysession:0.0 'command' Enter

Interactive Automation

# Start interactive tool and send commands
tmux new-session -d -s repl 'python3'
sleep 1  # Wait for startup
tmux send-keys -t repl 'print("Hello")' Enter
sleep 0.5
tmux capture-pane -t repl -p

Session Management

Listing and Checking

# List all sessions
tmux list-sessions
tmux ls

# Check if session exists (exit code 0 if exists)
tmux has-session -t mysession && echo "exists"

# List windows in session
tmux list-windows -t mysession

# List panes in window
tmux list-panes -t mysession:0

Killing Sessions

# Kill specific session
tmux kill-session -t mysession

# Kill all sessions except current
tmux kill-session -a

# Kill server (all sessions)
tmux kill-server

# Kill specific window
tmux kill-window -t mysession:0

# Kill specific pane
tmux kill-pane -t mysession:0.1

Windows and Panes

Multiple Windows

# Create session with named window
tmux new-session -d -s dev -n editor 'vim'

# Add another window
tmux new-window -t dev -n server 'npm start'

# Switch between windows (when attached)
tmux select-window -t dev:0
tmux select-window -t dev:server

Split Panes

# Split horizontally
tmux split-window -t mysession -h 'command'

# Split vertically
tmux split-window -t mysession -v 'command'

# Target specific pane
tmux send-keys -t mysession:0.0 'top pane' Enter
tmux send-keys -t mysession:0.1 'bottom pane' Enter

Common Patterns

Run Command and Capture Output

#!/bin/bash
SESSION="task-$$"

# Start command
tmux new-session -d -s "$SESSION" 'your-command --args'

# Wait for completion (poll-based)
while tmux has-session -t "$SESSION" 2>/dev/null; do
    sleep 1
done

# Or with explicit signaling:
tmux new-session -d -s "$SESSION" 'your-command; tmux wait-for -S done-'"$SESSION"
tmux wait-for "done-$SESSION"

# Capture final output
OUTPUT=$(tmux capture-pane -t "$SESSION" -p -S -)
echo "$OUTPUT"

# Cleanup
tmux kill-session -t "$SESSION" 2>/dev/null

Monitor Background Process

SESSION="monitor"

# Start process with logging
tmux new-session -d -s "$SESSION" 'long-process 2>&1'
tmux pipe-pane -t "$SESSION" -o 'cat >> /tmp/process.log'

# Check status periodically
while tmux has-session -t "$SESSION" 2>/dev/null; do
    echo "Still running... Last output:"
    tmux capture-pane -t "$SESSION" -p | tail -5
    sleep 10
done

echo "Process completed"
cat /tmp/process.log

Run Interactive REPL

SESSION="python-repl"

# Start Python REPL
tmux new-session -d -s "$SESSION" 'python3 -u'  # -u for unbuffered
sleep 1

# Send commands
tmux send-keys -t "$SESSION" 'x = 42' Enter
tmux send-keys -t "$SESSION" 'print(f"Answer: {x}")' Enter
sleep 0.5

# Capture output
tmux capture-pane -t "$SESSION" -p

# Cleanup
tmux send-keys -t "$SESSION" 'exit()' Enter

Run Server with Health Check

SESSION="server"

# Start server
tmux new-session -d -s "$SESSION" 'python -m http.server 8080'

# Wait for server to be ready
for i in {1..30}; do
    if curl -s http://localhost:8080 > /dev/null; then
        echo "Server ready"
        break
    fi
    sleep 1
done

# ... use server ...

# Cleanup
tmux kill-session -t "$SESSION"

Parallel Task Execution

# Run multiple tasks in separate windows
tmux new-session -d -s parallel -n task1 'task1.sh; tmux wait-for -S t1'
tmux new-window -t parallel -n task2 'task2.sh; tmux wait-for -S t2'
tmux new-window -t parallel -n task3 'task3.sh; tmux wait-for -S t3'

# Wait for all tasks
tmux wait-for t1 &
tmux wait-for t2 &
tmux wait-for t3 &
wait

# Collect results
for win in task1 task2 task3; do
    echo "=== $win ==="
    tmux capture-pane -t "parallel:$win" -p
done

tmux kill-session -t parallel

Environment and Options

Set Environment Variables

# Set environment for session
tmux new-session -d -s mysession -e 'VAR=value' -e 'PATH=/custom:$PATH' 'command'

# Set environment in existing session
tmux set-environment -t mysession MY_VAR "value"

Useful Options

# Increase scrollback buffer (default: 2000)
tmux set-option -t mysession history-limit 50000

# Enable mouse support (for debugging)
tmux set-option -t mysession mouse on

# Set default shell
tmux set-option -g default-shell /bin/bash

Tips

  • Unique session names: Use $$ (PID) or $(date +%s) for unique names
  • Unbuffered output: Use -u flag for Python, stdbuf -oL for others
  • Wait for startup: Add sleep after starting interactive processes
  • Clean up: Always kill sessions when done to avoid orphans
  • Check existence: Use tmux has -t name before operations
  • Escape sequences: Use -e flag with capture-pane to preserve colors
  • Line buffering: Use --line-buffered with grep when piping

Troubleshooting

  • No output captured: Process may buffer output; use unbuffered mode
  • Session not found: Check tmux ls for exact session name
  • Command exits immediately: Add ; exec bash to keep session alive
  • Special characters: Use -l flag with send-keys for literal text
  • Timing issues: Add sleep between send-keys and capture-pane

平台分布

Codex

27.73%
按下载量换算37

windsurf

25.36%
按下载量换算33

OpenCode

17.11%
按下载量换算23

Claude Code

14.22%
按下载量换算19

Antigravity

8.05%
按下载量换算11

Gemini CLI

3.84%
按下载量换算5

安全审计

暂无安全审计结果可展示。

权限和风险

可写文件

该 Skill 可能写入或修改本地文件,使用前需要确认目标目录和修改范围。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills