Synthèse automatique
Ce skill explique comment utiliser tmux depuis l'outil Bash pour lancer et piloter des processus concurrents (serveurs, builds longs, autres agents) dans des fenêtres ou panes séparés.
Points forts
- Couvre la création de fenêtres détachées nommées et l'envoi de commandes sans bloquer le canal principal
- Distingue clairement send-keys simple, mode littéral -l et load-buffer/paste-buffer pour le texte multi-ligne
- Explique la lecture de sortie via capture-pane, y compris le scrollback complet
- Fournit une référence rapide et le chaînage de commandes tmux en un seul appel
Limites
- Suppose que la session tourne déjà dans tmux ; sans $TMUX les commandes échouent
- Repose entièrement sur l'outil Bash et des cibles de pane/fenêtre valides, sans gestion d'erreurs décrite
- Ne traite pas la persistance après redémarrage ni la sécurité des instructions envoyées à d'autres agents
À utiliser lorsqu'il faut démarrer un serveur de développement, surveiller un build long ou transmettre des instructions multi-lignes à un autre agent dans un pane tmux.
À éviter si l'environnement n'est pas dans une session tmux ou si un simple appel Bash en arrière-plan suffit.
Analyse de sécurité
PrudenceThe skill uses tmux for legitimate process management and inter-pane communication. While it can send commands to other panes, including other AI agents, it does not instruct destructive actions, exfiltration, or obfuscation. The main risk is unintended command injection into other terminal sessions, which warrants caution rather than a safe rating.
- •Uses Bash to execute tmux commands that can send arbitrary keystrokes to other panes, potentially affecting other agents or processes.
- •Instructs writing multi-line content to /tmp files and loading them into tmux buffers, which is a legitimate but powerful mechanism for injecting input into terminals.
Exemples
Start the Next.js dev server in a detached tmux window called "dev-server" so it keeps running, then show me the last 50 lines of its log.Paste these multi-line refactor instructions into the tmux pane running the other Claude instance using load-buffer and paste-buffer, then press Enter.Look at the output of the "test-watcher" tmux window, and if the tests are passing, send Ctrl+C and kill that window.name: tmux description: Manage concurrent processes using tmux. Use when running servers, long tasks, or orchestrating multiple agents in separate panes. Essential for sending multi-line text or instructions to other tmux panes safely. allowed-tools:
- Bash
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" "npm start" C-m(
C-msimulates the Enter key)
3. Sending Text to Panes
Warning: send-keys interprets control sequences. Multi-line text or text with special characters can trigger tmux modes (like C-r for search). Use the right method:
| Content Type | Method |
|--------------|--------|
| Simple shell command | send-keys "cmd" C-m |
| Single line, may have special chars | send-keys -l "text" then send-keys C-m |
| Multi-line text or instructions | load-buffer + paste-buffer |
Literal mode (-l flag) prevents interpreting escape sequences:
tmux send-keys -l -t "target" "text with C-r and other chars"
tmux send-keys -t "target" C-m
Multi-line content — always use load-buffer:
cat > /tmp/msg.txt << 'EOF'
Your multi-line content here.
Can include any characters safely.
EOF
tmux load-buffer /tmp/msg.txt && tmux paste-buffer -t "target"
tmux send-keys -t "target" C-m
4. Interacting with Other Agents
When sending instructions to another Claude instance running in a tmux pane:
cat > /tmp/instructions.txt << 'EOF'
Fix the authentication bug in src/auth.ts:
1. The token validation is missing null checks
2. Add proper error handling for expired tokens
EOF
tmux load-buffer /tmp/instructions.txt && tmux paste-buffer -t %31
tmux send-keys -t %31 C-m
Never use send-keys directly for prompts or instructions — the text will likely contain characters that trigger tmux modes.
5. 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.
6. 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"
7. 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" "npm start" C-m
Quick Reference
| Task | Command |
|------|---------|
| Create window | tmux new-window -n "ID" -d |
| Run command | tmux send-keys -t "ID" "cmd" C-m |
| Send literal text | tmux send-keys -l -t "ID" "text" |
| Send multi-line | tmux load-buffer file && tmux paste-buffer -t "ID" |
| Read output | tmux capture-pane -p -t "ID" |
| Interrupt | tmux send-keys -t "ID" C-c |
| Kill window | tmux kill-window -t "ID" |
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/concurrent-process-management-with-tmux-mmlj2ny1/download' --output '.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1/SKILL.md.part' && mv '.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1/SKILL.md.part' '.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Extrait original : Quick Reference
| Task | Command |
|---|---|
| Create window | tmux new-window -n "ID" -d |
| Run command | tmux send-keys -t "ID" "cmd" C-m |
| Send literal text | tmux send-keys -l -t "ID" "text" |
| Send multi-line | tmux load-buffer file && tmux paste-buffer -t "ID" |
| Read output | tmux capture-pane -p -t "ID" |
| Interrupt | tmux send-keys -t "ID" C-c |
| Kill window | tmux kill-window -t "ID" |
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.
Claude Code
test -f '.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1/SKILL.md' && test -s '.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/tmux' && cp -R '.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1' '.claude/skills/tmux'Cursor
test -f '.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1/SKILL.md' && test -s '.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/tmux' && cp -R '.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1' '.cursor/skills/tmux'Codex
test -f '.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1/SKILL.md' && test -s '.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/tmux' && cp -R '.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1' '.agents/skills/tmux'OpenSkills
OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.
Installation officielle d’OpenSkillsopenskills install './.skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1'openskills read 'concurrent-process-management-with-tmux-mmlj2ny1'La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.
Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.
openskills syncMode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/concurrent-process-management-with-tmux-mmlj2ny1/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Configurer un canal de discussion avec SecretRefs
DevOps
Configurez des canaux de discussion avec des commandes non interactives, les secrets étant uniquement des SecretRefs. Couvre les étapes de collecte, modification, réparation et vérification.
Enquêter sur les échecs CI de ClickHouse
DevOps
Investigue un échec CI de ClickHouse de bout en bout à partir d'une URL de PR ou de rapport S3. Récupère les tests échoués, classe flaky vs vraie régression, et cherche des issues/fixes existants.
Revue de PR Ansible
DevOps
Examine une PR Ansible selon le processus standardisé du projet, incluant la validation des changelogs, la couverture de tests et le suivi des commentaires.