agentleFS
foxl-aifoxl-ai/skills/skills/tmux/SKILL.md

tmux

Skill0 starsChanged 32 days agoMIT-0View on GitHub

Drive interactive programs (REPLs, TUIs, other coding agent CLIs) in detached tmux sessions that outlive Foxl, using send-keys and capture-pane through exec. Use when a session must survive a Foxl restart, several programs must run side by side, or the user works in tmux themselves; otherwise prefer the built-in terminal tool.

  • Installs packages

71 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use taskflow-inbox-triage, session-logs and 8 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AtomicBot-aiSkill

    taskflow-inbox-triage

    Also in 6 projects that use this

  • seedprodSkill

    session-logs

    Search and analyze your own session logs (older/parent conversations) using jq.

    Also in 20 projects that use this

  • AtomicBot-aiSkill

    taskflow

    Also in 7 projects that use this

  • jiulingyunSkill

    BlueBubbles

    为Clawdbot构建或更新BlueBubbles外部通道插件(扩展包,REST发送/探测,webhook入站)。

    Also in 16 projects that use this

  • hkyutongSkill

    openclaw-release-maintainer

    Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.

    Also in 4 projects that use this

  • seedprodSkill

    openai-whisper-api

    Transcribe audio via OpenAI Audio Transcriptions API (Whisper).

    Also in 21 projects that use this

  • +3 more from seedprod

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 66 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use a private socket so you never touch the user's own tmux server:

    line 18

“Common” is measured: kept by at least 6 in 10 of the 66 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

tmux via exec

First choice for one interactive program is the built-in terminal tool (real PTY: spawn, write, read). Use tmux when you need detached sessions that keep running independently, or many at once.

Install if missing (the user runs it): brew install tmux or the distro package (apt install tmux, dnf install tmux).

Setup

Use a private socket so you never touch the user's own tmux server:

SOCK="${TMPDIR:-/tmp}/foxl-tmux.sock"
tmux -S "$SOCK" new-session -d -s work -x 200 -y 50
tmux -S "$SOCK" has-session -t work && echo ok

Shell variables do not persist between exec calls; repeat the SOCK= line (or the literal path) in each command.

Send input

tmux -S "$SOCK" send-keys -t work -l -- 'python3 -q'   # -l: literal text
tmux -S "$SOCK" send-keys -t work Enter                # named key, separate call
tmux -S "$SOCK" send-keys -t work C-c                  # interrupt

Send text and Enter as two calls; TUIs often drop an Enter glued to pasted text.

Read output

tmux -S "$SOCK" capture-pane -p -J -t work -S -200     # last 200 lines, wrapped lines joined

Poll instead of sleeping long: capture, check for the prompt or the text you expect, repeat after a short sleep 2. For a full log, tmux -S "$SOCK" pipe-pane -o -t work 'cat >> /tmp/work.log'.

Several sessions

for n in a b c; do tmux -S "$SOCK" new-session -d -s "job-$n" -c "$HOME/projects/$n"; done
tmux -S "$SOCK" list-sessions

Targets are session, session:window or session:window.pane.

Hand off and clean up

The user can watch with tmux -S <socket path> attach -t work (detach: Ctrl-b then d). When finished:

tmux -S "$SOCK" kill-session -t work
tmux -S "$SOCK" kill-server        # all sessions on this private socket only

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.