一键导入
tmux
Control interactive CLIs (python, gdb, etc.) via tmux sessions - send keystrokes and scrape output
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Control interactive CLIs (python, gdb, etc.) via tmux sessions - send keystrokes and scrape output
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
| name | tmux |
| description | Control interactive CLIs (python, gdb, etc.) via tmux sessions - send keystrokes and scrape output |
Use tmux to control interactive terminal applications by sending keystrokes and capturing output.
# Create session
tmux new-session -d -s "$SESSION" -x 120 -y 40
# Send commands
tmux send-keys -t "$SESSION" "python3" Enter
# Capture output
tmux capture-pane -t "$SESSION" -p
# Wait for prompt (poll)
for i in {1..30}; do
output=$(tmux capture-pane -t "$SESSION" -p)
if echo "$output" | grep -q ">>>"; then break; fi
sleep 0.5
done
# Cleanup
tmux kill-session -t "$SESSION"
For mise-installed tools, wrap in zsh:
# Non-interactive (won't hang)
ssh host 'zsh -c "source ~/.zshrc; tmux new-session -d -s mysession; tmux send-keys -t mysession python Enter"'
# Interactive (for tmux attach) - needs TTY
ssh host -t 'zsh -ilc "tmux attach -t mysession"'
Critical: Use zsh -c "source ~/.zshrc; ..." not zsh -lc to avoid hangs.
After starting a session, ALWAYS print:
To monitor: tmux attach -t $SESSION
To capture: tmux capture-pane -t $SESSION -p
-x 120 -y 40 for consistent pane sizecapture-pane -p rather than wait-for-l flag to avoid shell expansionC-c (interrupt), C-d (EOF), EscapePYTHON_BASIC_REPL=1 to avoid fancy console interferencePoll tmux pane for a text pattern with timeout:
scripts/wait-for-text.sh -t session:0.0 -p '^>>>' -T 15
List tmux sessions, optionally filtered:
scripts/find-sessions.sh -q claude # filter by name
scripts/find-sessions.sh --all # all sessions
Safely review, sync, and locally update forked tmux plugins. Use whenever the user mentions tmux-upstream, tmux plugin forks, `prefix + U`, a `connorads/<plugin>` fork being commits behind upstream, asks whether a tmux plugin update is dodgy/compromised/safe, or asks to sync/update a forked tmux plugin. Default to review-only and ask before syncing unless the user explicitly requested automatic safe sync.
Catalogue of preferred linter rules, TypeScript flags, clippy thresholds, and architectural boundary checks for making bug classes and design drift mechanically impossible. Use when setting up linting in a new project, hardening an existing project, responding to a class of bug by encoding a rule, or deciding which linter to reach for on a given stack. Pairs with the `hk` skill which handles wiring hooks.
Design and write effective tests for behavioural changes, bug fixes, and refactors. Use when choosing a test layer, practising TDD, picking doubles/fakes, reducing brittle or flaky tests, refactoring safely, or applying property-based, snapshot/approval, differential/metamorphic, or contract testing. For coverage, thresholds, mutation testing, fuzzing, and CI/hook enforcement, use the test-coverage skill.
Create, update, validate, and submit Homebrew formulae (homebrew-core, built from source). Use when the user mentions a Homebrew formula, Homebrew/homebrew-core, adding/updating a formula, brew create, building from source, a build system in a brew context (cargo/rust, go, cmake, meson, autotools/configure, make, python virtualenv, node/npm, ruby gem), resource blocks, depends_on/keg_only/uses_from_macos, the mandatory test do block, bottles, livecheck, brew bump-formula-pr, or when asked to run brew audit --new / brew test / brew style for a formula. For macOS GUI apps and prebuilt binaries use the homebrew-cask-authoring skill instead.
Systematically audit, improve, and enforce test coverage, and gate test quality in CI — across any ecosystem (TypeScript, Python, Go, Rust). Use to raise coverage, set thresholds, audit gaps, manage exclusions, merge reports, wire coverage into CI/hooks, or add mutation testing and fuzzing as quality gates. Composes with the hk skill for pre-commit enforcement. For how to design and write good tests — property-based, snapshot/approval, differential, contract, flaky-test handling — use the testing skill.
Safely refresh the vendored third-party agent skills in this dotfiles repo. Use whenever the user wants to update, refresh, upgrade, or re-pull vendored skills (`skills update`), or asks to check whether a skill refresh is safe / dodgy / compromised before committing. `skills update` is an unauthenticated git clone with no quarantine, no signature, and no scan — and skill files are instructions injected into every agent session — so this skill gates each refresh by reading the diff and only auto-commits trusted-source, clean-diff updates.