Agent skill

Tmux Run

by meain in meain/dotfiles

Run a command in a tmux pane/window/session and monitor its output for errors.

MITAuto-check passed

Install Tmux Run

skills CLI
$ npx skills add meain/dotfiles --skill tmux-run -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install meain/dotfiles tmux-run --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/meain/dotfiles.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agents/.agents/skills/tmux-run .claude/skills/tmux-run && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
tmux-run
GitHub stars
285
Token cost
~1.4k tokens
SKILL.md length
664 words
Files
1
Skills in repo
35
Repo updated
First seen
Licence
MIT

At a glance

Run a command in a tmux pane/window/session and monitor its output for errors.

  • Works in 4 steps: Determine or create the target pane → Send the command → Monitor output → …
  • SKILL.md covers Step 1: Determine or create…, Step 2: Send the command, Step 3: Monitor output and Step 4: System notification on…, plus 1 more section
  • Calls osascript

What it does

Tmux Run is an agent skill from meain/dotfiles. Run a command in a tmux pane/window/session and monitor its output for errors. Triggers: /tmux-run, 'run in tmux', 'run in the other pane', 'run on the left', 'run in a new window', 'run in a new session', 'monitor tmux', 'watch tmux'

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with tmux and Bash. The repository describes itself as: If there is a shell, there is a way! The licence is MIT.

Example prompts

  • “run in tmux”
  • “run in the other pane”
  • “run on the left”
  • “/tmux-run”

Requirements

  • Node.js

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Determine or create the target pane
  2. Send the command
  3. Monitor output
  4. System notification on failure

What it can do on your machine

Read from SKILL.md and the folder at commit 3e336e2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • osascript

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Tmux Run loads about 1.4k tokens when it runs. Until then it costs about 61 tokens; SKILL.md has 664 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~61
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from meain/dotfiles at commit 3e336e2, republished under its MIT licence (© meain). 664 words, ~1,376 tokens.

