Token导航 LogoToken导航

Agent Skill · 研究检索

skill-system-tmux(技能系统 tmux)

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

skill-system-tmux 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 42,847。

总安装 1,035周安装 44GitHub Stars 4下载 363核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/arthur0824hao/skills --skill skill-system-tmux

这个 Skill 是做什么的

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

用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。支持基于关键词、任务场景或来源线索进行信息筛选与整理。通过 npx skills add 命令从指定 GitHub 仓库安装使用。安装前需确认权限范围、维护状态及是否触发联网或文件操作。

skill-system-tmux 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/skill-system-tmux

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/arthur0824hao/skills --skill skill-system-tmux;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

skill-system-tmux 怎么安装?

在终端执行 npx skills add https://github.com/arthur0824hao/skills --skill skill-system-tmux。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

skill-system-tmux 支持哪些 AI 工具?

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

skill-system-tmux 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/arthur0824hao/skills --skill skill-system-tmux 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

skill-system-tmux 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

skill-system-tmux 用的人多吗?

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

skill-system-tmux 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

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

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 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调用外部服务未明确有提醒
skill-system-tmux

技能系统 tmux · 本页

1,0354执行命令未明确有提醒

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

SKILL.md 原文

Skill System Tmux

Route shell commands through tmux when they risk timeout, require persistence, or need interactive terminal access. This skill provides decision heuristics and session management conventions — not tmux tutorials.

Decision Matrix

Use this matrix to decide: direct bash vs tmux.

ConditionRouteExamples
Estimated time > 60stmuxgit clone <large>, npm install, docker build, training scripts
Command does not self-terminatetmuxnpm run dev, python app.py, jupyter notebook
Requires TUI or interactive inputtmuxvim, htop, pudb, claude
Parallel isolated execution neededtmuxMultiple agents, concurrent test suites
Remote execution over SSHtmuxCommands that must survive connection drops
Atomic, non-interactive, fast (<30s)direct bashls, grep, git status, cat, mkdir
Single-shot with expected outputdirect bashpython script.py (fast), git diff, npm test (short)

Default: direct bash. Only route to tmux when a condition above is met.

Time Estimation Heuristics

Commands likely to exceed timeout:

  • Git operations: clone (large repos), push (large payloads), checkout (>1GB working tree)
  • Package install: npm install, pip install (many deps), cargo build
  • Build tools: docker build, make (large projects), webpack (production builds)
  • Data processing: Training scripts, preprocessing pipelines, large file transfers
  • CI/test suites: Full test runs on large projects

Session Naming Convention

Use project-context naming for human readability:

Format: {project}-{purpose}

Agent-created sessions (MANDATORY prefix):
  oc-{purpose}        # e.g., oc-audit, oc-verify, oc-render
  oc-{project}-{task}  # e.g., oc-skills-build, oc-subproject-test

User/infra sessions (no prefix required):
  postgres-dev
  frontend-watch
  ml-training

Rules:

  • Agent-created sessions MUST use oc- prefix — enables bulk identification and cleanup
  • Lowercase, hyphens for separators (not underscores)
  • Include project context for multi-project environments
  • Reuse well-known oc- session names when they exist (e.g., oc-exp-runner)
  • If you inherit a legacy agent session without the prefix, rename it to oc-* before reuse
  • Never create sessions with numeric-only names (e.g., 531)

Core Patterns

Pattern 1: Fire and Forget (Background Task)

For long-running commands where you don't need real-time output:

# Kill any existing session with same name, then start fresh
tmux kill-session -t {session} 2>/dev/null || true
tmux new-session -d -s {session} bash -c '{command}'

Using interactive_bash tool:

tmux_command: new-session -d -s {session}
tmux_command: send-keys -t {session} "{command}" Enter

Pattern 2: Persistent Server

For dev servers or processes that must keep running:

tmux_command: new-session -d -s {session}
tmux_command: send-keys -t {session} "{command}" Enter

Check if running later:

tmux_command: has-session -t {session}

Pattern 3: Output Capture

Read what a tmux session has produced:

tmux_command: capture-pane -p -t {session}

For longer history (last 1000 lines):

tmux_command: capture-pane -p -t {session} -S -1000

Pattern 4: Readiness Detection

