Tmux
An opinionated collection of Agent Skills I use daily in my work.
npx -y skills add nibzard/skills --skill tmuxAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use tmux to run and test our interactive CLI/TUI end-to-end. Includes how to start, send keys, capture output, and cleanly stop (double Ctrl+C).
SKILL.md
2.7 KB, as published. Nobody here has run it
cli-tmux skill: run & test the CLI using tmux
Use this skill when
- The user asks to test the CLI end-to-end and it is interactive (TUI prompts, key navigation).
- A command needs a real TTY or long-running process (dev server) that should keep running while we do other tasks.
Golden rules
- Prefer
scripts/tmuxctl.shover raw tmux commands for repeatability. - Use an isolated tmux server socket so we don't interfere with the user's real tmux sessions.
- Use a predictable session name:
agent-cli. - Always capture pane output after each interaction and summarize it before proceeding.
- Always clean up: stop the TUI and kill the session at the end (unless the user wants it left running).
tmuxctl.sh wrapper (preferred)
Prefer scripts/tmuxctl.sh over raw tmux commands for repeatability:
scripts/tmuxctl.sh start- Create new tmux sessionscripts/tmuxctl.sh run ./bin/ourcli- Run command in the sessionscripts/tmuxctl.sh keys Down Down C-m- Send keystrokesscripts/tmuxctl.sh capture- Capture pane outputscripts/tmuxctl.sh stop- Stop the TUI (double Ctrl+C)scripts/tmuxctl.sh kill- Kill the session
Our CLI/TUI specifics
- To exit the TUI, send double Ctrl+C:
C-cthenC-c. - If double Ctrl+C doesn't exit, fallback to killing the tmux pane/session.
Standard tmux setup (isolated socket)
- Socket path:
.tmp/tmux-agent.sock - Session:
agent-cli - Pane target:
agent-cli:0.0
Create session (if missing)
- Ensure
.tmp/exists. - Start detached session in repo root:
tmux -S .tmp/tmux-agent.sock new-session -d -s agent-cli -c "$PWD"
Start the CLI
- Send the run command (replace with our real command):
- Example:
./bin/ourcliORpnpm ourcliORgo run ./cmd/ourcli
- Example:
- Use:
tmux -S .tmp/tmux-agent.sock send-keys -t agent-cli:0.0 "<COMMAND HERE>" C-m
Interact
- Send keys as needed:
- Enter:
C-m - Up/Down:
Up/Down - Quit:
C-c C-c(double)
- Enter:
Capture output (after each step)
tmux -S .tmp/tmux-agent.sock capture-pane -t agent-cli:0.0 -p
End-to-end CLI test recipe
- Start session (or reuse if running).
- Launch CLI command.
- Capture initial screen and confirm expected prompt/state.
- Perform the requested flows (send keys + capture after each step).
- Exit TUI with
C-c C-c, capture output to confirm exit. - Kill session (unless user asked to keep it).
Cleanup
- Preferred:
- Send
C-c C-c, thentmux ... kill-session -t agent-cli
- Send
- If tmux is wedged:
tmux -S .tmp/tmux-agent.sock kill-server