Download SKILL.mdSave it as .claude/skills/tmux-run/SKILL.md (or your agent's skills folder).
name
tmux-run
description
Run a command in a tmux pane/window/session and monitor its output for errors. Triggers: /tmux-run, 'run in tmux', 'run in the other pane', 'run on the left', 'run in a new window', 'run in a new session', 'monitor tmux', 'watch tmux'
user_invocable
true

Tmux Run & Monitor

Run a command in a tmux pane and continuously monitor its output, notifying the user via system notification if something fails.

Sandbox: All tmux commands require dangerouslyDisableSandbox: true (socket access at /private/tmp/tmux-*/).

Step 1: Determine or create the target pane

The user may specify where to run the command. Handle each case:

Case A: Existing sibling pane ("left pane", "other pane", "the pane on the right")

NEVER use relative targets like -t left or -t right — they resolve based on the focused pane, which is not yours. Instead, discover the correct pane ID (%<number>):

bash
tmux list-panes -a -F '#{pane_id} #{pane_current_command} #{pane_current_path} #{window_name} #{pane_active}'
  1. Find the pane running claude in the current working directory — that is your pane.
  2. Find sibling panes in the same window (same window_name). The other pane (typically running zsh, bash, make, etc.) is the target pane.
  3. If there are multiple candidates, prefer the one running a shell (zsh/bash) in the same or related project directory.
  4. Record the pane ID (e.g., %119) and use it for ALL subsequent tmux commands.
Case B: New split pane ("split a pane", "open a new pane")
bash
# Split horizontally (side by side)
tmux split-window -h -t %<YOUR_PANE_ID> -P -F '#{pane_id}'
# Split vertically (top/bottom)
tmux split-window -v -t %<YOUR_PANE_ID> -P -F '#{pane_id}'

Capture the printed pane ID from -P -F '#{pane_id}' for monitoring.

Case C: New window ("new window", "another window")
bash
tmux new-window -P -F '#{pane_id}'

If the command should run in a specific directory:

bash
tmux new-window -c '/path/to/dir' -P -F '#{pane_id}'
Case D: New session ("new session", "separate session")
bash
tmux new-session -d -s '<session-name>' -c '/path/to/dir' -P -F '#{pane_id}'
After identifying or creating the target

Tell the user which pane ID you are using and why. Always store the %<number> ID — never rely on names or relative positions after this point.

Step 2: Send the command

bash
tmux send-keys -t %<PANE_ID> '<command>' Enter
  • Quote the command properly to avoid shell interpretation issues.
  • If the user wants to run the command in a specific directory and the pane is already open, cd first:
    bash
    tmux send-keys -t %<PANE_ID> 'cd /path/to/dir && <command>' Enter

Step 3: Monitor output

Use periodic captures to check the pane output:

bash
tmux capture-pane -t %<PANE_ID> -p -S -100
Existing output in the pane

The target pane may already contain output from previous commands. On your first capture (right after sending the command), note what's already there so you can distinguish old output from new output. Look for your sent command in the pane to find where new output begins. Only evaluate errors/success from output after your command was sent.

Timing

Choose wait times and polling intervals based on the command:

  • Fast commands (ls, cat, simple scripts): no initial wait, poll every 5-10s
  • Medium commands (build, test, npm install): 5s initial wait, poll every 15-30s
  • Long commands (pulumi, terraform, make with infra): 10-15s initial wait, poll every 30-60s
Show full SKILL.md (259 more words)Show less
Completion detection

Look for:

  • Shell prompt returning (the user's prompt pattern)
  • make: *** pattern (Makefile failures)
  • error:, Error:, ERROR:, FAILED, fatal in output
  • The pane's current command reverting to a shell (check with tmux list-panes -t %<PANE_ID> -F '#{pane_id} #{pane_current_command}')
Scroll back

If the visible pane doesn't show enough, increase -S value (e.g., -S -200, -S -500).

Background monitoring

Use run_in_background: true on sleep+capture commands so you can do other work while waiting.

What to report
  • On success: Briefly summarize what completed and any notable outputs.
  • On failure: Send a system notification (see below) AND tell the user in chat with:
    • Which step/command failed
    • The error message
    • Your analysis of the root cause
    • Suggested fix if you can determine one (read relevant source files to diagnose)

Step 4: System notification on failure

When a failure is detected, send a macOS notification:

bash
osascript -e 'display notification "SUMMARY_HERE" with title "Command Failed" sound name "Basso"'

Keep the summary under 200 characters. Include the failing step name and a brief reason.

Important notes

  • Only run the specifically requested command in tmux. Any other commands needed for the task (e.g., looking up information, reading files, searching code) should be run directly in Claude Code using the normal tools. Tmux is only for the command the user explicitly asked to run there.
  • The user may ask you to do other work while monitoring. Use run_in_background: true for the sleep+capture commands to avoid blocking.
  • If the pane's working directory changes or a new command starts, re-evaluate whether you're still monitoring the right thing.
  • If the pane is in a different directory than needed, cd before running the command.

© meain, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in agents/.agents/skills/tmux-run of meain/dotfiles.

Open the folder on GitHubat commit 3e336e2

Compare with similar skills

Tmux Run next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Tmux Run compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Tmux Run this skillmeain/dotfiles285—~1.4kAutomated safety check: PassMIT
Teamethanhq/cc-fleet215—~3.4kAutomated safety check: PassApache-2.0
Tmuxsickn33/agentic-awesome-skills47k2 repos~2.8kAutomated safety check: PassMIT
Tmux Long Tasksintel/torch-xpu-ops115—~530Automated safety check: PassMIT
Tmux CLIsammcj/agentic-coding162—~923Automated safety check: PassApache-2.0
Dotfiles Managereinverne/dotfiles121—~1.3kAutomated safety check: NotesGPL-3.0

Similar skills

  • Team

    ethanhq/cc-fleet

    Spawn long-lived provider LLM teammates in tmux panes that you message via the native agent-team tools — multi-turn, collaborative, watchable.

    215 GitHub stars~3.4k tokensUpdated 10 days ago
    Agent WorkflowsAuto-check passed
  • Tmux

    sickn33/agentic-awesome-skills

    Expert tmux session, window, and pane management for terminal multiplexing, persistent remote workflows, and shell scripting automation.

    47k GitHub starsUsed in 2 repos~2.8k tokens
    DevelopmentAuto-check passed
  • Tmux Long Tasks

    intel/torch-xpu-ops

    Official

    Use tmux to launch and manage long-running jobs that must survive beyond the bash tool timeout.

    115 GitHub stars~530 tokensUpdated today
    Auto-check passed
  • Tmux CLI

    sammcj/agentic-coding

    CLI utility to help when running ongoing interactive CLI sessions or using tmux to communicate with other CLI Agents.

    162 GitHub stars~923 tokensUpdated today
    Auto-check passed
  • Dotfiles Manager

    einverne/dotfiles

    Comprehensive knowledge of dotfiles management, configuration file organization, symlink strategies, and cross-platform environment setup.

    121 GitHub stars~1.3k tokensUpdated 1 mo ago
    Productivity & AutomationAuto-check: notes
  • Tmux Guide

    archibate/dotfiles-opencode

    Tmux skill for running background tasks. An agent skill from archibate/dotfiles-opencode.

    108 GitHub stars~445 tokensUpdated 5 mo ago
    AI & LLM EngineeringAuto-check passed

More from meain/dotfiles

All 35 skills in this repo
  • Recall

    meain/dotfiles

    Search past Claude Code and Codex sessions. An agent skill from meain/dotfiles.

    285 GitHub starsUsed in 1 repo~684 tokens
    Auto-check passed
  • Grill With Docs

    meain/dotfiles

    Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise.

    285 GitHub starsUsed in 20 repos~875 tokens
    Auto-check passed
  • Backlog

    meain/dotfiles

    Daily backlog management — full planning review OR add a single entry from a URL.

    285 GitHub stars~3k tokensUpdated yesterday
    Auto-check passed
  • Concern Review

    meain/dotfiles

    Generate an interactive local HTML review page for a large PR or diff, grouping the changed files by logical concern (not just by file) so a reviewer can go through one theme at a time instead of a…

    285 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • My Weekly Report

    meain/dotfiles

    Generate a concise weekly status update in team format. An agent skill from meain/dotfiles.

    285 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Web Search

    meain/dotfiles

    Search the web using lynx and DuckDuckGo. An agent skill from meain/dotfiles.

    285 GitHub stars~830 tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Tmux Run

What does Tmux Run do?

Run a command in a tmux pane/window/session and monitor its output for errors. Tmux Run is an agent skill from meain/dotfiles. Run a command in a tmux pane/window/session and monitor its output for errors.

How do I install Tmux Run in Claude Code?

Run `npx skills add meain/dotfiles --skill tmux-run -a claude-code`. Or copy the skill folder (agents/.agents/skills/tmux-run in meain/dotfiles) into .claude/skills/tmux-run in your project. Claude Code loads it when a task matches its description.

How do I install Tmux Run in Codex?

Run `npx skills add meain/dotfiles --skill tmux-run -a codex`. Or copy the skill folder (agents/.agents/skills/tmux-run in meain/dotfiles) into .agents/skills/tmux-run in your project. Codex loads it when a task matches its description.

Can I use Tmux Run in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add meain/dotfiles --skill tmux-run -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tmux-run, .gemini/skills/tmux-run, .github/skills/tmux-run and .opencode/skills/tmux-run in your project.

What does Tmux Run need to run?

Going by SKILL.md and its folder, Tmux Run needs the command-line tools its instructions call (osascript). Our summary lists: Node.js.

Does Tmux Run access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Tmux Run safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Tmux Run use?

Tmux Run is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Tmux Run use?

About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Tmux Run?

Skills that share tags, products or a category with Tmux Run: Team (ethanhq/cc-fleet, 215 stars), Tmux (sickn33/agentic-awesome-skills, 47k stars), Tmux Long Tasks (intel/torch-xpu-ops, 115 stars) and Tmux CLI (sammcj/agentic-coding, 162 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Tmux Run?

meain (a GitHub user) maintains it in meain/dotfiles, which has 285 GitHub stars. The repository holds 35 skills in this directory. The repository was last updated on October 8, 2026.

Source: meain/dotfiles on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.