AGENT SKILL

tmux

Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.

License 许可
MIT
最近更新
2026-11-12
Stars
★ 3
Forks
1

01 前言 Front Matter

name
tmux
description
Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.

02 资源文件 2

03 SKILL.md 正文

tmux Skill

Use tmux only when you need an interactive TTY. Prefer bash background mode for long-running, non-interactive tasks.

Quickstart (isolated socket)

SOCKET_DIR="${TMPDIR:-/tmp}/codebuddy-tmux-sockets"
mkdir -p "$SOCKET_DIR"
SOCKET="$SOCKET_DIR/codebuddy.sock"
SESSION=codebuddy-python

tmux -S "$SOCKET" new -d -s "$SESSION" -n shell
tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -- 'PYTHON_BASIC_REPL=1 python3 -q' Enter
tmux -S "$SOCKET" capture-pane -p -J -t "$SESSION":0.0 -S -200

Socket convention

  • Default socket dir: ${TMPDIR:-/tmp}/codebuddy-tmux-sockets
  • Default socket path: "$SOCKET_DIR/codebuddy.sock"

Targeting panes

  • Target format: session:window.pane (defaults to :0.0)
  • Keep names short; avoid spaces.

Finding sessions

  • List sessions: {baseDir}/scripts/find-sessions.sh -S "$SOCKET"
  • Scan all sockets: {baseDir}/scripts/find-sessions.sh --all

Sending input safely

  • Literal sends: tmux -S "$SOCKET" send-keys -t target -l -- "$cmd"
  • Control keys: tmux -S "$SOCKET" send-keys -t target C-c

Watching output

  • Capture recent: tmux -S "$SOCKET" capture-pane -p -J -t target -S -200
  • Wait for prompts: {baseDir}/scripts/wait-for-text.sh -t session:0.0 -p 'pattern'

Cleanup

  • Kill session: tmux -S "$SOCKET" kill-session -t "$SESSION"
  • Kill all: tmux -S "$SOCKET" kill-server

Helper: wait-for-text.sh

{baseDir}/scripts/wait-for-text.sh -t session:0.0 -p 'pattern' [-F] [-T 20] [-i 0.5] [-l 2000]

04 同仓库更多 Skills

welflau
welflau/ai-dev-system

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

★ 3
welflau
welflau/ai-dev-system

internal-comms

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

★ 3
welflau
welflau/ai-dev-system

web-artifacts-builder

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

★ 3
welflau
welflau/ai-dev-system

frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.

★ 3
welflau
welflau/ai-dev-system

algorithmic-art

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

★ 3
welflau
welflau/ai-dev-system

theme-factory

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

★ 3