Agent skill
tmux-test
Test klaude-code interactively using tmux with synchronous task completion. Use when testing UI features, verifying changes, or debugging interactive behavior. Eliminates polling/sleep by using KLAUDE_TEST_SIGNAL for precise synchronization.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/tmux-test-inspirepan-klaude-code
SKILL.md
tmux-test
Test klaude-code in an interactive tmux session with synchronous task completion.
Quick Start
# Create session and start klaude with signal
tmux new-session -d -s test -x 120 -y 30
tmux send-keys -t test 'KLAUDE_TEST_SIGNAL=done uv run klaude' Enter
sleep 3 # Wait for startup only
# Send request and wait for completion (no polling needed)
tmux send-keys -t test 'your prompt here' Enter
tmux wait-for done # Blocks until task completes
# Capture output
tmux capture-pane -t test -p -S -50
# Cleanup
tmux kill-session -t test
Key Points
KLAUDE_TEST_SIGNAL=<channel>: Environment variable that enables task completion signalingtmux wait-for <channel>: Blocks until the signal is sent (task completes)- Signal is only sent when main agent task finishes (not sub-agents)
- Use
-S -Nwith capture-pane to get N lines of scrollback history
Common Patterns
Multiple Sequential Requests
for prompt in "request 1" "request 2"; do
tmux send-keys -t test "$prompt" Enter
tmux wait-for done
tmux capture-pane -t test -p -S -30
done
Capture Full Output
tmux capture-pane -t test -p -S - # Entire scrollback
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?