From superteam
Arrange running superteam agent panes into a logical visual layout. Reads the persisted multiplexer and layout preference from `~/.claude/superteam/config.json` (`config.layout`, `config.multiplexer`). Supports two modes: **flat** and **by-worktree**.
How this skill is triggered — by the user, by Claude, or both
Slash command
/superteam:layoutThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Arrange running superteam agent panes into a logical visual layout. Reads the persisted multiplexer and layout preference from `~/.claude/superteam/config.json` (`config.layout`, `config.multiplexer`). Supports two modes: **flat** and **by-worktree**.
Arrange running superteam agent panes into a logical visual layout. Reads the persisted multiplexer and layout preference from ~/.claude/superteam/config.json (config.layout, config.multiplexer). Supports two modes: flat and by-worktree.
Explicit triggers (user says any of these):
/superteam:layout <mode>Implicit triggers (planner-owned — NO opt-out):
/superteam:ticket <id>: planner invokes again after the new ticket's 3 tasks are dropped and teammates spawned./superteam:retry <ticket>: planner ensures the rework teammate(s) land in the existing ticket group./superteam:gc: planner invokes to close empty groups left by removed worktrees.Before this skill can group panes, each teammate must have renamed its terminal pane to the <ticket>:<role> string (F14 convention):
<ticket>:<role>
| Teammate | Pane title format | Example |
|---|---|---|
| Implementer | <ticket>:impl | AUTH-1:impl |
| Spec-reviewer | <ticket>:spec | AUTH-1:spec |
| Code-reviewer | <ticket>:review | AUTH-1:review |
Each teammate agent sets the pane title on first action via:
printf '\033]0;%s\007' "<ticket>:<role>"
# e.g.: printf '\033]0;AUTH-1:impl\007'
This FIRST RUN step is mandatory in all three teammate system prompts (implementer / spec-reviewer / code-reviewer). Without it, parse_ticket_groups cannot distinguish panes.
The by-worktree mode groups panes by the ticket prefix — everything before the : separator. For example, AUTH-1:impl, AUTH-1:spec, and AUTH-1:review all share the AUTH-1 prefix and are grouped together.
The layout skill discovers pane titles by querying the multiplexer:
tmux list-panes -a -F '#{pane_title}' (cmux exposes a tmux shim; use the supported list-panes verb)tmux list-panes -a -F '#{pane_title}'osascript -e 'tell application "iTerm2" to tell current window to tell each tab to tell each session to name'CONFIG="$HOME/.claude/superteam/config.json"
if [[ -f "$CONFIG" ]]; then
MUX=$(jq -r '.multiplexer // "cmux"' "$CONFIG")
LAYOUT=$(jq -r '.["config.layout"] // "flat"' "$CONFIG")
else
MUX="cmux"
LAYOUT="flat"
fi
# Override from argument if provided
if [[ -n "${1:-}" ]]; then
LAYOUT="$1"
fi
Valid values for config.layout: flat, by-worktree.
source "$(dirname "$0")/../../lib/layout-dispatch.sh"
validate_layout_mode "$LAYOUT" || exit 1
Collect current pane titles from the multiplexer. Each line should be in the form agent-name · TICKET-N.
case "$MUX" in
cmux)
# cmux exposes a tmux shim; list-panes is the supported way to read titles.
PANE_TITLES=$(tmux list-panes -a -F '#{pane_title}' 2>/dev/null || echo "")
;;
tmux)
PANE_TITLES=$(tmux list-panes -a -F '#{pane_title}' 2>/dev/null || echo "")
;;
iterm2)
# iTerm2: use osascript to enumerate session names
PANE_TITLES=$(osascript -e \
'tell application "iTerm2" to tell current window to get name of every session of every tab' \
2>/dev/null | tr ',' '\n' | xargs || echo "")
;;
none|*)
echo "Multiplexer '$MUX' does not support pane manipulation — layout is a no-op."
exit 0
;;
esac
The layout can be applied by invoking the script directly (preferred) or by calling layout_dispatch when already sourced:
# Preferred: invoke as a runnable script
bash ${CLAUDE_PLUGIN_ROOT}/lib/layout-dispatch.sh "$LAYOUT"
# Or, when lib is already sourced:
layout_dispatch "$LAYOUT" "$MUX" "$PANE_TITLES"
To preview planned moves without executing them, use --dry-run:
bash ${CLAUDE_PLUGIN_ROOT}/lib/layout-dispatch.sh by-worktree --dry-run
flat (default)One tab/pane per teammate. No structural changes are applied. This is the no-op / pass-through mode.
Use case: simple debugging, single-ticket runs, or when the user prefers to manage panes manually.
by-worktreeAll teammates working on the same ticket — impl(TICKET-N), spec-review(TICKET-N), code-review(TICKET-N) — are grouped into one parent pane / split per ticket.
Use case: multiple tickets in flight — watch a ticket's full pipeline at once.
cmux note: under
cmux claude-teams, cmux groups teammate splits natively (and the tmux shim exposes no pane-move/join verb to script).by-worktreeis therefore a no-op on cmux — it applies only to tmux and iTerm2.
| Multiplexer | Group/split primitive | Move primitive |
|---|---|---|
| cmux | native — cmux groups teammate splits automatically; nothing to script | native |
| tmux | tmux split-window (new window per ticket group) | tmux join-pane -s <src-pane-id> -t <dst-pane-id> |
| iTerm2 | split horizontally with default profile via AppleScript | Move tab between split groups via osascript / iTerm2 Python API |
cmux renders each teammate (spawned via the native Agent tool) as a split and groups them automatically. The skill emits no commands for cmux:
# (native) TICKET-1 — cmux renders this group automatically
# Join spec and code reviewer into the impl pane's window
tmux join-pane -s $SPEC_PANE_ID -t $IMPL_PANE_ID
tmux join-pane -s $CODE_PANE_ID -t $IMPL_PANE_ID
tell application "iTerm2"
tell current window
create tab with default profile
tell current tab
split horizontally with default profile -- spec-reviewer pane
split horizontally with default profile -- code-reviewer pane
end tell
end tell
end tell
Invoking superteam:layout <mode> against an already-running team moves existing panes without re-spawning.
Note: Running
by-worktreemode twice may create duplicate groups if the multiplexer does not detect that a group already exists. If that happens, close the duplicate group manually and re-run.flatmode is always safe to invoke multiple times.
The layout preference is stored in ~/.claude/superteam/config.json:
{
"multiplexer": "cmux",
"config.layout": "by-worktree",
"models": {
"planner": "claude-opus-4-7",
"implementer": "claude-sonnet-4-6",
"spec-reviewer": "claude-sonnet-4-6",
"code-reviewer": "claude-sonnet-4-6"
}
}
The setup wizard (/superteam:setup) writes this file. The planner reads it at spawn time via jq -r '.["config.layout"] // "flat"' ~/.claude/superteam/config.json.
Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
npx claudepluginhub ahmedelbanna80/superteam --plugin superteam