tmux-interactive-processes
Skill2 starsChanged 13 days agoMITView on GitHub
Use tmux instead of background bash for long-running, interactive, inspectable, or user-attachable terminal processes. Use for development servers, watch-mode tests, REPLs, debuggers, interactive CLIs, log tailing, and commands that may run indefinitely or need later input/inspection.
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agents-mdSkill
- chatgpt-share-markdownSkill
- ddgrSkill
- ghSkill
- jiraSkill
- jjSkill
- khalSkill
- notmuchSkill
- skill-creatorSkill
- taskwarriorSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 12 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use tmux when a command needs to keep running, accept later input, show ongoing output, or remain available for human attachment.
- Distinctive: line 10
Prefer tmux over raw background shell patterns because the process stays visible, inspectable, attachable, and controllable.
- Distinctive: line 14
Do not use these patterns for long-running or interactive work:
- Distinctive: line 24
Use normal shell execution only when the command runs to completion and prints final output.
- Distinctive: line 28
Use stable, descriptive names:
- Distinctive: line 43
Check existing sessions before creating a new one:
- Distinctive: line 53
Create a detached session from the current working directory:
- Very specific: line 82
Use capture-pane to verify readiness, failures, prompts, and current state.
- Very specific: line 98
Use send-keys for REPLs, debuggers, prompts, and graceful shutdown.
- Distinctive: line 102
When useful, report the session name and attach command:
- Distinctive: line 110
Prefer graceful shutdown first:
- Distinctive: line 122
Remove the session only when it is no longer needed:
- Distinctive: line 140
If a command is expected to run continuously, wait for input, display ongoing output, or require later interaction, use tmux.
- Distinctive: line 142
If a command runs to completion and only prints final output, use normal shell execution.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Tmux Interactive Processes
Use tmux when a command needs to keep running, accept later input, show ongoing output, or remain available for human attachment.
Prefer tmux over raw background shell patterns because the process stays visible, inspectable, attachable, and controllable.
Avoid Background Bash
Do not use these patterns for long-running or interactive work:
command &
nohup command &
command > log.txt 2>&1 &
disown
tail -f log.txtUse normal shell execution only when the command runs to completion and prints final output.
Session Names
Use stable, descriptive names:
agent-<repo-or-project>-<purpose>Examples:
agent-myapp-dev
agent-myapp-tests
agent-myapp-debug
agent-myapp-replCheck existing sessions before creating a new one:
tmux list-sessionsReuse a matching session when appropriate.
Start Commands
Create a detached session from the current working directory:
tmux new-session -d -s agent-myapp-dev -c "$PWD" 'npm run dev'For commands with tricky quoting, start a shell first:
tmux new-session -d -s agent-myapp-dev -c "$PWD" bash
tmux send-keys -t agent-myapp-dev 'npm run dev' C-mInspect the pane after startup before claiming success.
Inspect Output
Capture recent output:
tmux capture-pane -pt agent-myapp-dev -S -200Capture more history:
tmux capture-pane -pt agent-myapp-dev -S -1000Use capture-pane to verify readiness, failures, prompts, and current state.
Send Input
Send text followed by Enter:
tmux send-keys -t agent-myapp-dev 'help' C-mSend control keys:
tmux send-keys -t agent-myapp-dev C-cUse send-keys for REPLs, debuggers, prompts, and graceful shutdown.
User Attachment
When useful, report the session name and attach command:
tmux attach -t agent-myapp-devStop Sessions
Prefer graceful shutdown first:
tmux send-keys -t agent-myapp-dev C-cInspect after shutdown:
tmux capture-pane -pt agent-myapp-dev -S -100Remove the session only when it is no longer needed:
tmux kill-session -t agent-myapp-devChecklist
- Run
tmux list-sessions. - Reuse a matching session or create a detached session.
- Capture pane output after startup.
- Report the session name to the user.
- Inspect with
capture-panebefore making claims about state. - Interact with
send-keyswhen input is needed. - Clean up sessions that are no longer needed.
Decision Rule
If a command is expected to run continuously, wait for input, display ongoing output, or require later interaction, use tmux.
If a command runs to completion and only prints final output, use normal shell execution.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

