/autorun-skills:tmux-automationfrom autorun-skills
Runs, watches, and types into terminal programs in tmux or byobu panes without disturbing other sessions. Covers read-only discovery, target verification, sending keystrokes, capturing output, and resuming AI coding harnesses.
Ships in autorun-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
How to drive programs in tmux panes so that the intended pane receives the input and the user's other work is left alone.
byobu is a front end to tmux. Its sessions live on the tmux server, and
byobu <tmux-command> ... passes the command to tmux, so every tmux
command below also works on byobu sessions, written either way.
To test a program on a private tmux server, read
references/isolated-testing.md. To create, list and remove test sessions on
the user's server, read references/session-management.md.
<safety_rules>
list-sessions, list-windows, list-panes,
capture-pane -p and display-message -p change nothing.send-keys calls, and send text with
-l so it is typed literally.tmux -L <name>), never on the user's.</safety_rules>
tmux list-sessions -F '#{session_name}: #{session_windows} windows'
tmux list-panes -a -F '#{session_name}:#{window_index}.#{pane_index} active=#{pane_active} pid=#{pane_pid} #{pane_current_command} #{pane_current_path}'
tmux capture-pane -p -t work:3.1 -S -50 # last 50 lines of that pane
tmux display-message -p -t work:3.1 '#{cursor_y}' # row of the cursor (the input line)
A target is session:window.pane, for example work:3.1. Without .pane
it means the window's active pane.
An AI coding harness started from a shell shows the shell, or node, as
pane_current_command. To see what runs in the pane, list the children of
the pane's process:
pgrep -l -P <pane_pid>
tmux send-keys -t work:3.1 -l -- 'git status'
tmux send-keys -t work:3.1 Enter
Without -l, text that is exactly a key name (Enter, Up, Escape) is
sent as that key. Other keys, each in its own call: Enter (also C-m),
C-c, Escape, C-d, Tab, BTab (Shift+Tab), Up, Down.
byobu list-sessions, byobu send-keys ... and byobu capture-pane ...
are the same commands. byobu's function keys (F2 new window, F3 and F4
previous and next window, F6 detach, F8 rename) are for a person at the
keyboard; scripts use the commands.
-l, wait briefly, send Enter in a second call.T=work:3.1
tmux send-keys -t "$T" -l -- 'continue'
sleep 0.2
tmux send-keys -t "$T" Enter
sleep 1
row=$(tmux display-message -p -t "$T" '#{cursor_y}')
tmux capture-pane -p -t "$T" | sed -n "$((row + 1))p" # the input line now
C-c.
Capture the pane until the shell prompt is back.Enter in a second call).| Harness | Continue the latest session | Resume a named session |
|---|---|---|
| Claude Code | claude --continue | claude --resume <id> |
| Codex | codex resume --last | codex resume <id> |
| Pi | pi -c | pi --session <path or id> |
| Prime Agent | prime-agent -c | prime-agent -r <path or id> |
| Qwen Code | qwen -c | qwen -r <id> |
| Gemini CLI | gemini -r latest | gemini -r <index> |
| Antigravity | agy -c | agy --conversation <id> |
| OpenCode | opencode -c | opencode -s <id> |
| ForgeCode | none | forge --conversation-id <id> |
The commands come from each tool's --help; check it if a flag is refused.
C-m as two arguments of
one send-keys). A terminal UI can receive the Enter before it has
processed the text, or treat the burst as a paste, and the text is left
unsubmitted. Send them in two calls.send-keys -t T Up recalls history. Use -l
for text.test can already exist and belong to the
user. Use a unique name, for example autorun-test-$$, and check with
tmux has-session -t "=<name>" first (= matches the name exactly).$TMUX picks the server; a script
started elsewhere talks to the default server. -L <name> picks a named
server explicitly.sleep 2 too short. Poll
capture-pane until the expected prompt or output appears, with a limit.send-keys -l,
formats such as #{cursor_y})What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
tmux, byobu, terminal-automation, pane-management, keystroke-sending
11 skills in this plugin
/ai-skill-builderGuides creation, audit, and improvement of portable Agent Skills using the shared SKILL.md format and Anthropic's established methodology, without confusing the portable specification with runtime-specific extensions. Use when the user wants to "create a skill", "create an agent skill", "build a skill", "make a new skill", "write a new skill", "improve an existing skill", "audit my skill", "audit a SKILL.md", "refine my skill", "test a skill", "test skill discovery", "install skills across harnesses", "package a skill for distribution", or needs guidance on skill structure, semantic XML regions, progressive disclosure, description quality, frontmatter, scripts, arguments, security, testing, cross-harness compatibility, or distribution./cli-demo-recorderCreate demo videos for CLI and TUI tools. Use when user asks to "record a demo", "make a demo GIF", "create a demo video", "record my CLI tool", "asciinema demo", "demo recording script". Covers asciinema+agg+ffmpeg pipeline, tmux recording, multi-shell, and dual-purpose demo+test harnesses in Python, Rust, TypeScript, and Bash./function-signature-and-parameter-guidanceDesign and review caller-facing names and contracts: functions, tools, commands, CLI flags,
parameters, config keys, env vars, profiles, event types, and node/edge identifiers.
Check names, descriptions, help, docstrings, schemas, defaults, bounds, units, errors,
outputs, mutation, and whether values reach behavior.
Use when asked to "name a parameter", "parameter naming", "name this tool or command",
"choose a flag, option, or config key", "design an options object", "one tool or two",
"bool or enum here", "name a profile, field, event, node, or edge",
"make names clear and unambiguous", "check ISO, platform, or language naming",
"audit CLI/MCP/JSON-Schema help", "define accepted values or defaults",
"what should this return on failure", "rename this without breaking callers",
"improve an error message", "why did the caller pass the wrong argument",
"why did this parameter do nothing", or "red-team these descriptions".
Not for local variables, general prose, README copy, release notes, or commits.
npx claudepluginhub ahundt/autorun --plugin autorun-skillsOther plugins' skills for the same job