After sending a command, poll to detect completion:

  1. Capture the pane output
  2. Look for shell prompt at end of output (regex: /(\\$|>|#)\s*$/m)
  3. If prompt appears, command has finished
  4. If no prompt after expected duration, assume still running or hung

Pattern 5: Clean Shutdown

Always clean up sessions when done:

tmux_command: kill-session -t {session}

Kill-before-new pattern prevents zombie sessions:

tmux_command: kill-session -t {session}
# (ignore error if doesn't exist)
tmux_command: new-session -d -s {session}

Pattern 6: Bulk Resource Reclaim

Reclaim all agent-created sessions and detect stale resources. Run this when:

  • Machine feels sluggish or memory is high
  • Before/after long agent work sessions
  • User requests cleanup

Step 1: Identify agent sessions

tmux list-sessions -F '#{session_name} #{session_activity}' | grep '^oc-'

Step 2: Kill all agent sessions

tmux list-sessions -F '#{session_name}' | grep '^oc-' | xargs -I{} tmux kill-session -t {}

Step 3: Detect stale non-agent sessions

A session is likely stale if:

  • Last activity > 6 hours ago AND no running foreground process
  • Session has only an idle shell prompt (capture-pane shows just $ or ╰─)
# List sessions with last activity timestamp
tmux list-sessions -F '#{session_name} #{session_activity}'
# Compare #{session_activity} (epoch) against current time
# Capture pane of suspects to verify idle state

Step 4: Reclaim orphaned processes

# Find opencode processes whose parent tmux pane was killed
ps aux | grep opencode | grep -v grep
# Check if port is held by a zombie
lsof -i :{port} 2>/dev/null
# Force kill if needed (SIGTERM first, SIGKILL if unresponsive after 5s)
kill {pid} && sleep 5 && kill -0 {pid} 2>/dev/null && kill -9 {pid}

Important: Never kill known non-agent infra sessions without explicit user confirmation. Legacy names from sibling projects should be normalized to oc-* before they are treated as agent-managed sessions.

Integration with Agent Tools

interactive_bash Tool

The primary interface. Pass tmux subcommands directly (without tmux prefix):

# Create session
tmux_command: new-session -d -s oc-my-session

# Send command
tmux_command: send-keys -t oc-my-session "npm run dev" Enter

# Read output
tmux_command: capture-pane -p -t oc-my-session

# Kill session
tmux_command: kill-session -t oc-my-session

bash Tool with Timeout

For commands near the timeout boundary, prefer increasing timeout parameter over tmux:

bash(command="npm install", timeout=300000)  # 5 min timeout

Use tmux only when:

  • Timeout cannot be reliably estimated
  • Process must persist beyond the current tool call
  • Interactive/TUI access is needed

Known Errors & Workarounds

capture-pane blocked in interactive_bash

Error: 'capture-pane' is blocked in interactive_bash

This is the most common tmux error. The interactive_bash tool blocks certain tmux subcommands (including capture-pane, pipe-pane, save-buffer). Always use the Bash tool instead for these operations.

# WRONG — will be blocked:
# interactive_bash: tmux_command: capture-pane -p -t oc-dev-server

# CORRECT — use Bash tool:
tmux capture-pane -p -t oc-dev-server

# Capture with history (last 1000 lines):
tmux capture-pane -p -t oc-dev-server -S -1000

# Capture and grep for specific output:
tmux capture-pane -p -t oc-dev-server | grep -i "error\|ready\|listening"

Rule: For any tmux read-only operation (capture-pane, list-sessions, display-message, show-options), prefer the Bash tool. Reserve interactive_bash for mutations (send-keys, new-session, kill-session).

session not found after kill/recreate

Error: can't find session: oc-xxx

Common when kill-before-new pattern races. Add a small guard:

tmux kill-session -t oc-build 2>/dev/null || true
tmux new-session -d -s oc-build bash -c 'make all'

duplicate session on new-session

Error: duplicate session: oc-xxx

The session already exists. Either reuse it or kill-before-new:

# Reuse (send new command to existing session):
tmux send-keys -t oc-build "make clean && make all" Enter

# Or kill and recreate:
tmux kill-session -t oc-build 2>/dev/null || true
tmux new-session -d -s oc-build bash -c 'make all'

no server running / tmux not started

Error: no server running on /tmp/tmux-*/default

No tmux server is running. Any new-session command will start one automatically:

tmux new-session -d -s oc-init echo "tmux ready"

Tool Selection Quick Reference

tmux subcommandUse interactive_bash?Use Bash tool?
new-sessionYesYes
send-keysYes (preferred)Yes
kill-sessionYesYes
capture-paneNO — blockedYes (required)
list-sessionsAvoidYes (preferred)
has-sessionYesYes
pipe-paneNO — blockedYes (required)
display-messageAvoidYes (preferred)

Anti-Patterns

Don'tDo Instead
Route every command through tmuxUse direct bash for fast, atomic commands
Forget to kill sessions after useAlways clean up with kill-session
Use generic session names like s1Use descriptive names: oc-project-purpose
Create agent sessions without oc- prefixAlways prefix: oc-audit, oc-verify, oc-build
Poll capture-pane in tight loopsUse 1-2s intervals between polls
Start a new session without killing old oneAlways kill-before-new for same session name
Send commands without clearing the line firstSend C-u before commands if line might have residual input
Leave sessions running after task completesRun bulk reclaim (Pattern 6) at session end
Use interactive_bash for capture-paneAlways use Bash tool for capture-pane
Retry blocked commands in interactive_bashSwitch to Bash tool immediately

Existing Project Conventions

This skill system's sibling projects may contain older tmux naming patterns, but agent-owned sessions in this repo must be normalized to oc-*.

  • Session name oc-exp-runner: Preferred agent-owned name for experiment execution
  • Watcher sessions: Background monitors that wake agents via tmux send-keys
  • machines.json config: tmux_session field defines per-machine session names
  • Kill-before-new: Standard cleanup pattern used across all experiment scripts

When working in a project with existing tmux conventions, preserve true user/infra sessions, but rename inherited agent sessions to the oc-* form before continuing.

{
  "schema_version": "2.0",
  "id": "skill-system-tmux",
  "version": "1.0.0",
  "capabilities": ["tmux-session-start", "tmux-capture", "tmux-wait", "tmux-session-list", "tmux-session-kill"],
  "effects": ["proc.exec"],
  "operations": {
    "start-session": {
      "description": "Start a long-running command in a managed tmux session.",
      "input": {
        "name": { "type": "string", "required": true, "description": "Logical session name" },
        "command": { "type": "string", "required": true, "description": "Command to execute inside tmux" }
      },
      "output": {
        "description": "Started session metadata",
        "fields": { "status": "string", "session_name": "string" }
      },
      "entrypoints": {
        "unix": ["python3", "{skill_dir}/scripts/tmux_tool.py", "start-session", "{name}", "{command}"]
      }
    },
    "capture-pane": {
      "description": "Capture output from a managed tmux session.",
      "input": {
        "session_name": { "type": "string", "required": true, "description": "Target session name" },
        "lines": { "type": "integer", "required": false, "description": "Number of lines to capture" }
      },
      "output": {
        "description": "Captured output",
        "fields": { "status": "string", "output": "string" }
      },
      "entrypoints": {
        "unix": ["python3", "{skill_dir}/scripts/tmux_tool.py", "capture-pane", "{session_name}"]
      }
    },
    "wait-completion": {
      "description": "Poll a managed tmux session until completion.",
      "input": {
        "session_name": { "type": "string", "required": true, "description": "Target session name" },
        "timeout_seconds": { "type": "integer", "required": false, "description": "Maximum wait time" }
      },
      "output": {
        "description": "Completion result and final output",
        "fields": { "status": "string", "completed": "boolean", "output": "string" }
      },
      "entrypoints": {
        "unix": ["python3", "{skill_dir}/scripts/tmux_tool.py", "wait-completion", "{session_name}"]
      }
    },
    "list-sessions": {
      "description": "List managed tmux sessions.",
      "input": {},
      "output": {
        "description": "Managed session rows",
        "fields": { "status": "string", "sessions": "array" }
      },
      "entrypoints": {
        "unix": ["python3", "{skill_dir}/scripts/tmux_tool.py", "list-sessions"]
      }
    },
    "kill-session": {
      "description": "Kill a managed tmux session.",
      "input": {
        "session_name": { "type": "string", "required": true, "description": "Target session name" }
      },
      "output": {
        "description": "Kill result",
        "fields": { "status": "string", "session_name": "string" }
      },
      "entrypoints": {
        "unix": ["python3", "{skill_dir}/scripts/tmux_tool.py", "kill-session", "{session_name}"]
      }
    }
  },
  "stdout_contract": {
    "last_line_json": false,
    "note": "Agent-executed; uses interactive_bash tool for tmux operations."
  }
}

平台分布

Codex

37.28%
按下载量换算135

Claude

28.6%
按下载量换算104

Cursor

21.09%
按下载量换算77

Gemini CLI

10.04%
按下载量换算36

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/arthur0824hao/skills --skill skill-system-tmux 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

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

继续浏览同类 Skills