skills/herdr-agent-comms/SKILL.md
Manage AI agent fleets in Herdr: split root + sub-agents into one tab as a tiled grid, message/wait/read via herdr CLI, steer any pane. Use for Herdr multi-agent fleets. Don't use for tmux, screen, or non-Herdr terminals.
npx skillsauth add luongnv89/skills herdr-agent-commsInstall 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.
Build and control an AI-agent fleet in the root agent's Herdr tab. Keep the root pane as orchestrator; add each sub-agent as a right-hand split; equalize all columns; then send, wait, read, steer, or tear down through the herdr CLI.
Use Herdr concepts, not tmux assumptions. Prefer status-aware helpers and relay reply deltas rather than whole panes to protect the context and token budget.
| Request | Follow | |---|---| | Spawn sub-agents beside root | Phases 1–2, then 4–5 if assigning work | | Message an existing agent | Phases 3–5 | | Read without sending | Phase 3, then Phase 5 read only | | Broadcast to a fleet | Phases 3 and 6 | | Focus/steer a pane | Phase 3, then Phase 6 | | Close workers | Phase 6 teardown |
Read only the reference needed by that branch:
references/herdr-recipes.md for guarded grid spawning, equalization semantics, multi-line sends, focus, and troubleshooting.references/delivery-and-waiting.md for preflight, completion markers, delivery verification, wait outcomes, and concurrent waits.command -v herdr and herdr status. If the server is unavailable, ask the user to start Herdr from a real terminal; never run bare herdr from a non-TTY shell.HERDR_PANE_ID, HERDR_TAB_ID, and HERDR_WORKSPACE_ID, or from herdr pane current --current and list/get commands.herdr <group> rather than inventing flags.right, keep every worker in the root tab, then run the equalizer. Create separate tabs only when the user explicitly requests isolation.working, blocked, malformed, or off-enum targets. Only a verified safe status may receive input.command -v herdr >/dev/null || { echo "Error: herdr is not installed" >&2; exit 1; }
herdr status || { echo "Error: Herdr server is unavailable" >&2; exit 1; }
root_pane="${HERDR_PANE_ID:?}"; root_tab="${HERDR_TAB_ID:?}"; ws="${HERDR_WORKSPACE_ID:?}"
Outside Herdr, list workspaces and agents, then choose the user-named or focused root. Resolve project_dir from the root pane's cwd, falling back to the current directory.
Done when: server status passes and concrete root_pane, root_tab, ws, and project_dir values are recorded.
Before spawning, define each worker's unique name, CLI/model settings, task, and expected deliverable. Launch the interactive CLI first; submit the task only after readiness passes.
Resolve the scripts directory by checking repo-local installs before global ones. Then use the canonical spawn_sub workflow in references/herdr-recipes.md:
next_grid_split.py --root-pane "$root_pane" to plan the rightmost split.--direction right --no-focus in project_dir.next_grid_split.py --equalize --root-pane "$root_pane"; abort on any error or non-convergence.herdr pane run.wait_for_idle.py --ready checks. Assign no work unless every worker returns 0.Use pi --model ... --thinking ... --skill ..., or verified flags for Claude Code, Codex, or OpenCode. Do not attach the long task to the initial launcher argv.
Done when: every worker has a unique name and pane ID in root_tab, the layout widths differ by at most one cell, root remains active, and all readiness checks pass.
Run herdr agent get <name> or herdr pane get <pane-id>. If a name is missing or ambiguous, list agents and ask; never silently retarget. Record both the name and pane ID and use that same pane ID for every later mutation.
Done when: one existing target resolves uniquely and its status is valid.
Follow the canonical baseline → marker → preflight → send → delivery-check sequence in references/delivery-and-waiting.md:
recent-unwrapped output to a baseline file before sending.HERDR_DONE_ completion marker.scripts/preflight_send.py immediately before dispatch.herdr pane run "$pane_id" "$task".working status or transcript activity. Transcript activity may be prompt echo; only the joined marker proves completion.For multi-line payloads or literal typing, use the guarded recipes in references/herdr-recipes.md. Re-run preflight immediately before any recovery Enter.
Done when: dispatch succeeded and status or transcript activity proves delivery; otherwise return a descriptive error.
Run scripts/wait_for_idle.py with the pre-send baseline and fresh completion marker. Handle its result: 0 completed, 1 error, 2 timeout, 3 blocked. Propagate non-zero results; do not report them as replies.
Accept idle or done after observed work. Read a capped recent-unwrapped transcript and relay only the relevant delta. On timeout, inspect pane get, pane read, and agent explain; stop after the bounded retry budget.
Done when: the requested reply is captured and verified, or blocked/timeout evidence is reported without further writes.
scripts/broadcast.sh "<task>" <targets...>. It resolves targets, preflights, baselines, dispatches safe panes first, waits concurrently, and fails if any target is skipped or unsuccessful.herdr agent focus <name>. For CLI follow-ups, repeat Phases 4–5 with a new baseline and marker.Done when: every requested target has a recorded outcome and destructive actions match the user's confirmed scope.
Expected output for a successful fleet operation:
Fleet: PASS
Root kept: w26:p1
Workers: reviewer=done, tests=idle
Layout: 3 equal-width columns
Replies: 2 captured, 0 blocked, 0 timed out
Acceptance criteria:
herdr status succeeds and every target resolves uniquely.blocked: show the dialog and request human action.unknown: use the wait helper's stability fallback or install the integration.◆ Herdr Agent Comms ([operation])
··································································
Server: √ pass
Root resolved: √ pass (pane · tab · workspace)
Targets: √ pass (N/N unique)
Layout/readiness: √ pass (if spawning; otherwise — n/a)
Delivery: √ pass (if sending; otherwise — n/a)
Replies: √ pass (done|idle · blocked/timeouts reported)
Destructive action: — none (or confirmed scope)
Result: PASS | FAIL | PARTIAL
tools
Run Herdr loops for one open GitHub issue (resolve→review→fix) or an existing PR (review→lazy fixer) until CLEAN. Don't use for plain resolution without review, review-only/no-fix requests, backlog automation, or merging.
development
Generate or update docs to match the code, citing each claim to path:line and asking on ambiguity; runbook docs also get a check-only validation script. Don't use for API-reference autogen (JSDoc/Sphinx), landing pages, or CLAUDE.md/AGENTS.md.
testing
Generate a diagram and route to the right engine — draw.io XML (precise, editable, C4, swimlanes) or Excalidraw JSON (hand-drawn, sketch, wireframes). One entry for flowcharts, architecture, ER, sequence, mind maps. Don't use for Mermaid or slides.
data-ai
Sync a GitHub fork with upstream while keeping unmerged feature branches and open PRs mergeable. Use for rebase on upstream, PR conflicts, integration main. Don't use for git init, releases, or non-fork repos.