From tmux-claude
Hand off the current conversation to a new Claude session when context is getting long. Opens a side-by-side tmux split, crafts a continuation prompt with full context (plan, tasks, progress, working directory), and launches Claude in yolo mode to continue the work automatically. This skill should be used when the user says the conversation is too long, asks to continue in a new session, or invokes /handoff.
How this skill is triggered — by the user, by Claude, or both
Slash command
/tmux-claude:handoffThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Continue work in a fresh Claude session when the current conversation is getting long. Opens a side-by-side tmux split, generates a continuation prompt capturing all current context, and launches Claude in yolo mode to pick up where this session left off.
Continue work in a fresh Claude session when the current conversation is getting long. Opens a side-by-side tmux split, generates a continuation prompt capturing all current context, and launches Claude in yolo mode to pick up where this session left off.
$TMUX must be set)tmux skill that ships with this plugin (tmux_panes.py)Collect everything the new session needs to continue the work:
pwdgit branch --show-current, git status --short (if in a git repo)Derive a continuation name from the current tmux window:
tmux display-message -p '#{window_name}'
Append an incrementing number suffix:
market-data), the new name is market-data-2market-data-2), increment it to market-data-3-1 if it doesn't already have a numeric suffix, so both sessions are clearly numberedWrite a detailed continuation prompt to /tmp/handoff_prompt_<timestamp>.txt. The prompt must be self-contained — the new session has zero prior context. Structure:
Continue the following work in <working_directory>.
## Session
This is a continuation of a previous session. The previous session was <session_name> and this is <new_session_name>.
## Plan
<full plan if one exists, otherwise omit this section>
## Progress
### Completed
<list of completed tasks/work with brief descriptions>
### In Progress
<any task that was in progress when handoff occurred>
### Remaining
<list of remaining tasks/work>
## Key Context
<decisions made, constraints discovered, user preferences, gotchas — anything non-obvious>
## Git State
Branch: <branch>
Status: <clean/dirty, uncommitted changes if any>
## Active Files
<list of files currently being worked on>
## Instructions
Pick up from where the previous session left off. Start with the next incomplete task.
Use the tmux skill's script (co-located in this plugin) to execute the handoff:
Split side-by-side (tmux horizontal = vertical split line):
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/tmux_panes.py" split horizontal -c <working_directory>
Send the prompt to the new pane using file mode with command prefix:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/tmux_panes.py" send \
-f /tmp/handoff_prompt_<timestamp>.txt \
-p "claude --dangerously-skip-permissions --" \
-t <new_pane_id>
Rename the current window if it doesn't already have a numeric suffix — append -1.
Confirm to the user that the handoff is complete, showing the new session name and a brief summary of what was handed off.
After confirming the handoff, inform the user that they can close this pane when ready. Do not close it automatically — the user may want to reference the conversation history.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub alxlenc/alx-skills --plugin tmux-claude