Tmux guide

From archibate/dotfiles-opencode · View interactive version

Tmux guide is an AI agent skill from the GitHub repository archibate/dotfiles-opencode. Tmux 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

How to use this skill

Skill file

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:

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:

List sessions

tmux ls | grep agent-

IMPORTANT:

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:

Clean up

Please clean up agent session after process exited:

tmux kill-session -t agent-vite-dev

IMPORTANT:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.