$57
Open a tab or pane in zellij -- empty, with a shell command, with a Claude session, or with a GitHub issue.
Step 1: Container
"pane"/"panel"/"панель" -> PANE
"tab"/"вкладка"/default -> TAB
Step 2: Mode
nothing to run -> A (empty)
shell command -> B (command)
Claude prompt/plan/task -> C (claude session)
GitHub issue (#N / URL) -> D (issue dev via start-issue)
User just wants a new tab or pane, nothing to run.
Tab name: user-specified or shell-HH:MM (e.g. shell-14:35).
timeout 5 zellij action new-tab --name "$TAB_NAME" || {
_rc=$?
echo "Command failed. Diagnosing..."
if [ -z "$ZELLIJ" ]; then echo "Not in zellij session"
elif [ $_rc -eq 124 ]; then echo "Timed out -- zellij may be hanging"
else echo "Unknown error (exit code: $_rc)"
fi
exit $_rc
}
timeout 5 zellij action new-pane || {
_rc=$?
echo "Command failed. Diagnosing..."
if [ -z "$ZELLIJ" ]; then echo "Not in zellij session"
elif [ $_rc -eq 124 ]; then echo "Timed out -- zellij may be hanging"
else echo "Unknown error (exit code: $_rc)"
fi
exit $_rc
}
User wants to run a shell command (npm test, make build, etc.) in a new tab or pane.
Tab name: derived from command (e.g. npm-test, make-build). Max 20 chars.
TAB_NAME="<from-command>"
timeout 5 zellij action new-tab --name "$TAB_NAME" -- $CMD || {
_rc=$?
echo "Command failed. Diagnosing..."
if [ -z "$ZELLIJ" ]; then echo "Not in zellij session"
elif [ $_rc -eq 124 ]; then echo "Timed out -- zellij may be hanging"
else echo "Unknown error (exit code: $_rc)"
fi
exit $_rc
}
timeout 5 zellij run -- $CMD || {
_rc=$?
echo "Command failed. Diagnosing..."
if [ -z "$ZELLIJ" ]; then echo "Not in zellij session"
elif [ $_rc -eq 124 ]; then echo "Timed out -- zellij may be hanging"
else echo "Unknown error (exit code: $_rc)"
fi
exit $_rc
}
User wants an interactive Claude Code session with instructions/plan/task.
Tab name: auto-generated from context (1-2 words, max 20 chars):
#123plan-auditrefactor, fix-testsclaude-HH:MMSCRIPT=$(mktemp /tmp/claude-tab-XXXXXX.sh)
cat > "$SCRIPT" << 'SCRIPT_EOF'
#!/bin/bash
cd '<PROJECT_DIR>'
PROMPT='<escaped prompt -- single quotes escaped as '"'"'>'
clear
echo "Launching claude with prompt: $PROMPT"
echo ""
exec claude --dangerously-skip-permissions "$PROMPT"
SCRIPT_EOF
chmod +x "$SCRIPT"
Why a script: Prompts can be multi-line with quotes and special characters; a heredoc in a temp script avoids complex escaping in command arguments.
TAB_NAME="<auto-generated>"
timeout 5 zellij action new-tab --name "$TAB_NAME" -- bash "$SCRIPT" || {
_rc=$?
echo "Command failed. Diagnosing..."
if [ -z "$ZELLIJ" ]; then echo "Not in zellij session"
elif [ $_rc -eq 124 ]; then echo "Timed out -- zellij may be hanging"
elif ! command -v claude &>/dev/null; then echo "claude not found in PATH"
else echo "Unknown error (exit code: $_rc)"
fi
exit $_rc
}
timeout 5 zellij run -- bash "$SCRIPT" || {
_rc=$?
echo "Command failed. Diagnosing..."
if [ -z "$ZELLIJ" ]; then echo "Not in zellij session"
elif [ $_rc -eq 124 ]; then echo "Timed out -- zellij may be hanging"
elif ! command -v claude &>/dev/null; then echo "claude not found in PATH"
else echo "Unknown error (exit code: $_rc)"
fi
exit $_rc
}
User wants to start development on a GitHub issue. Recognized when request contains an issue reference (number, #number, or GitHub URL).
Tab name: always #NUMBER.
parse_issue_number() {
local arg="$1"
if [[ "$arg" =~ github\.com/.*/issues/([0-9]+) ]]; then
echo "${BASH_REMATCH[1]}"
elif [[ "$arg" =~ ^#?([0-9]+)$ ]]; then
echo "${BASH_REMATCH[1]}"
else
echo ""
fi
}
| Format | Example | Result |
|--------|---------|--------|
| Number | 123 | Issue #123 |
| With hash | #123 | Issue #123 |
| URL | https://github.com/owner/repo/issues/123 | Issue #123 |
ISSUE_NUMBER=$(parse_issue_number "$ARG")
timeout 5 zellij action new-tab --name "#${ISSUE_NUMBER}" -- start-issue $ISSUE_NUMBER || {
_rc=$?
echo "Command failed. Diagnosing..."
if [ -z "$ZELLIJ" ]; then echo "Not in zellij session"
elif [ $_rc -eq 124 ]; then echo "Timed out -- zellij may be hanging"
elif ! command -v start-issue &>/dev/null; then echo "start-issue not found in PATH"
else echo "Unknown error (exit code: $_rc)"
fi
exit $_rc
}
timeout 5 zellij run -- start-issue $ISSUE_NUMBER || {
_rc=$?
echo "Command failed. Diagnosing..."
if [ -z "$ZELLIJ" ]; then echo "Not in zellij session"
elif [ $_rc -eq 124 ]; then echo "Timed out -- zellij may be hanging"
elif ! command -v start-issue &>/dev/null; then echo "start-issue not found in PATH"
else echo "Unknown error (exit code: $_rc)"
fi
exit $_rc
}
User: "open a new zellij tab"
timeout 5 zellij action new-tab --name "shell-14:35"
User: "run npm test in a pane"
timeout 5 zellij run -- npm test
User: "run make build in new tab"
timeout 5 zellij action new-tab --name "make-build" -- make build
User: "execute the plan from docs/plans/audit.md in new tab"
SCRIPT=$(mktemp /tmp/claude-tab-XXXXXX.sh)
cat > "$SCRIPT" << 'SCRIPT_EOF'
#!/bin/bash
cd '/home/danil/code/project'
PROMPT='Execute the plan from docs/plans/audit.md. Use superpowers:executing-plans.'
clear
echo "Launching claude with prompt: $PROMPT"
echo ""
exec claude --dangerously-skip-permissions "$PROMPT"
SCRIPT_EOF
chmod +x "$SCRIPT"
timeout 5 zellij action new-tab --name "plan-audit" -- bash "$SCRIPT"
User: "delegate this refactoring to a pane"
SCRIPT=$(mktemp /tmp/claude-tab-XXXXXX.sh)
cat > "$SCRIPT" << 'SCRIPT_EOF'
#!/bin/bash
cd '/home/danil/code/project'
PROMPT='Refactor the auth module: extract JWT validation into separate service'
clear
echo "Launching claude with prompt: $PROMPT"
echo ""
exec claude --dangerously-skip-permissions "$PROMPT"
SCRIPT_EOF
chmod +x "$SCRIPT"
timeout 5 zellij run -- bash "$SCRIPT"
User: "start issue #45 in a new tab"
timeout 5 zellij action new-tab --name "#45" -- start-issue 45
User: "start https://github.com/org/repo/issues/123 in a pane"
timeout 5 zellij run -- start-issue https://github.com/org/repo/issues/123
| Error | Cause | Solution |
|-------|-------|----------|
| Timed out | zellij hanging (exit code 124) | Restart zellij |
| Not in zellij session | Running outside zellij | Start zellij first |
| claude not found | Claude CLI not in PATH | Install Claude Code |
| start-issue not found | start-issue not in PATH | Install or add to PATH |
| Invalid issue format | Bad argument | Use number, #number, or URL |
| Script not created | /tmp not writable | Check disk space |
new-tab -- CMD (atomic, no race conditions)zellij run -- CMDSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer