Skip to content
Back to skills

Tmux Guide

ASecurity

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 tool reports `timeout after 120000ms` 4. User request to run tasks in background

  • 106 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added September 12, 2026
databash

Security analysis

A100/100

Scanned September 12, 2026

npx -y skills add archibate/dotfiles-opencode --skill tmux-guide --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tmux Guide?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Tmux Guide
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/archibate-tmux-guide/badge)](https://www.skillsdirectory.com/skills/archibate-tmux-guide)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: tmux-guide
description: |
    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 tool reports `timeout after 120000ms`
    4. User request to run tasks in background
---
# 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`:
- This means the task you are running is expected to run for more than 2 minutes.
- Must use `tmux` for running this task.

## New session

```bash
tmux new-session -d -s agent-<task name> bash -c 'cd /path/to/project && <command to run>; echo "Process exited with $?"; sleep infinity'
```

**IMPORTANT:**
- ALWAYS name sessions with the `agent-` prefix.
- ALWAYS use `bash -c '...'` to encapsulate.
- ALWAYS use `cd /path/to/project` before running command.
- ALWAYS use `echo "Process exited with $?"; sleep infinity` after running command.

## List sessions

```bash
tmux ls | grep agent-
```

**IMPORTANT:**
- ALWAYS use `| grep agent-` to show agent created sessions only.

## Capture pane

Fetch the last 80 log lines for a task without attaching (returns immediately):

```bash
tmux capture-pane -t agent-vite-dev -S -80 -p
```

**IMPORTANT:**
- NEVER attach to a session.

## Clean up

Please clean up agent session after process exited:

```bash
tmux kill-session -t agent-vite-dev
```

**IMPORTANT:**
- NEVER kill-server.
- NEVER kill any sessions without `agent-` prefix.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.