zellij-control
Skill11 starsChanged 3 months agoMITView on GitHub
Control zellij terminal sessions remotely. List sessions, capture pane content (screenshots), send keystrokes, and manage panes/tabs in existing zellij sessions. Use when you need to interact with or observe programs running in other zellij sessions.
In this repository18 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- android-app-reverserSkill
- android-emulator-app-live-inspectSkill
- aula-pii-scanSkill
- de-ai-proseSkill
- de-ai-repoSkill
- drawio-figure-reviewerSkill
- explainer-videoSkill
- justfile-hygieneSkill
- model-raceSkill
- nix-scaffoldSkill
- phase1-prd-grillSkill
- phase2-backlog-snowballSkill
- phase3-backlog-ralphSkill
- readme-improverSkill
- refactor-smellerSkill
- scrub-for-publicSkill
- xterm-tmux-controlSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
All actions target a session using the -s flag on the top-level zellij command (NOT on the action subcommand):
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Zellij Session Control
This skill enables remote interaction with existing zellij terminal sessions -- capturing screen output, sending keystrokes, and managing panes without direct TTY access.
Listing Sessions
# List all active sessions (parseable output)
zellij list-sessions --no-formatting
# Just session names
zellij list-sessions --short
# Filter to only active (non-exited) sessions
zellij list-sessions --no-formatting | grep -v EXITEDTargeting a Session
All actions target a session using the -s flag on the top-level zellij command (NOT on the action subcommand):
zellij -s SESSION_NAME action <subcommand>Capturing Screen Output ("Screenshots")
# Dump focused pane to a file (text content, not pixels)
zellij -s SESSION_NAME action dump-screen /tmp/zellij-capture.txt
# Dump with full scrollback history
zellij -s SESSION_NAME action dump-screen --full /tmp/zellij-capture.txt
# Then read the captured output
cat /tmp/zellij-capture.txtNote: dump-screen captures the focused pane only. To capture other panes, first switch focus (see Pane Navigation below).
Sending Keystrokes
# Send literal text characters
zellij -s SESSION_NAME action write-chars "ls -la"
# Send Enter key (byte 13 = carriage return)
zellij -s SESSION_NAME action write 13
# Send a command and press Enter (two steps)
zellij -s SESSION_NAME action write-chars "make build"
zellij -s SESSION_NAME action write 13
# Send Escape (byte 27)
zellij -s SESSION_NAME action write 27
# Send Ctrl+C (byte 3)
zellij -s SESSION_NAME action write 3
# Send Ctrl+D / EOF (byte 4)
zellij -s SESSION_NAME action write 4
# Send Ctrl+Z / suspend (byte 26)
zellij -s SESSION_NAME action write 26
# Send Tab (byte 9)
zellij -s SESSION_NAME action write 9Common Control Byte Reference
| Key | Byte | Example |
| Ctrl+C | 3 | zellij -s S action write 3 |
| Ctrl+D | 4 | zellij -s S action write 4 |
| Tab | 9 | zellij -s S action write 9 |
| Enter | 13 | zellij -s S action write 13 |
| Escape | 27 | zellij -s S action write 27 |
| Ctrl+Z | 26 | zellij -s S action write 26 |
| Backspace | 127 | zellij -s S action write 127 |
Arrow Keys (ANSI escape sequences)
# Up arrow: ESC [ A
zellij -s SESSION_NAME action write 27 91 65
# Down arrow: ESC [ B
zellij -s SESSION_NAME action write 27 91 66
# Right arrow: ESC [ C
zellij -s SESSION_NAME action write 27 91 67
# Left arrow: ESC [ D
zellij -s SESSION_NAME action write 27 91 68Pane Navigation
# Move focus between panes
zellij -s SESSION_NAME action focus-next-pane
zellij -s SESSION_NAME action focus-previous-pane
zellij -s SESSION_NAME action move-focus right # right|left|up|down
# Toggle fullscreen on focused pane
zellij -s SESSION_NAME action toggle-fullscreenTab Navigation
# Switch tabs
zellij -s SESSION_NAME action go-to-tab 1 # by index (1-based)
zellij -s SESSION_NAME action go-to-tab-name "dev" # by name
zellij -s SESSION_NAME action go-to-next-tab
zellij -s SESSION_NAME action go-to-previous-tab
# Query tab names
zellij -s SESSION_NAME action query-tab-namesScrolling
zellij -s SESSION_NAME action scroll-up
zellij -s SESSION_NAME action scroll-down
zellij -s SESSION_NAME action scroll-to-top
zellij -s SESSION_NAME action scroll-to-bottom
zellij -s SESSION_NAME action half-page-scroll-up
zellij -s SESSION_NAME action half-page-scroll-downSession Management
# Kill a session
zellij kill-session SESSION_NAME
# Kill all sessions
zellij kill-all-sessions
# Delete exited sessions
zellij delete-session SESSION_NAME
zellij delete-all-sessions
# Rename current session
zellij -s SESSION_NAME action rename-session "new-name"Pane and Tab Management
# Close focused pane or tab
zellij -s SESSION_NAME action close-pane
zellij -s SESSION_NAME action close-tab
# Rename focused pane or tab
zellij -s SESSION_NAME action rename-pane "my-pane"
zellij -s SESSION_NAME action rename-tab "my-tab"
# Clear pane buffer
zellij -s SESSION_NAME action clear
# Dump current layout
zellij -s SESSION_NAME action dump-layoutComplete Workflow: Observe and Interact
# 1. Find active sessions
zellij list-sessions --no-formatting | grep -v EXITED
# 2. Capture current screen
zellij -s myapp action dump-screen /tmp/screen.txt
cat /tmp/screen.txt
# 3. Send a command
zellij -s myapp action write-chars "cargo test"
zellij -s myapp action write 13
# 4. Wait and capture result
sleep 3
zellij -s myapp action dump-screen /tmp/result.txt
cat /tmp/result.txtRapid Snapshots (for TUI Debugging)
# Take multiple snapshots at intervals to observe state changes
for i in $(seq 1 10); do
echo "=== SNAPSHOT $i ($(date +%H:%M:%S.%3N)) ==="
zellij -s SESSION_NAME action dump-screen /tmp/snap_$i.txt
cat /tmp/snap_$i.txt
echo ""
sleep 0.2
doneTroubleshooting
"Session not found": The session may be EXITED. Use zellij list-sessions --no-formatting to check status. Only active (non-exited) sessions accept actions.
Wrong pane captured: dump-screen captures the focused pane. Use focus-next-pane or move-focus to change which pane is focused before capturing.
No send-keys equivalent: Unlike tmux, zellij has no named-key send-keys. Use write-chars for text and write with byte values for control keys and escape sequences.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

