[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GD91PSNFBHCW25GNZJF2VH":3,"skill-same:01M6GD91PSNFBHCW25GNZJF2VH":73},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":41,"linkOnly":42,"markdownContent":43,"markdownBody":44,"frontMatter":45,"refName":51,"commitSha":52,"skillDirectory":53,"forksCount":54,"repositoryHtmlUrl":55,"repositoryHomepageUrl":55,"ownerHtmlUrl":56,"ownerBlogUrl":6,"ownerDescription":57,"updatedAt":58,"install":59,"resources":72},"01M6GD91PSNFBHCW25GNZJF2VH","tmux",null,"Expert tmux session, window, and pane management for terminal multiplexing, persistent remote workflows, and shell scripting automation.","Sam-06060\u002Fjarvis-assistant","Sam-06060","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F208600848?v=4","01M6CRKT7C7FXD21V6HXF293S0","Samson Frank Ganta","01M6CRKTBEKYFD8YX5Z1GT99EE",6,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FSam-06060\u002Fjarvis-assistant\u002Fblob\u002Fmain\u002Fmodules\u002Fagent_skills\u002Fawesome-skills\u002Fplaybooks\u002Ftmux\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[5,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"shell","remote","multiplexer","shell scripting","community","expert","session","cursor","management","terminal","scripting","development","sessions","workflows","automation","gemini","safe","2026-11-10 10:12:30",false,"---\nname: tmux\ndescription: \"Expert tmux session, window, and pane management for terminal multiplexing, persistent remote workflows, and shell scripting automation.\"\ncategory: development\nrisk: safe\nsource: community\ndate_added: \"2026-03-28\"\nauthor: kostakost2\ntags: [tmux, terminal, multiplexer, sessions, shell, remote, automation]\ntools: [claude, cursor, gemini]\n---\n\n# tmux — Terminal Multiplexer\n\n## Overview\n\n`tmux` keeps terminal sessions alive across SSH disconnects, splits work across multiple panes, and enables fully scriptable terminal automation. This skill covers session management, window\u002Fpane layout, keybinding patterns, and using `tmux` non-interactively from shell scripts — essential for remote servers, long-running jobs, and automated workflows.\n\n## When to Use This Skill\n\n- Use when setting up or managing persistent terminal sessions on remote servers\n- Use when the user needs to run long-running processes that survive SSH disconnects\n- Use when scripting multi-pane terminal layouts (e.g., logs + shell + editor)\n- Use when automating `tmux` commands from bash scripts without user interaction\n\n## How It Works\n\n`tmux` has three hierarchy levels: **sessions** (top level, survives disconnects), **windows** (tabs within a session), and **panes** (splits within a window). Everything is controllable from outside via `tmux \u003Ccommand>` or from inside via the prefix key (`Ctrl-b` by default).\n\n### Session Management\n\n```bash\n# Create a new named session\ntmux new-session -s work\n\n# Create detached (background) session\ntmux new-session -d -s work\n\n# Create detached session and start a command\ntmux new-session -d -s build -x 220 -y 50 \"make all\"\n\n# Attach to a session\ntmux attach -t work\ntmux attach          # attaches to most recent session\n\n# List all sessions\ntmux list-sessions\ntmux ls\n\n# Detach from inside tmux\n# Prefix + d   (Ctrl-b d)\n\n# Kill a session\ntmux kill-session -t work\n\n# Kill all sessions except the current one\ntmux kill-session -a\n\n# Rename a session from outside\ntmux rename-session -t old-name new-name\n\n# Switch to another session from outside\ntmux switch-client -t other-session\n\n# Check if a session exists (useful in scripts)\ntmux has-session -t work 2>\u002Fdev\u002Fnull && echo \"exists\"\n```\n\n### Window Management\n\n```bash\n# Create a new window in the current session\ntmux new-window -t work -n \"logs\"\n\n# Create a window running a specific command\ntmux new-window -t work:3 -n \"server\" \"python -m http.server 8080\"\n\n# List windows\ntmux list-windows -t work\n\n# Select (switch to) a window\ntmux select-window -t work:logs\ntmux select-window -t work:2       # by index\n\n# Rename a window\ntmux rename-window -t work:2 \"editor\"\n\n# Kill a window\ntmux kill-window -t work:logs\n\n# Move window to a new index\ntmux move-window -s work:3 -t work:1\n\n# From inside tmux:\n# Prefix + c     — new window\n# Prefix + ,     — rename window\n# Prefix + &     — kill window\n# Prefix + n\u002Fp   — next\u002Fprevious window\n# Prefix + 0-9   — switch to window by number\n```\n\n### Pane Management\n\n```bash\n# Split pane vertically (left\u002Fright)\ntmux split-window -h -t work:1\n\n# Split pane horizontally (top\u002Fbottom)\ntmux split-window -v -t work:1\n\n# Split and run a command\ntmux split-window -h -t work:1 \"tail -f \u002Fvar\u002Flog\u002Fsyslog\"\n\n# Select a pane by index\ntmux select-pane -t work:1.0\n\n# Resize panes\ntmux resize-pane -t work:1.0 -R 20   # expand right by 20 cols\ntmux resize-pane -t work:1.0 -D 10   # shrink down by 10 rows\ntmux resize-pane -Z                   # toggle zoom (fullscreen)\n\n# Swap panes\ntmux swap-pane -s work:1.0 -t work:1.1\n\n# Kill a pane\ntmux kill-pane -t work:1.1\n\n# From inside tmux:\n# Prefix + %     — split vertical\n# Prefix + \"     — split horizontal\n# Prefix + arrow — navigate panes\n# Prefix + z     — zoom\u002Funzoom current pane\n# Prefix + x     — kill pane\n# Prefix + {\u002F}   — swap pane with previous\u002Fnext\n```\n\n### Sending Commands to Panes Without Being Attached\n\n```bash\n# Send a command to a specific pane and press Enter\ntmux send-keys -t work:1.0 \"ls -la\" Enter\n\n# Run a command in a background pane without attaching\ntmux send-keys -t work:editor \"vim src\u002Fmain.py\" Enter\n\n# Send Ctrl+C to stop a running process\ntmux send-keys -t work:1.0 C-c\n\n# Send text without pressing Enter (useful for pre-filling prompts)\ntmux send-keys -t work:1.0 \"git commit -m '\"\n\n# Clear a pane\ntmux send-keys -t work:1.0 \"clear\" Enter\n\n# Check what's in a pane (capture its output)\ntmux capture-pane -t work:1.0 -p\ntmux capture-pane -t work:1.0 -p | grep \"ERROR\"\n```\n\n### Scripting a Full Workspace Layout\n\nThis is the most powerful pattern: create a fully configured multi-pane workspace from a single script.\n\n```bash\n#!\u002Fusr\u002Fbin\u002Fenv bash\nset -euo pipefail\n\nSESSION=\"dev\"\n\n# Bail if session already exists\ntmux has-session -t \"$SESSION\" 2>\u002Fdev\u002Fnull && {\n  echo \"Session $SESSION already exists. Attaching...\"\n  tmux attach -t \"$SESSION\"\n  exit 0\n}\n\n# Create session with first window\ntmux new-session -d -s \"$SESSION\" -n \"editor\" -x 220 -y 50\n\n# Window 1: editor + test runner side by side\ntmux send-keys -t \"$SESSION:editor\" \"vim .\" Enter\ntmux split-window -h -t \"$SESSION:editor\"\ntmux send-keys -t \"$SESSION:editor.1\" \"npm test -- --watch\" Enter\ntmux select-pane -t \"$SESSION:editor.0\"\n\n# Window 2: server logs\ntmux new-window -t \"$SESSION\" -n \"server\"\ntmux send-keys -t \"$SESSION:server\" \"docker compose up\" Enter\ntmux split-window -v -t \"$SESSION:server\"\ntmux send-keys -t \"$SESSION:server.1\" \"tail -f logs\u002Fapp.log\" Enter\n\n# Window 3: general shell\ntmux new-window -t \"$SESSION\" -n \"shell\"\n\n# Focus first window\ntmux select-window -t \"$SESSION:editor\"\n\n# Attach\ntmux attach -t \"$SESSION\"\n```\n\n### Configuration (`~\u002F.tmux.conf`)\n\n```bash\n# Change prefix to Ctrl-a (screen-style)\nunbind C-b\nset -g prefix C-a\nbind C-a send-prefix\n\n# Enable mouse support\nset -g mouse on\n\n# Start window\u002Fpane numbering at 1\nset -g base-index 1\nsetw -g pane-base-index 1\n\n# Renumber windows when one is closed\nset -g renumber-windows on\n\n# Increase scrollback buffer\nset -g history-limit 50000\n\n# Use vi keys in copy mode\nsetw -g mode-keys vi\n\n# Faster key repetition\nset -s escape-time 0\n\n# Reload config without restarting\nbind r source-file ~\u002F.tmux.conf \\; display \"Config reloaded\"\n\n# Intuitive splits: | and -\nbind | split-window -h -c \"#{pane_current_path}\"\nbind - split-window -v -c \"#{pane_current_path}\"\n\n# New windows open in current directory\nbind c new-window -c \"#{pane_current_path}\"\n\n# Status bar\nset -g status-right \"#{session_name} | %H:%M %d-%b\"\nset -g status-interval 5\n```\n\n### Copy Mode and Scrollback\n\n```bash\n# Enter copy mode (scroll up through output)\n# Prefix + [\n\n# In vi mode:\n# \u002F to search forward, ? to search backward\n# Space to start selection, Enter to copy\n# q to exit copy mode\n\n# Paste the most recent buffer\n# Prefix + ]\n\n# List paste buffers\ntmux list-buffers\n\n# Show the most recent buffer\ntmux show-buffer\n\n# Save buffer to a file\ntmux save-buffer \u002Ftmp\u002Ftmux-output.txt\n\n# Load a file into a buffer\ntmux load-buffer \u002Ftmp\u002Fdata.txt\n\n# Pipe pane output to a command\ntmux pipe-pane -t work:1.0 \"cat >> ~\u002Fsession.log\"\n```\n\n### Practical Automation Patterns\n\n```bash\n# Idempotent session: create or attach\nensure_session() {\n  local name=\"$1\"\n  tmux has-session -t \"$name\" 2>\u002Fdev\u002Fnull \\\n    || tmux new-session -d -s \"$name\"\n  tmux attach -t \"$name\"\n}\n\n# Run a command in a new background window and tail its output\nrun_bg() {\n  local session=\"${1:-main}\" cmd=\"${*:2}\"\n  tmux new-window -t \"$session\" -n \"bg-$$\"\n  tmux send-keys -t \"$session:bg-$$\" \"$cmd\" Enter\n}\n\n# Wait for a pane to produce specific output (polling)\nwait_for_output() {\n  local target=\"$1\" pattern=\"$2\" timeout=\"${3:-30}\"\n  local elapsed=0\n  while (( elapsed \u003C timeout )); do\n    tmux capture-pane -t \"$target\" -p | grep -q \"$pattern\" && return 0\n    sleep 1\n    (( elapsed++ ))\n  done\n  return 1\n}\n\n# Kill all background windows matching a name prefix\nkill_bg_windows() {\n  local session=\"$1\" prefix=\"${2:-bg-}\"\n  tmux list-windows -t \"$session\" -F \"#W\" \\\n    | grep \"^${prefix}\" \\\n    | while read -r win; do\n        tmux kill-window -t \"${session}:${win}\"\n      done\n}\n```\n\n### Remote and SSH Workflows\n\n```bash\n# SSH and immediately attach to an existing session\nssh user@host -t \"tmux attach -t work || tmux new-session -s work\"\n\n# Run a command on remote host inside a tmux session (fire and forget)\nssh user@host \"tmux new-session -d -s deploy 'bash \u002Fopt\u002Fdeploy.sh'\"\n\n# Watch the remote session output from another terminal\nssh user@host -t \"tmux attach -t deploy -r\"  # read-only attach\n\n# Pair programming: share a session (both users attach to the same session)\n# User 1:\ntmux new-session -s shared\n# User 2 (same server):\ntmux attach -t shared\n```\n\n## Best Practices\n\n- Always name sessions (`-s name`) in scripts — unnamed sessions are hard to target reliably\n- Use `tmux has-session -t name 2>\u002Fdev\u002Fnull` before creating to make scripts idempotent\n- Set `-x` and `-y` when creating detached sessions to give panes a proper size for commands that check terminal dimensions\n- Use `send-keys ... Enter` for automation rather than piping stdin — it works even when the target pane is running an interactive program\n- Keep `~\u002F.tmux.conf` in version control for reproducibility across machines\n- Prefer `bind -n` for bindings that don't need the prefix, but only for keys that don't conflict with application shortcuts\n\n## Security & Safety Notes\n\n- `send-keys` executes commands in a pane without confirmation — verify the target (`-t session:window.pane`) before use in scripts to avoid sending keystrokes to the wrong pane\n- Read-only attach (`-r`) is appropriate when sharing sessions with others to prevent accidental input\n- Avoid storing secrets in tmux window\u002Fpane titles or environment variables exported into sessions on shared machines\n\n## Common Pitfalls\n\n- **Problem:** `tmux` commands from a script fail with \"no server running\"\n  **Solution:** Start the server first with `tmux start-server`, or create a detached session before running other commands.\n\n- **Problem:** Pane size is 0x0 when creating a detached session\n  **Solution:** Pass explicit dimensions: `tmux new-session -d -s name -x 200 -y 50`.\n\n- **Problem:** `send-keys` types the text but doesn't run the command\n  **Solution:** Ensure you pass `Enter` (capital E) as a second argument: `tmux send-keys -t target \"cmd\" Enter`.\n\n- **Problem:** Script creates a duplicate session each run\n  **Solution:** Guard with `tmux has-session -t name 2>\u002Fdev\u002Fnull || tmux new-session -d -s name`.\n\n- **Problem:** Copy-mode selection doesn't work as expected\n  **Solution:** Confirm `mode-keys vi` or `mode-keys emacs` is set to match your preference in `~\u002F.tmux.conf`.\n\n## Related Skills\n\n- `@bash-pro` — Writing the shell scripts that orchestrate tmux sessions\n- `@bash-linux` — General Linux terminal patterns used inside tmux panes\n- `@ssh` — Combining tmux with SSH for persistent remote workflows\n","# tmux — Terminal Multiplexer\n\n## Overview\n\n`tmux` keeps terminal sessions alive across SSH disconnects, splits work across multiple panes, and enables fully scriptable terminal automation. This skill covers session management, window\u002Fpane layout, keybinding patterns, and using `tmux` non-interactively from shell scripts — essential for remote servers, long-running jobs, and automated workflows.\n\n## When to Use This Skill\n\n- Use when setting up or managing persistent terminal sessions on remote servers\n- Use when the user needs to run long-running processes that survive SSH disconnects\n- Use when scripting multi-pane terminal layouts (e.g., logs + shell + editor)\n- Use when automating `tmux` commands from bash scripts without user interaction\n\n## How It Works\n\n`tmux` has three hierarchy levels: **sessions** (top level, survives disconnects), **windows** (tabs within a session), and **panes** (splits within a window). Everything is controllable from outside via `tmux \u003Ccommand>` or from inside via the prefix key (`Ctrl-b` by default).\n\n### Session Management\n\n```bash\n# Create a new named session\ntmux new-session -s work\n\n# Create detached (background) session\ntmux new-session -d -s work\n\n# Create detached session and start a command\ntmux new-session -d -s build -x 220 -y 50 \"make all\"\n\n# Attach to a session\ntmux attach -t work\ntmux attach          # attaches to most recent session\n\n# List all sessions\ntmux list-sessions\ntmux ls\n\n# Detach from inside tmux\n# Prefix + d   (Ctrl-b d)\n\n# Kill a session\ntmux kill-session -t work\n\n# Kill all sessions except the current one\ntmux kill-session -a\n\n# Rename a session from outside\ntmux rename-session -t old-name new-name\n\n# Switch to another session from outside\ntmux switch-client -t other-session\n\n# Check if a session exists (useful in scripts)\ntmux has-session -t work 2>\u002Fdev\u002Fnull && echo \"exists\"\n```\n\n### Window Management\n\n```bash\n# Create a new window in the current session\ntmux new-window -t work -n \"logs\"\n\n# Create a window running a specific command\ntmux new-window -t work:3 -n \"server\" \"python -m http.server 8080\"\n\n# List windows\ntmux list-windows -t work\n\n# Select (switch to) a window\ntmux select-window -t work:logs\ntmux select-window -t work:2       # by index\n\n# Rename a window\ntmux rename-window -t work:2 \"editor\"\n\n# Kill a window\ntmux kill-window -t work:logs\n\n# Move window to a new index\ntmux move-window -s work:3 -t work:1\n\n# From inside tmux:\n# Prefix + c     — new window\n# Prefix + ,     — rename window\n# Prefix + &     — kill window\n# Prefix + n\u002Fp   — next\u002Fprevious window\n# Prefix + 0-9   — switch to window by number\n```\n\n### Pane Management\n\n```bash\n# Split pane vertically (left\u002Fright)\ntmux split-window -h -t work:1\n\n# Split pane horizontally (top\u002Fbottom)\ntmux split-window -v -t work:1\n\n# Split and run a command\ntmux split-window -h -t work:1 \"tail -f \u002Fvar\u002Flog\u002Fsyslog\"\n\n# Select a pane by index\ntmux select-pane -t work:1.0\n\n# Resize panes\ntmux resize-pane -t work:1.0 -R 20   # expand right by 20 cols\ntmux resize-pane -t work:1.0 -D 10   # shrink down by 10 rows\ntmux resize-pane -Z                   # toggle zoom (fullscreen)\n\n# Swap panes\ntmux swap-pane -s work:1.0 -t work:1.1\n\n# Kill a pane\ntmux kill-pane -t work:1.1\n\n# From inside tmux:\n# Prefix + %     — split vertical\n# Prefix + \"     — split horizontal\n# Prefix + arrow — navigate panes\n# Prefix + z     — zoom\u002Funzoom current pane\n# Prefix + x     — kill pane\n# Prefix + {\u002F}   — swap pane with previous\u002Fnext\n```\n\n### Sending Commands to Panes Without Being Attached\n\n```bash\n# Send a command to a specific pane and press Enter\ntmux send-keys -t work:1.0 \"ls -la\" Enter\n\n# Run a command in a background pane without attaching\ntmux send-keys -t work:editor \"vim src\u002Fmain.py\" Enter\n\n# Send Ctrl+C to stop a running process\ntmux send-keys -t work:1.0 C-c\n\n# Send text without pressing Enter (useful for pre-filling prompts)\ntmux send-keys -t work:1.0 \"git commit -m '\"\n\n# Clear a pane\ntmux send-keys -t work:1.0 \"clear\" Enter\n\n# Check what's in a pane (capture its output)\ntmux capture-pane -t work:1.0 -p\ntmux capture-pane -t work:1.0 -p | grep \"ERROR\"\n```\n\n### Scripting a Full Workspace Layout\n\nThis is the most powerful pattern: create a fully configured multi-pane workspace from a single script.\n\n```bash\n#!\u002Fusr\u002Fbin\u002Fenv bash\nset -euo pipefail\n\nSESSION=\"dev\"\n\n# Bail if session already exists\ntmux has-session -t \"$SESSION\" 2>\u002Fdev\u002Fnull && {\n  echo \"Session $SESSION already exists. Attaching...\"\n  tmux attach -t \"$SESSION\"\n  exit 0\n}\n\n# Create session with first window\ntmux new-session -d -s \"$SESSION\" -n \"editor\" -x 220 -y 50\n\n# Window 1: editor + test runner side by side\ntmux send-keys -t \"$SESSION:editor\" \"vim .\" Enter\ntmux split-window -h -t \"$SESSION:editor\"\ntmux send-keys -t \"$SESSION:editor.1\" \"npm test -- --watch\" Enter\ntmux select-pane -t \"$SESSION:editor.0\"\n\n# Window 2: server logs\ntmux new-window -t \"$SESSION\" -n \"server\"\ntmux send-keys -t \"$SESSION:server\" \"docker compose up\" Enter\ntmux split-window -v -t \"$SESSION:server\"\ntmux send-keys -t \"$SESSION:server.1\" \"tail -f logs\u002Fapp.log\" Enter\n\n# Window 3: general shell\ntmux new-window -t \"$SESSION\" -n \"shell\"\n\n# Focus first window\ntmux select-window -t \"$SESSION:editor\"\n\n# Attach\ntmux attach -t \"$SESSION\"\n```\n\n### Configuration (`~\u002F.tmux.conf`)\n\n```bash\n# Change prefix to Ctrl-a (screen-style)\nunbind C-b\nset -g prefix C-a\nbind C-a send-prefix\n\n# Enable mouse support\nset -g mouse on\n\n# Start window\u002Fpane numbering at 1\nset -g base-index 1\nsetw -g pane-base-index 1\n\n# Renumber windows when one is closed\nset -g renumber-windows on\n\n# Increase scrollback buffer\nset -g history-limit 50000\n\n# Use vi keys in copy mode\nsetw -g mode-keys vi\n\n# Faster key repetition\nset -s escape-time 0\n\n# Reload config without restarting\nbind r source-file ~\u002F.tmux.conf \\; display \"Config reloaded\"\n\n# Intuitive splits: | and -\nbind | split-window -h -c \"#{pane_current_path}\"\nbind - split-window -v -c \"#{pane_current_path}\"\n\n# New windows open in current directory\nbind c new-window -c \"#{pane_current_path}\"\n\n# Status bar\nset -g status-right \"#{session_name} | %H:%M %d-%b\"\nset -g status-interval 5\n```\n\n### Copy Mode and Scrollback\n\n```bash\n# Enter copy mode (scroll up through output)\n# Prefix + [\n\n# In vi mode:\n# \u002F to search forward, ? to search backward\n# Space to start selection, Enter to copy\n# q to exit copy mode\n\n# Paste the most recent buffer\n# Prefix + ]\n\n# List paste buffers\ntmux list-buffers\n\n# Show the most recent buffer\ntmux show-buffer\n\n# Save buffer to a file\ntmux save-buffer \u002Ftmp\u002Ftmux-output.txt\n\n# Load a file into a buffer\ntmux load-buffer \u002Ftmp\u002Fdata.txt\n\n# Pipe pane output to a command\ntmux pipe-pane -t work:1.0 \"cat >> ~\u002Fsession.log\"\n```\n\n### Practical Automation Patterns\n\n```bash\n# Idempotent session: create or attach\nensure_session() {\n  local name=\"$1\"\n  tmux has-session -t \"$name\" 2>\u002Fdev\u002Fnull \\\n    || tmux new-session -d -s \"$name\"\n  tmux attach -t \"$name\"\n}\n\n# Run a command in a new background window and tail its output\nrun_bg() {\n  local session=\"${1:-main}\" cmd=\"${*:2}\"\n  tmux new-window -t \"$session\" -n \"bg-$$\"\n  tmux send-keys -t \"$session:bg-$$\" \"$cmd\" Enter\n}\n\n# Wait for a pane to produce specific output (polling)\nwait_for_output() {\n  local target=\"$1\" pattern=\"$2\" timeout=\"${3:-30}\"\n  local elapsed=0\n  while (( elapsed \u003C timeout )); do\n    tmux capture-pane -t \"$target\" -p | grep -q \"$pattern\" && return 0\n    sleep 1\n    (( elapsed++ ))\n  done\n  return 1\n}\n\n# Kill all background windows matching a name prefix\nkill_bg_windows() {\n  local session=\"$1\" prefix=\"${2:-bg-}\"\n  tmux list-windows -t \"$session\" -F \"#W\" \\\n    | grep \"^${prefix}\" \\\n    | while read -r win; do\n        tmux kill-window -t \"${session}:${win}\"\n      done\n}\n```\n\n### Remote and SSH Workflows\n\n```bash\n# SSH and immediately attach to an existing session\nssh user@host -t \"tmux attach -t work || tmux new-session -s work\"\n\n# Run a command on remote host inside a tmux session (fire and forget)\nssh user@host \"tmux new-session -d -s deploy 'bash \u002Fopt\u002Fdeploy.sh'\"\n\n# Watch the remote session output from another terminal\nssh user@host -t \"tmux attach -t deploy -r\"  # read-only attach\n\n# Pair programming: share a session (both users attach to the same session)\n# User 1:\ntmux new-session -s shared\n# User 2 (same server):\ntmux attach -t shared\n```\n\n## Best Practices\n\n- Always name sessions (`-s name`) in scripts — unnamed sessions are hard to target reliably\n- Use `tmux has-session -t name 2>\u002Fdev\u002Fnull` before creating to make scripts idempotent\n- Set `-x` and `-y` when creating detached sessions to give panes a proper size for commands that check terminal dimensions\n- Use `send-keys ... Enter` for automation rather than piping stdin — it works even when the target pane is running an interactive program\n- Keep `~\u002F.tmux.conf` in version control for reproducibility across machines\n- Prefer `bind -n` for bindings that don't need the prefix, but only for keys that don't conflict with application shortcuts\n\n## Security & Safety Notes\n\n- `send-keys` executes commands in a pane without confirmation — verify the target (`-t session:window.pane`) before use in scripts to avoid sending keystrokes to the wrong pane\n- Read-only attach (`-r`) is appropriate when sharing sessions with others to prevent accidental input\n- Avoid storing secrets in tmux window\u002Fpane titles or environment variables exported into sessions on shared machines\n\n## Common Pitfalls\n\n- **Problem:** `tmux` commands from a script fail with \"no server running\"\n  **Solution:** Start the server first with `tmux start-server`, or create a detached session before running other commands.\n\n- **Problem:** Pane size is 0x0 when creating a detached session\n  **Solution:** Pass explicit dimensions: `tmux new-session -d -s name -x 200 -y 50`.\n\n- **Problem:** `send-keys` types the text but doesn't run the command\n  **Solution:** Ensure you pass `Enter` (capital E) as a second argument: `tmux send-keys -t target \"cmd\" Enter`.\n\n- **Problem:** Script creates a duplicate session each run\n  **Solution:** Guard with `tmux has-session -t name 2>\u002Fdev\u002Fnull || tmux new-session -d -s name`.\n\n- **Problem:** Copy-mode selection doesn't work as expected\n  **Solution:** Confirm `mode-keys vi` or `mode-keys emacs` is set to match your preference in `~\u002F.tmux.conf`.\n\n## Related Skills\n\n- `@bash-pro` — Writing the shell scripts that orchestrate tmux sessions\n- `@bash-linux` — General Linux terminal patterns used inside tmux panes\n- `@ssh` — Combining tmux with SSH for persistent remote workflows\n",{"name":5,"risk":40,"tags":46,"tools":47,"author":49,"source":28,"category":35,"date_added":50,"description":7},[5,33,26,36,24,25,38],[48,31,39],"claude","kostakost2","2026-03-28","main","a50a3aa6b39fb0e1b7db88bef1bfc9c93606e126","modules\u002Fagent_skills\u002Fawesome-skills\u002Fplaybooks\u002Ftmux",0,"https:\u002F\u002Fgithub.com\u002FSam-06060\u002Fjarvis-assistant","https:\u002F\u002Fgithub.com\u002FSam-06060","Mobile Application Developer | Kotlin | Flutter, KMP, Swfit, Android,Swift UI | Building at Saar It Resources | Creator of Jarvis (AI Assistant)","2026-06-23 05:13:38",{"source":8,"skillName":5,"commands":60,"prompt":70,"zipAvailable":71},[61,64,67],{"tool":62,"command":63},"npx","npx skills add Sam-06060\u002Fjarvis-assistant --skill tmux",{"tool":65,"command":66},"bunx","bunx skills add Sam-06060\u002Fjarvis-assistant --skill tmux",{"tool":68,"command":69},"pnpm","pnpm dlx skills add Sam-06060\u002Fjarvis-assistant --skill tmux","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSam-06060\u002Fjarvis-assistant\u002Fblob\u002Fmain\u002Fmodules\u002Fagent_skills\u002Fawesome-skills\u002Fplaybooks\u002Ftmux\u002FSKILL.md",true,[],[74,85,101,124,143,168],{"skillNo":75,"name":76,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":82,"publishedAt":41},"01M6GDRVS6FXX3ESH0C9DW01C0","test_skill","https:\u002F\u002Fgithub.com\u002FSam-06060\u002Fjarvis-assistant\u002Fblob\u002Fmain\u002Fscratch\u002Ftest_skill\u002FSKILL.md",[79],{"categoryNo":80,"categoryName":81,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",[83,84],"Test Skill","test",{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":41},"01M6GDRQ40HX22MA6XWC31RHHK","zustand-store-ts","Create Zustand stores following established patterns with proper TypeScript types and middleware.","https:\u002F\u002Fgithub.com\u002FSam-06060\u002Fjarvis-assistant\u002Fblob\u002Fmain\u002Fmodules\u002Fagent_skills\u002Fawesome-skills\u002Fplaybooks\u002Fzustand-store-ts\u002FSKILL.md",[],[92,93,94,95,96,97,98,28,99,100],"zustand store ts","zustand","store","with","types","middleware","patterns","create","typescript",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":108,"publishedAt":41},"01M6GDRKEA0WE670SPFWX5GKCN","zoom-automation","Automate Zoom meeting creation, management, recordings, webinars, and participant tracking via Rube MCP (Composio). Always search tools first for current schemas.","https:\u002F\u002Fgithub.com\u002FSam-06060\u002Fjarvis-assistant\u002Fblob\u002Fmain\u002Fmodules\u002Fagent_skills\u002Fawesome-skills\u002Fplaybooks\u002Fzoom-automation\u002FSKILL.md",[107],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[38,109,110,111,112,113,114,115,116,117,118,119,120,121,28,122,32,123],"zoom automation","zoom","first","Tools","search","MCP","via","meeting","automate","critical","creation","webinars","composio","recordings","tracking",{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":131,"publishedAt":41},"01M6GDRFS1452PC71JQ38S24HR","zoho-crm-automation","Automate Zoho CRM tasks via Rube MCP (Composio): create\u002Fupdate records, search contacts, manage leads, and convert leads. Always search tools first for current schemas.","https:\u002F\u002Fgithub.com\u002FSam-06060\u002Fjarvis-assistant\u002Fblob\u002Fmain\u002Fmodules\u002Fagent_skills\u002Fawesome-skills\u002Fplaybooks\u002Fzoho-crm-automation\u002FSKILL.md",[130],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[132,38,133,134,135,136,137,28,113,138,121,139,118,117,112,140,99,141,114,142],"crm automation","zoho crm","crm","zoho crm automation","zoho","leads","contacts","records","update","tasks","manage",{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":152,"publishedAt":41},"01M6GDRCKQBAVTGHX5XBH26KPZ","zod-validation-expert","Expert in Zod — TypeScript-first schema validation. Covers parsing, custom errors, refinements, type inference, and integration with React Hook Form, Next.js, and tRPC.","https:\u002F\u002Fgithub.com\u002FSam-06060\u002Fjarvis-assistant\u002Fblob\u002Fmain\u002Fmodules\u002Fagent_skills\u002Fawesome-skills\u002Fplaybooks\u002Fzod-validation-expert\u002FSKILL.md",[149],{"categoryNo":150,"categoryName":151,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",[29,153,154,155,156,100,40,157,158,159,160,161,95,162,163,164,165,28,166,167],"zod","zod validation expert","validation","react","parsing","errors","schema validation","react hook form","hook","trpc","form","type","next","schema","Next.js",{"skillNo":169,"name":170,"nameZh":6,"description":171,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":172,"categories":173,"keywords":175,"publishedAt":41},"01M6GDR658B08K4MY0RWD4A6EH","zeroize-audit","Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with assembly-level analysis, and control-flow verification. Use for auditing C\u002FC++\u002FRust code handling secrets, keys, passwords, or other sensitive data.","https:\u002F\u002Fgithub.com\u002FSam-06060\u002Fjarvis-assistant\u002Fblob\u002Fmain\u002Fmodules\u002Fagent_skills\u002Fawesome-skills\u002Fplaybooks\u002Fzeroize-audit\u002FSKILL.md",[174],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[176,177,178,179,180,181,182,183,28,184,185,186,187,188,189,190,191,192,193,114],"zeroize audit","audit","write","passwords","get","project","c++","activate","assembly","read","Bash","secrets","analysis","data","flow","verification","code","rust"]