ワンクリックで
tmux
Use only when you need to run interactive CLI tools (Python REPL, etc.) that require real-time input/output OR when asked to use tmux
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use only when you need to run interactive CLI tools (Python REPL, etc.) that require real-time input/output OR when asked to use tmux
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
Transform an application's logging/output to Brandon's colorized logging style — a reset-safe ANSI color layer with semantic level functions (info=yellow, warning=bold-yellow, success=green, error=red, verbose-trace=magenta) where color alone carries the level and there are no text labels. Use when the user says "apply my logging style", "colorize the logging", "make the logging match my style", "convert print/console.log statements to my colored logging", "add my logging library", "standardize this app's log output", or wants a project's ad-hoc prints and stdlib logging replaced with this specific style. Works in any language; Python is the reference.
anthropic's guidance for prompting llms
Address open PR review findings with judgment — read every finding, decide whether the feedback is right, fix or push back, resolve, and re-review by pushing. Repeat until clean. Use when the user says "address the PR review", "handle the review threads", "go through the review comments", or asks to respond to PR feedback on a specific PR or the current branch's PR.
Install the agent code-review GitHub Action into the current repository — writes the .github/workflows/code-review.yml workflow and sets the DEEPSEEK_API_KEY repo secret from the macOS keychain. Use when the user says "set up agent code review in this repo", "install the code review action", "add AI code review to this repo", "set up the AI code reviewer here", or wants automated PR review wired into the repo they're currently in.
Writes a message to a future session's agent. Send them your fondest memories of what you worked on, what went well, what didn't go well, and any useful tips they might need. You always run this when you finish a unit of work (closed a PR, completed the handed task, etc) or cross 300k–350k tokens of context. ALWAYS.
This skill should be used when the user asks to "run a slash command in another Claude session", "trigger /clear (or /compact, /model, /context, /rewind, …) in a tmux pane", "drive built-in commands in a running agent session over tmux", "send a slash command to the Claude/codex/opencode instance in session X", or otherwise wants to execute a harness command that the agent running in that session cannot invoke itself. Distinct from tmux-talk: this sends the raw command with no message envelope.
SOC 職業分類に基づく
| name | tmux |
| description | Use only when you need to run interactive CLI tools (Python REPL, etc.) that require real-time input/output OR when asked to use tmux |
NEVER kill a tmux session without EXPLICIT permission from the user.
You may ONLY kill a session if BOTH conditions are met:
Default behavior: ALWAYS detach, NEVER kill.
Existing sessions may contain important work. Destroying them can cause data loss.
Interactive CLI tools (vim, interactive git rebase, REPLs, etc.) cannot be controlled through standard bash because they require a real terminal. tmux provides detached sessions that can be controlled programmatically via send-keys and capture-pane.
Use tmux when:
git rebase -i, git add -p)Don't use for:
| Task | Command |
|---|---|
| List sessions | tmux list-sessions |
| List windows | tmux list-windows -t <session> |
| Attach to session | tmux attach -t <session> |
| Create window | tmux new-window -t <session>: -n <name> <command> |
| Switch window | tmux select-window -t <session>:<index> |
| Send input | tmux send-keys -t <session>:<index> 'text' Enter |
| Capture output | tmux capture-pane -t <session>:<index> -p |
| Detach | tmux detach-client -s <session> |
# This hangs because vim expects interactive terminal
bash -c "vim file.txt"
# Check for existing session, create if needed
if ! tmux has-session -t mywork 2>/dev/null; then
tmux new-session -d -s mywork
fi
# Create window (numbered 1, 2, 3, etc.)
tmux new-window -t mywork: -n editor vim file.txt
sleep 0.3
# Get window index (windows are numbered, not named)
INDEX=$(tmux list-windows -t mywork -F '#{window_index} #{window_name}' | grep editor | cut -d' ' -f1)
# Send commands using window index
tmux send-keys -t mywork:$INDEX 'i' 'Hello World' Escape ':wq' Enter
# Capture output
tmux capture-pane -t mywork:$INDEX -p
# Detach when done (session persists)
tmux detach-client -s mywork
session:NCommon tmux key names:
Enter - Return/newlineEscape - ESC keyC-c - Ctrl+CC-l - Ctrl+L (clear screen)C-b - tmux prefix (for manual navigation)Up, Down, Left, Right - Arrow keysSpace - Space barBSpace - BackspaceList all sessions:
tmux list-sessions
# Output: session_name: N windows (created ...) (attached)
Connect to existing or create:
if ! tmux has-session -t dev 2>/dev/null; then
tmux new-session -d -s dev
fi
Windows are numbered starting from 0 or 1. Names are labels, not unique identifiers.
Create window:
# Creates a numbered window with optional name
tmux new-window -t mysession: -n myname vim file.txt
List windows:
tmux list-windows -t mysession
# Output: 1: zsh (1 panes) ...
# 2: vim- (1 panes) ...
# 3: python* (1 panes) ... (active)
Get window index:
# By name (if you know it)
tmux list-windows -t mysession -F '#{window_index} #{window_name}' | grep vim
# Active window
tmux list-windows -t mysession -F '#{window_index} #{?window_active,(active),}' | grep active
Target windows by index:
# Always use index, never assume name is unique
tmux send-keys -t mysession:2 'echo hello' Enter
tmux capture-pane -t mysession:2 -p
Switch to window:
# Programmatically select window
tmux select-window -t mysession:2
# Or send prefix + number (if interacting)
tmux send-keys -t mysession C-b 2
Specify working directory when creating session or window:
# For session
tmux new-session -d -s git -c /path/to/repo
# For window
tmux new-window -t git: -n status -c /path/to/repo git status
See tmux-wrapper.sh for simplified commands:
# List all sessions and windows
./tmux-wrapper.sh list
# Connect to existing or create new
./tmux-wrapper.sh connect dev
# Create window, returns its index
./tmux-wrapper.sh window dev editor vim file.txt
# Output: Window index: 2
# Send to window by index
./tmux-wrapper.sh send dev 2 'i' 'Hello' Escape ':wq' Enter
# Capture from window
./tmux-wrapper.sh capture dev 2
# Detach (recommended)
./tmux-wrapper.sh detach dev
# Connect to or create
if ! tmux has-session -t dev 2>/dev/null; then
tmux new-session -d -s dev
fi
# Create windows (get their indices)
tmux new-window -t dev: -n editor vim file.txt
tmux new-window -t dev: -n repl python3 -i
tmux new-window -t dev: -n shell bash
# List windows to see indices
tmux list-windows -t dev -F '#{window_index}: #{window_name}'
# 1: editor
# 2: repl
# 3: shell
# Work in python window (index 2)
tmux send-keys -t dev:2 'import math' Enter
tmux send-keys -t dev:2 'print(math.pi)' Enter
tmux capture-pane -t dev:2 -p
# Switch to editor (index 1)
tmux select-window -t dev:1
tmux send-keys -t dev:1 'i' 'Code here' Escape ':wq' Enter
# Detach
tmux detach-client -s dev
if ! tmux has-session -t python 2>/dev/null; then
tmux new-session -d -s python
fi
tmux new-window -t python: -n repl python3 -i
sleep 0.3
# Get window index
IDX=$(tmux list-windows -t python -F '#{window_index} #{window_name}' | grep repl | cut -d' ' -f1)
tmux send-keys -t python:$IDX 'import math' Enter
tmux send-keys -t python:$IDX 'print(math.pi)' Enter
tmux capture-pane -t python:$IDX -p
tmux detach-client -s python
if ! tmux has-session -t edit 2>/dev/null; then
tmux new-session -d -s edit
fi
tmux new-window -t edit: -n file1 vim /tmp/file.txt
sleep 0.3
IDX=$(tmux list-windows -t edit -F '#{window_index} #{window_name}' | grep file1 | cut -d' ' -f1)
tmux send-keys -t edit:$IDX 'i' 'New content' Escape ':wq' Enter
tmux detach-client -s edit
Problem: Window names are not unique identifiers
Fix: Always use window index
# ✗ Wrong - name might not be unique
tmux send-keys -t sess:editor 'text' Enter
# ✓ Correct - use index
IDX=$(tmux list-windows -t sess -F '#{window_index} #{window_name}' | grep editor | cut -d' ' -f1)
tmux send-keys -t sess:$IDX 'text' Enter
Problem: Capturing immediately shows blank screen
Fix: Add brief sleep
tmux new-window -t sess: -n vim vim file.txt
sleep 0.3 # Let vim initialize
Problem: Commands typed but not executed
Fix: Explicitly send Enter
tmux send-keys -t sess:2 'print("hello")' Enter
Problem: Session destroyed, can't reconnect, data loss
Fix: ALWAYS detach, NEVER kill without explicit permission
tmux detach-client -s sess # ✓ ALWAYS do this
tmux kill-session -t sess # ✗ FORBIDDEN without explicit permission
Remember: You may ONLY kill a session if:
When in doubt, detach.
Problem: Creating duplicate sessions fails
Fix: Check first
if ! tmux has-session -t dev 2>/dev/null; then
tmux new-session -d -s dev
fi
Default workflow:
Never kill sessions unless:
When user says "I'm done" or "clean up":