archibate/dotfiles-opencode / tmux-guide
tmux-guide
VerifiedTmux skill for running background tasks. Use this skill when: 1. Before any tasks that can potentially run for more than 2 minutes (e.g.: package install, many tests, model training) 2. Before any tasks that are expected to run indefinitely in background (e.g.: web servers, port forwarding) 3. Bash tool reports `timeout after 120000ms` 4. User request to run tasks in background
Tmux guidelines
Use tmux for any tasks run for more than 2 minutes or run indefinitely.
Examples are: package install, many tests, web servers, port forwarding, dataset pipeline, model training.
If bash tool reports timeout after 120000ms:
- This means the task you are running is expected to run for more than 2 minutes.
- Must use
tmuxfor running this task.
New session
tmux new-session -d -s agent-<task name> bash -c 'cd /path/to/project && <command to run>; echo "Process exited with $?"; sleep infinity'
IMPORTANT:
- ALWAYS name sessions with the
agent-prefix. - ALWAYS use
bash -c '...'to encapsulate. - ALWAYS use
cd /path/to/projectbefore running command. - ALWAYS use
echo "Process exited with $?"; sleep infinityafter running command.
List sessions
tmux ls | grep agent-
IMPORTANT:
- ALWAYS use
| grep agent-to show agent created sessions only.
Capture pane
Fetch the last 80 log lines for a task without attaching (returns immediately):
tmux capture-pane -t agent-vite-dev -S -80 -p
IMPORTANT:
- NEVER attach to a session.
Clean up
Please clean up agent session after process exited:
tmux kill-session -t agent-vite-dev
IMPORTANT:
- NEVER kill-server.
- NEVER kill any sessions without
agent-prefix.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |