diff --git a/skills/working-with-tmux/SKILL.md b/skills/working-with-tmux/SKILL.md index fbe07015bf36dad33ef7298c56a0bcfc4bdcea89..9821b98b7bb1ae78ce004b600a9b7c3cf697c196 100644 --- a/skills/working-with-tmux/SKILL.md +++ b/skills/working-with-tmux/SKILL.md @@ -17,7 +17,7 @@ First, verify you are running inside tmux: echo $TMUX ``` -If this returns empty, you are not running inside tmux. Create a new session named `agent-$(openssl rand -hex 3)`. +If this returns empty, you are not running inside tmux. Use `echo "agent-$(openssl rand -hex 3)"` to generate a unique session ID, then create a new session with a window named after what you're working on. You may skip step 2.1, creating the new window within an existing session. Once verified, check your current windows: @@ -47,19 +47,19 @@ To run a command (e.g., a dev server) in a way that persists and can be inspecte You can read the output of that pane at any time without switching your context. -**Get the current visible screen:** +Get the current visible screen: ```bash tmux capture-pane -p -t "server-log" ``` -**Get the entire history (scrollback):** +Get the entire history (scrollback, can produce _excessive_ tokens): ```bash tmux capture-pane -p -S - -t "server-log" ``` -_Use this if the output might have scrolled off the screen._ +Prefer to pipe the full scrollback buffer through grep/sed/tac/etc. to view just the content between your last command and the next prompt (exclusive). ## 4. Interact with the Process