본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)394k · #86

tmux

하는 일

AI 에이전트가 tmux 세션의 출력을 읽고 입력을 보내도록 안내합니다. 이미 실행 중인 대화형 도구에 특히 유용하며, 오래 걸리는 터미널 작업을 tmux에서 돌리는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓실행 중인 터미널 도구가 무엇을 출력하는지 보고 싶을 때.
  • ✓tmux 세션의 도구가 입력을 기다리고 있어 답을 보내야 할 때.
  • ✓tmux 세션을 시작, 이름 변경, 또는 닫아야 할 때.

스킬 링크

https://github.com/openclaw/openclaw/blob/main/skills/tmux/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/openclaw/openclaw/blob/main/skills/tmux/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“worker라는 tmux 세션을 확인하고, 지금 무엇을 출력하고 있는지 알려 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

스킬은 세션과 패인을 나열하고 최근 출력을 읽으며, 요청하면 텍스트나 키를 보냅니다. 프롬프트의 의미가 분명하다는 것을 확인한 뒤에만 승인하거나 선택합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

tmux

Use for existing interactive tmux sessions. For one-shot commands, use normal shell. For new non-interactive background jobs, use background execution.

Basics

tmux ls
tmux list-windows -t shared
tmux list-panes -t shared:0
tmux capture-pane -t shared:0.0 -p
tmux capture-pane -t shared:0.0 -p -S -

Target format: session:window.pane, e.g. shared:0.0.

Send input

Literal text, then Enter:

tmux send-keys -t shared:0.0 -l -- "Please continue"
tmux send-keys -t shared:0.0 Enter

Special keys:

tmux send-keys -t shared:0.0 C-c
tmux send-keys -t shared:0.0 C-d
tmux send-keys -t shared:0.0 Escape

Use -l -- for arbitrary text. Split text and Enter to avoid paste/newline surprises.

Sessions

tmux new-session -d -s worker
tmux rename-session -t old new
tmux kill-session -t worker

Prompt checks

tmux capture-pane -t worker-3 -p | tail -20
tmux capture-pane -t worker-3 -p | rg "proceed|permission|Yes|No|❯"

Approve/select only when the prompt is understood:

tmux send-keys -t worker-3 -l -- "y"
tmux send-keys -t worker-3 Enter

Helpers

  • scripts/find-sessions.sh: discover sessions.
  • scripts/wait-for-text.sh: wait until captured pane contents contain text.

wait-for-text.sh searches echoed input and scrollback as well as process output. For command completion, use a unique marker whose full text is split across arguments in the command sent to tmux:

nonce="$(od -An -N8 -tx1 /dev/urandom | tr -d ' \n')"
marker="OPENCLAW_DONE_${nonce}"
tmux send-keys -t shared:0.0 -l -- "sleep 4; printf '%s%s\n' 'OPENCLAW_DONE_' '$nonce'"
tmux send-keys -t shared:0.0 Enter
scripts/wait-for-text.sh -t shared:0.0 -p "$marker" -F -T 30

The echoed command never contains the complete marker, and the nonce prevents an older completion line from matching.

Notes

  • capture-pane -p prints to stdout for scripts.
  • -S - captures full scrollback.
  • tmux sessions persist across SSH disconnects.
자주 묻는 질문

명령을 묻지 않고 보내나요?

아닙니다. 프롬프트가 분명하고 동작이 명확할 때만 승인합니다.

tmux는 일회성 명령에 쓰나요?

아닙니다. 일회성 명령에는 일반 셸이 더 간단하며, tmux는 기존의 대화형 세션을 위한 것입니다.

작업이 끝날 때까지 기다릴 수 있나요?

예. 도우미 스크립트가 패인에 특정 텍스트가 나타날 때까지 기다릴 수 있으며, 고유한 표시를 쓰면 가장 잘 작동합니다.

상세 정보

작성자의 원본 설명

Control tmux sessions/panes for interactive CLIs: list, capture output, send keys, paste text, monitor prompts.

repo: openclaw/openclaw

인기도

GitHub 스타
394k
순위
#86
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