| name | tmux |
| description | Terminal orchestration via tmux. Use for long-running processes, server management, parallel terminal sessions, and background task monitoring. |
Tmux Skill
When to Load This Skill
- Running long-running processes (servers, watchers)
- Managing multiple terminal sessions
- Background task execution
- Parallel command execution
- Process monitoring
Session Management
Create Named Session
tmux new-session -d -s "op-dev"
tmux send-keys -t "op-dev" "npm run dev" Enter
List Sessions
tmux list-sessions
Attach to Session
tmux attach -t "op-dev"
Kill Session
tmux kill-session -t "op-dev"
Session Naming Convention
Use op-{purpose} pattern for OpenCode-managed sessions:
| Session | Purpose |
|---|
op-dev | Development server |
op-test | Test watcher |
op-build | Build process |
op-db | Database |
op-logs | Log tailing |
Common Workflows
Start Development Server
tmux kill-session -t "op-dev" 2>/dev/null || true
tmux new-session -d -s "op-dev"
tmux send-keys -t "op-dev" "cd /path/to/project && npm run dev" Enter
Check Server Output
tmux capture-pane -t "op-dev" -p -S -50
Run Parallel Tasks
tmux new-session -d -s "op-work"
tmux send-keys -t "op-work" "npm run typecheck" Enter
tmux new-window -t "op-work"
tmux send-keys -t "op-work" "npm run lint" Enter
tmux new-window -t "op-work"
tmux send-keys -t "op-work" "npm run test" Enter
Monitor Background Process
tmux send-keys -t "op-build" "npm run build" Enter
sleep 5
tmux capture-pane -t "op-build" -p -S -20
Window & Pane Management
Create Windows
tmux new-window -t "op-dev"
tmux new-window -t "op-dev" -n "logs"
Split Panes
tmux split-window -h -t "op-dev"
tmux split-window -v -t "op-dev"
Send Keys to Pane
tmux send-keys -t "op-dev:0.1" "tail -f logs.txt" Enter
Process Control
Send Interrupt (Ctrl+C)
tmux send-keys -t "op-dev" C-c
Send EOF (Ctrl+D)
tmux send-keys -t "op-dev" C-d
Kill Pane
tmux kill-pane -t "op-dev:0.1"
Best Practices
- Always use named sessions with
op- prefix
- Check if session exists before creating
- Capture output for verification evidence
- Clean up sessions when done
- Use separate sessions for unrelated tasks
Integration with OpenCode
tmux new-session -d -s "op-server" "npm run dev"
sleep 3
OUTPUT=$(tmux capture-pane -t "op-server" -p -S -10)
echo "$OUTPUT" | grep -q "Server started" && echo "✅ Server running"
tmux kill-session -t "op-server"