dispatch-grok
/dispatch-grok
Dispatch one or more tasks to grok (Grok Build) agents in herdr workspaces — the orchestrator designs each lane's plan and acceptance criteria, grok pursues them — supervise them to completion, then push each lane and open its pull request. Use when the user asks to dispatch/fan out/派发 tasks to grok agents or herdr lanes, to run several grok tasks in parallel worktrees, or to resume supervision of an existing dispatch-grok run (`--resume`).
- Author
- bestony ↗
- Repository
- herdr-dispatch ↗
- Licence
- MIT
- Last repository change
- 02.10.2026
Assessment and security
- Files in this package
- 4
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 1
No signals detected. Repository changed on 02.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Dispatch one or more tasks to grok (Grok Build) agents in herdr workspaces — the orchestrator designs each lane's plan and acceptance criteria, grok pursues them — supervise them to completion, then push each lane and open its pull request. Use when the user asks to dispatch/fan out/派发 tasks to grok agents or herdr lanes, to run several grok tasks in parallel worktrees, or to resume supervision of an existing dispatch-grok run (`--resume`).
Arguments
/dispatch-grok <task-1>; <task-2>; … [--lanes N] [--base <ref>] [--no-yolo] [--yolo] [--draft] [--no-pr] [--resume] [--no-loop]
Original author description
Dispatch one or more tasks to grok (Grok Build) agents in herdr workspaces — the orchestrator designs each lane's plan and acceptance criteria, grok pursues them — supervise them to completion, then push each lane and open its pull request. Use when the user asks to dispatch/fan out/派发 tasks to grok agents or herdr lanes, to run several grok tasks in parallel worktrees, or to resume supervision of an existing dispatch-grok run (`--resume`).
How it works
- How to read this skill
- §0 Invariants — reread every sweep, never work from memory
- §1 Gate and parse
SKILL.md preview
---
name: dispatch-grok
description: Dispatch one or more tasks to grok (Grok Build) agents in herdr workspaces — the orchestrator designs each lane's plan and acceptance criteria, grok pursues them — supervise them to completion, then push each lane and open its pull request. Use when the user asks to dispatch/fan out/派发 tasks to grok agents or herdr lanes, to run several grok tasks in parallel worktrees, or to resume supervision of an existing dispatch-grok run (`--resume`).
argument-hint: '<task-1>; <task-2>; … [--lanes N] [--base <ref>] [--no-yolo] [--yolo] [--draft] [--no-pr] [--resume] [--no-loop]'
allowed-tools: Read, Write, Edit, Glob, Grep, TodoWrite, AskUserQuestion, Skill, Bash(herdr:*), Bash(git:*), Bash(gh:*), Bash(jq:*), Bash(python3:*), Bash(grok:*), Bash(mkdir:*), Bash(ls:*), Bash(grep:*), Bash(test:*), Bash(date:*), Bash(mv:*), Bash(cat:*), Bash(printf:*)
---
# Dispatch tasks to grok agents running under herdr
The **raw request** is the text passed to this skill — its arguments, or, when it was invoked with
none, the task text in the user's own message.
You are an **orchestrator**. You do not implement the tasks yourself. You split the request into
lanes, give each lane its own herdr workspace and its own grok agent, and then keep those agents
alive and moving until every lane genuinely finishes. **You do the planning; grok does the work**:
each lane gets a plan and acceptance criteria you author and the user confirms (§3), and — when
this machine has grok's goal mode enabled — runs as a grok **goal** (`/goal`, §5c), an objective
grok works across rounds and only marks complete after its own evidence review. A lane is not
finished when its agent stops — it is finished when its work is verified, its branch is pushed, and
its pull request is open (§6f).
## How to read this skill
The procedure is split across four files, and the section numbers (§0–§8) are continuous across all
of them, so a cross-reference means the same thing wherever you are:
| Sections | File | Read it |
| --- | --- | --- |
| §0 invariants, §1 gate and parse | this file | always, and §0 again at the start of every sweep |
| §2–§4, §5b | `references/plan.md` | on a fresh dispatch, before creating anything |
| §5a, §5c, §6a, §6c, §6d, §6g, §6h | `references/driver.md` | everything grok-specific: launch, probe, classify, steer |
| §6b, §6e, §6f, §6i, §6j, §7, §8 | `references/supervise.md` | before the first supervision sweep |
`references/plan.md` and `references/supervise.md` are symlinks into the plugin's `skills/_shared/`:
the shared halves stay single-sourced while still resolving when this skill's directory is copied on
its own, which is how the [skills.sh](https://skills.sh) installer places it. Both are read by path,
not invoked.
## §0 Invariants — reread every sweep, never work from memory
1. **The state file is the only truth.** `~/.claude/dispatch-grok/<run-id>/state.json`. Begin every
sweep by reading it; your conversation memory may have been compacted away. Rewrite it atomically
(write `.tmp`, then `mv`) at the end of every sweep.
2. **Judge a lane from disk, not from the screen.** Every grok session keeps its own directory under
`~/.grok/sessions/`, and two small files in it — `signals.json` (context-window usage as a
percentage, compaction count, turn count, error and tool-failure counts) and `summary.json`
(model, message count, last activity, git branch) — answer most of what a sweep needs without
parsing a transcript at all. `events.jsonl` supplies turn boundaries and permission requests.
Terminal output is the fallback, never the primary signal.
3. **`agent_status` alone never means "finished", and it can lie outright.** A background lane reports
`done` (not `idle`) when unseen work ends — but it reads the same when the prompt was swallowed,
when grok froze, and when herdr misclassified a modal. Always corroborate (§6). The same goes for
a lane's notify-back or help ring (§5b): it is a doorbell that starts a sweep sooner, never evidence
that skips §6e.
4. **Grok's goal state is not on disk.** Unlike its context and turn counters, a goal's
`active` / `paused` / `blocked` status lives only inside the running session and is read by asking
`/goal status` in the pane — which costs a turn. So the sweep never polls it routinely: it asks
only when it is already about to act on that lane (§6c `stalled` / `idle_incomplete`), and until
it asks, goal state is `unknown` and proves nothing either way.
5. **Never touch what you did not create.** Act only on ids recorded in the state file. Never
`herdr server stop`. Never `herdr agent focus` / `workspace focus` — it steals the human's UI focus
and silently flips `done` to `idle`, destroying your own signal. Never `grok leader kill`: one
leader process backs every grok session on this machine, including the user's own.
6. **Never destroy work; publish only what you verified.** Finishing a lane means pushing *its own*
branch and opening a PR for it (§6f) — both additive and reversible, and both yours to do, never
the lane's. Everything else stays forbidden: never force-push (`--force`, `--force-with-lease`),
never push the base branch or any branch absent from the state file, never merge, never
`worktree remove`, never `grok sessions delete`. Print those commands and let the user run them:
`worktree remove` kills the running grok process and deletes uncommitted changes even without
`--force`.
7. **A lane's `chat_history.jsonl` grows without bound.** Never parse one whole — prefer
`signals.json` and `summary.json`, and read only the tail of `events.jsonl`.
---
## §1 Gate and parse
Run `test "${HERDR_ENV:-}" = 1`, `test -n "${HERDR_PANE_ID:-}"` and `herdr agent list`. If
`HERDR_ENV` or `HERDR_PANE_ID` is unset or the CLI cannot reach the socket, stop and tell the user in
Chinese that this session is not inside a herdr pane, so there is nothing to dispatch into — an
exported `HERDR_ENV` alone can pass in a non-pane shell, and a run recorded without its pane id has
no working notify-back. Do not install or launch herdr, and do not run grok yourself.
Parse flags from the raw request; everything else is task text.
| Flag | Meaning | Default |
| --- | --- | --- |
| `--lanes N` | cap on concurrent lanes, 1–16 | 16 |
| `--base <ref>` | base ref for lane branches | `origin/<current>` if it exists, else current branch |
| `--no-yolo` | launch each lane with `--permission-mode default` so tool calls prompt for approval | off — **yolo is the default** |
| `--yolo` | accepted and explicit, but redundant: this is already the default | on |
| `--draft` | open pull requests as drafts instead of ready for review | off — **ready for review is the default** |
| `--no-pr` | push each verified lane but stop there; print the `gh pr create` command instead | off |
| `--resume` | skip §2–§5 (this gate and parse still run); run ONE supervision sweep over the existing state file | off |
| `--no-loop` | do not arm the recurring supervision loop after dispatch | off |
**`--no-yolo` must be passed through, not merely un-passed.** `~/.grok/config.toml` can turn yolo on
globally (`[ui] yolo` / `[ui] permission_mode`), so omitting the bypass flag does **not** restore
prompting — the lane would still auto-approve everything while the §3 summary claimed otherwise.
Under `--no-yolo` the driver passes `--permission-mode default` explicitly (§5c). Read the config
before summarising the posture in §3, and describe what will actually happen.
**Every lane gets its own git worktree. This is not a flag and there is no opt-out.** With approvals
bypassed by default (§5c), the worktree boundary is the only thing left keeping one lane's mistakes
out of the other lanes and out of the user's own checkout. If the request contains `--no-worktree`,
**stop before creating anything**: say in Chinese that this skill always isolates lanes in worktrees
and that the flag no longer exists, and ask the user to re-run without it. Grok's own `--worktree` /
`-w` flag is likewise never used — §4 explains why.
With `--resume`, first locate the run — conversation memory may be gone (§0.1): scan
`~/.claude/dispatch-grok/*/state.json` for runs whose repo matches the cwd and that still hold
non-terminal lanes; one match sweeps it, several means ask the user which, none means say so and
stop. Then read `references/driver.md` and `references/supervise.md` and go to §6. With no task text
and no `--resume`, ask the user in Chinese what to dispatch, and stop.
Otherwise — a fresh dispatch — read `references/plan.md` now and continue at §2.
Files in this package (4)
- SKILL.md 9 KB
- references/driver.md 24 KB
- references/plan.md 1 KB
- references/supervise.md 1 KB
Versions
The database has no other skills named dispatch-grok.
Database snapshot: 13.11.2026 · package version 40b6b3b81007 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 1 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90dispatch-codex
Dispatch one or more tasks to codex agents in herdr workspaces — the orchestrator designs each lane's plan and acceptance criteria, codex pursues them in goal mode — supervise them to completion, then push each lane and open its pull request. Use when the user asks to… - 90dispatch-antigravity
Dispatch one or more tasks to Antigravity CLI (agy) agents in herdr workspaces — the orchestrator designs each lane's plan and acceptance criteria, agy pursues them in goal mode — supervise them to completion, then push each lane and open its pull request. Use when the user asks… - 100headless-grok
Run bounded Grok Build coding-agent tasks through the official grok CLI. Trigger on /headless-grok, "run Grok headlessly", or "supervise grok -p". Not for installation, authentication changes, API-key setup, or consumer chat automation. - 92herdr-grok-bot
Use when a Grok Bot is about to start a new local interactive CLI agent (for example Codex, Cursor, Antigravity, Claude Code, Pi, or another kind Herdr supports), even if Herdr is not mentioned; also when helping the user install Herdr or add this skill. Launch those agents… - 100herdr-dispatch
Run a task list across parallel Herdr panes - measure the pane budget, split, start one agent per task, brief them, collect results from files, handle blocked workers, clean up. Use when the user says "dispatch these", "run these in parallel", "fan this out", "spin up agents",… - 100herdr-fleet
Runs several coding agents in parallel in Herdr panes, each reporting through a file, and wakes the orchestrator when each agent marks its task done. Agents come from a per-project config, so any mix of supported CLIs (Claude, Codex, Cursor, Devin, Grok, command-code) works. Use…