tmux
Tmux Skill
This skill empowers you to manage multiple concurrent processes (like servers, watchers, or long builds) using tmux directly from the Bash tool.
Since you are likely already running inside a tmux session, you can spawn new windows or panes to handle these tasks without blocking your main communication channel.
1. Verify Environment & Check Status
First, verify you are running inside tmux:
echo $TMUX
If this returns empty, you are not running inside tmux and these commands will not work as expected.
Once verified, check your current windows:
tmux list-windows
2. Spawn a Background Process
To run a command (e.g., a dev server) in a way that persists and can be inspected:
-
Create a new detached window with a specific name. This keeps it isolated and easy to reference.
tmux new-window -n "server-log" -d(Replace "server-log" with a relevant name for your task)
-
Send the command to that window.
tmux send-keys -t "server-log" "./start-dev-server.sh" C-m(Replace with your project's start command.
C-msimulates Enter.)
3. Inspect Output (Read Logs)
You can read the output of that pane at any time without switching your context.
Get the current visible screen:
tmux capture-pane -p -t "server-log"
Get the entire history (scrollback):
tmux capture-pane -p -S - -t "server-log"
Use this if the output might have scrolled off the screen.
4. Interact with the Process
If you need to stop or restart the process:
Send Ctrl+C (Interrupt):
tmux send-keys -t "server-log" C-c
Kill the window (Clean up):
tmux kill-window -t "server-log"
5. Advanced: Chaining Commands
You can chain multiple tmux commands in a single invocation using ';' (note the quotes to avoid interpretation by the shell). This is faster and cleaner than running multiple tmux commands.
Example: Create window and start process in one go:
tmux new-window -n "server-log" -d ';' send-keys -t "server-log" "./start-dev-server.sh" C-m
Summary of Pattern
tmux new-window -n "ID" -dtmux send-keys -t "ID" "CMD" C-mtmux capture-pane -p -t "ID"
More from sebastiaanwouters/dotagents
flyctl
Deploy and manage apps on Fly.io using flyctl CLI. Triggers on: fly deploy, fly.io, flyctl, deploy to fly. Handles launch, deploy, scale, secrets, volumes, databases.
79teacher
Guide learning and deep understanding through proven methodologies (Socratic, Feynman, Problem-Based). Use when user says "help me understand", "teach me", "explain this", "learn about", "socratic", "feynman", "problem-based", "I don't understand", "confused about", "why does", or wants to truly grasp a concept.
77chef
Telegram communication for AI agents. ALL methods are BLOCKING. Use for user interviews, status updates, and feedback collection.
34bitwarden
Retrieves API keys, passwords, secrets from Bitwarden vault using bw CLI. Triggers on missing env variables, missing API keys, missing secrets, "secret not found", "env not set", or "use bw".
29librarian
Use for code research that needs dependency internals, upstream implementation examples, or external prior art. Always delegate to a subagent that investigates with opensrc and web search, then return only distilled findings, versions, paths, and links.
29frontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications. Generates creative, polished code that avoids generic AI aesthetics.
28