Orchestrate Zellij terminal multiplexer (v0.44.0+) by managing panes, reading outputs, and running background tasks via the native CLI.
⚠️ VERSION REQUIREMENT: This skill heavily relies on the expanded CLI Automation features (like
list-panes,dump-screen --pane-id, andsend-keys) introduced in Zellij v0.44.0. It will not work correctly on earlier versions.
Use this skill when the user asks you to interact with Zellij, manage terminal panes, run background tasks, or read output from other terminal windows. This skill leverages the native Zellij CLI (v0.44.0+) to act as an agentic orchestration layer.
"use zellij", "open a new pane", "run this in the background", "what is the error in the other pane", "check the server logs", "split the terminal", "send keystrokes to pane"
As an AI agent, you should use the bash tool to execute these Zellij CLI commands to orchestrate the user's workspace.
To understand what panes are currently open and get their IDs:
zellij action list-panes --json
Note: Look for the pane_id in the JSON output to target specific panes in subsequent commands.
If you need to read the output of a dev server, test runner, or any other pane, dump its screen to a temporary file and read it:
# Dump the full scrollback of a specific pane (requires pane-id from list-panes)
zellij action dump-screen --pane-id <ID> --full --path /tmp/zellij_dump.txt
cat /tmp/zellij_dump.txt
When you need to run a long task (like npm install, compiling, or a test suite) without blocking your own execution context, spawn it in a floating pane:
# Returns the new pane_id instantly
zellij run --floating --name "Agent Task" -- npm run test
If you must wait for an external pane to finish before continuing your work:
zellij run --floating --blocking --name "Wait Task" -- ./build.sh
If a pane is stuck on a prompt or running an interactive tool, you can send keystrokes to it:
zellij action send-keys --pane-id <ID> "y" "Enter"
zellij action send-keys --pane-id <ID> "Ctrl c"
# Open a new split pane in the current tab
zellij action new-pane
# Move focus to a specific pane to bring it to the user's attention
zellij action focus-pane --pane-id <ID>
zellij action list-panes --json first to get the correct pane_id before trying to read from or send keys to a pane.npm install, linters, etc.), prefer --floating so you don't mess up the user's tiled layout.zellij action close-pane --pane-id <ID>. Do not leave leftover background panes cluttering the workspace unless the user explicitly asks for a long-running service (like a dev server) to remain open.