tmux
Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Analyze and document codebase architecture: dependency graphs, module boundaries, API surfaces, tech debt. Use when: (1) user asks 'how is this codebase structured', (2) onboarding to a new project, (3) planning a large feature that spans modules, (4) identifying tech debt or coupling issues. NOT for: specific code changes (use refactor), reviewing a PR (use code-review).
Structured code review for PRs, diffs, or changed files. Use when: (1) reviewing a pull request, (2) checking code quality before merge, (3) auditing changes for correctness/security/performance, (4) user asks to review code or a diff. NOT for: debugging failures (use debug), running tests (use verify), or general code reading.
Manage dependencies: audit outdated packages, resolve conflicts, evaluate alternatives, handle breaking upgrades. Use when: (1) updating dependencies, (2) resolving version conflicts, (3) checking for vulnerabilities in deps, (4) evaluating a new library. NOT for: general code changes, security vulnerabilities in own code (use security-audit).
Generate or update documentation: API docs, README, CHANGELOG, ADRs. Use when: (1) user asks to document code, (2) writing a README for a new project, (3) updating docs after a change, (4) creating architecture decision records. NOT for: inline code comments (just add them), reviewing docs (use code-review).
Advanced git operations: rebase strategies, cherry-pick workflows, bisect automation, worktree management, conflict resolution, branch cleanup. Use when: (1) complex git operations beyond basic add/commit/push, (2) resolving merge conflicts, (3) reorganizing commit history, (4) managing multiple working branches. NOT for: basic git (use git tools directly), GitHub API operations (use github skill).
Language-specific idiom guides for Go, Python, TypeScript, Rust. Covers non-obvious patterns: project layout, error handling, testing idioms, build quirks, common pitfalls. Use when: (1) writing code in a specific language and need idiomatic patterns, (2) user asks 'what's the Go/Python/etc way to do X', (3) porting code between languages. NOT for: syntax questions (the model already knows syntax).
| name | tmux |
| description | Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output. |
| metadata | {"openclaw":{"emoji":"🧵","os":["darwin","linux"],"requires":{"bins":["tmux"]}}} |
Control tmux sessions by sending keystrokes and reading output. Essential for managing Claude Code sessions.
✅ USE this skill when:
❌ DON'T use this skill when:
exec tool directlyexec with background:trueexec toolexec with tmux new-session| Session | Purpose |
|---|---|
shared | Primary interactive session |
worker-2 - worker-8 | Parallel worker sessions |
tmux list-sessions
tmux ls
# Last 20 lines of pane
tmux capture-pane -t shared -p | tail -20
# Entire scrollback
tmux capture-pane -t shared -p -S -
# Specific pane in window
tmux capture-pane -t shared:0.0 -p
# Send text (doesn't press Enter)
tmux send-keys -t shared "hello"
# Send text + Enter
tmux send-keys -t shared "y" Enter
# Send special keys
tmux send-keys -t shared Enter
tmux send-keys -t shared Escape
tmux send-keys -t shared C-c # Ctrl+C
tmux send-keys -t shared C-d # Ctrl+D (EOF)
tmux send-keys -t shared C-z # Ctrl+Z (suspend)
# Select window
tmux select-window -t shared:0
# Select pane
tmux select-pane -t shared:0.1
# List windows
tmux list-windows -t shared
# Create new session
tmux new-session -d -s newsession
# Kill session
tmux kill-session -t sessionname
# Rename session
tmux rename-session -t old new
For interactive TUIs (Claude Code, Codex, etc.), split text and Enter into separate sends to avoid paste/multiline edge cases:
tmux send-keys -t shared -l -- "Please apply the patch in src/foo.ts"
sleep 0.1
tmux send-keys -t shared Enter
# Look for prompts
tmux capture-pane -t worker-3 -p | tail -10 | grep -E "❯|Yes.*No|proceed|permission"
# Send 'y' and Enter
tmux send-keys -t worker-3 'y' Enter
# Or select numbered option
tmux send-keys -t worker-3 '2' Enter
for s in shared worker-2 worker-3 worker-4 worker-5 worker-6 worker-7 worker-8; do
echo "=== $s ==="
tmux capture-pane -t $s -p 2>/dev/null | tail -5
done
tmux send-keys -t worker-4 "Fix the bug in auth.js" Enter
capture-pane -p to print to stdout (essential for scripting)-S - captures entire scrollback historysession:window.pane (e.g., shared:0.0)