harness/claude/skills/zellij-subagent/SKILL.md
This skill should be used when the user asks to "launch a subagent in zellij", "run claude in a new pane", "open agent in zellij", "parallel agents in zellij", "zellij pane for claude", or wants to spawn Claude Code instances in separate Zellij panes/tabs for parallel work.
npx skillsauth add popoffvg/dotfiles zellij-subagentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Launch Claude Code subagent instances in separate Zellij panes for parallel, visible work. Each agent runs in its own pane with full terminal output, unlike background Agent tool calls which hide intermediate work.
Verify inside a Zellij session before launching:
# Returns session name if inside zellij, empty otherwise
echo "$ZELLIJ_SESSION_NAME"
If not inside Zellij, fall back to the standard Agent tool.
zellij run -f -n "agent: <task-label>" --cwd "<workdir>" -- \
claude -p --dangerously-skip-permissions "<prompt>"
# Right split (side-by-side)
zellij run -d right -n "agent: <task-label>" --cwd "<workdir>" -- \
claude -p --dangerously-skip-permissions "<prompt>"
# Down split (stacked)
zellij run -d down -n "agent: <task-label>" --cwd "<workdir>" -- \
claude -p --dangerously-skip-permissions "<prompt>"
zellij action new-tab -n "agent: <task-label>" --cwd "<workdir>" -- \
claude -p --dangerously-skip-permissions "<prompt>"
zellij run -i -n "agent: <task-label>" --cwd "<workdir>" -- \
claude -p --dangerously-skip-permissions "<prompt>"
Break work into independent subtasks. Each subtask becomes one pane.
| Agents | Strategy | Flag |
|--------|----------|------|
| 1 | In-place or floating | -i or -f |
| 2-3 | Directional splits | -d right / -d down |
| 4+ | Separate tabs or floating | new-tab or -f |
Each agent prompt must be self-contained — include all context the agent needs:
--allowedTools to restrict tool access if needed)Run all zellij run commands. Use --close-on-exit (-c) to auto-close panes when done, or omit it to keep output visible for review.
After agents finish, read their output files or check git status for changes.
| Flag | Purpose |
|------|---------|
| -p / --print | Non-interactive mode, print and exit |
| --dangerously-skip-permissions | Skip permission prompts (use in trusted dirs only) |
| --allowedTools "Tool1 Tool2" | Restrict available tools |
| --model sonnet | Use a faster/cheaper model for simple tasks |
| --max-budget-usd 0.50 | Cap spending per agent |
| --output-format json | Structured output for programmatic consumption |
| --json-schema '{...}' | Enforce output schema |
| -w / --worktree | Isolate agent in a git worktree |
# Launch 3 research agents in floating panes
for topic in "auth flow" "database schema" "API endpoints"; do
zellij run -f -n "research: $topic" -c -- \
claude -p "Analyze the $topic in this codebase. Output a summary to /tmp/research-${topic// /-}.md"
done
# Left pane: implement
zellij run -d right -n "implement" -- \
claude -p --dangerously-skip-permissions "Implement feature X in src/handler.go"
# Right pane: write tests (after implementation)
zellij run -d right -n "test" -s -- \
claude -p --dangerously-skip-permissions "Write tests for feature X in src/handler_test.go"
The -s (start-suspended) flag on the test agent lets the user trigger it manually after implementation finishes.
zellij run -f -n "agent: refactor" -c -- \
claude -p -w "refactor-branch" --dangerously-skip-permissions \
"Refactor the auth module to use interfaces"
Each agent gets its own git worktree — no conflicts between parallel changes.
$ZELLIJ_SESSION_NAME first. If empty, use standard Agent tool or suggest the user starts Zellij.--max-panes or close existing panes.-c, the pane stays open showing the error. Review pane output manually.references/layouts.md — Custom Zellij layout templates for multi-agent workflowstesting
Use when the user asks to create test sets, enumerate scenarios, generate edge cases, or draft a coverage matrix before implementation.
testing
Use when the user asks to review, audit, score, or validate test sets for missed cases before execution or merge.
tools
Test harness plugins in isolation using tmux panes. Runs MCP servers, unit tests, typecheck, and Claude plugin loading. Use when user says "test plugin", "check plugin", "run plugin tests", "validate plugin", or names a specific plugin to test.
development
Guide for designing integration and e2e tests using BDD (Behavior-Driven Development) methodology with Cucumber-style Given/When/Then scenarios. Use when writing or reviewing tests for any service, API, or component. Language-agnostic — covers scenario structure, step notation, assertion principles, async patterns, and common anti-patterns.