Remote control tmux sessions for interactive CLIs (python, gdb, etc.) by sending keystrokes and scraping pane output.
The tmux skill is designed for remote control and interaction with tmux sessions, enabling users to send keystrokes and capture pane output for various command-line interfaces (CLIs) such as Python and GDB. It offers a seamless way to automate terminal-based workflows, particularly useful for managing long-running interactive processes on remote systems or within containerized environments. With tmux as the underlying terminal multiplexer, this skill allows precise control over terminal panes, facilitating scripting and remote debugging tasks with minimal manual input.
To start a session, you can follow the quickstart guide provided in the documentation, which includes commands to set up a private socket and initiate a tmux session for interactive work.
The skill is designed to work with stock tmux on Linux and macOS, avoiding any custom configurations. It's recommended to use a private socket to avoid conflicts with user-specific tmux setups.
You can monitor a tmux session remotely by using the 'tmux attach' command with the appropriate socket and session name, or by capturing the output with 'tmux capture-pane'.
You can troubleshoot by checking the tmux logs or using the helper script to poll for session output. Ensure the correct socket and session names are used, and verify your system's environment variables.
When spawning processes like Python or GDB, specific environment variables must be set. For example, Python sessions should always have 'PYTHON_BASIC_REPL=1' to avoid issues with interactive prompts.
Quick Setup:
.claude/skills/Repository
mitsuhiko/agent-stuff