Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

dispatch

БесплатноЗапускает вложенные скриптыНе проверен

Hand new work bound for its own pull request to a fresh Claude session in a new worktree, opened in a Rex tab or a herdr workspace with its permissions…

bendruckerот bendrucker★ 18 звёзд на GitHub

Об этом скилле

Dispatch

Start a separate Claude session that takes a task through to its own PR while this session keeps working, or follows up on a branch or PR that already exists. The script checks the branch out in a worktree with wt, writes the session's .claude/settings.local.json, and launches claude --name <name> <prompt> in the multiplexer hosting this session.

Write the Prompt

Write the prompt to a file under tmp/ from what this conversation already knows. The dispatched session starts with no context from this one, so state the goal, what is already ruled out, and the completion criterion, and name any files this conversation has already found. It reads the repository itself, so go straight from the request to the prompt without exploring the code first. Keep it under 128KB. For larger material, point the session at a file. The script appends this session's name, its Rex block or herdr pane, and the address another machine uses for this one. The dispatched session sends its replies with SendMessage to that name.

PR-bound work ends by opening its PR through pull-request:create. When the user wants to review the work before the PR opens, tell the session in the prompt to run pull-request:create --review human, which holds the PR until the user approves its body and diff. That flag is the session's stopping point.

Flags

--help, run for this session:

!bun "${CLAUDE_SKILL_DIR}/scripts/dispatch.ts" --help

Pass --title with two to four Title Case words naming the task. The script ends a pane or tab session's prompt with an instruction to run dispatch:close once its PR is open. Pass --keep-open to leave that instruction out when the user wants to keep the session open.

Grant Permissions

Pass the permissions the task needs with --allow, --sandbox-write, and --settings-json so the session runs without prompting for them. The script merges them into the worktree's .claude/settings.local.json, keeping existing keys and skipping array entries already present. It refuses to write when that file is not git-ignored.

Pick the Place

A tab is a workstream with this session as its lead, and a pane is one task within it. Take the first place that fits:

  • bg, a claude --bg session with no terminal: a small, self-contained change with a clear completion criterion, few questions, and little for the user to read before the PR. Pass --mux bg.
  • A pane in this tab: a side issue inside this tab's current workstream that the user will want to watch or steer. Under Rex, pass --split. Under herdr, open a tab.
  • A new tab (rex or herdr): an unrelated theme, or exploratory work that needs decisions, reading, or review as it goes.

Session

Under Rex, open a tab in the session for its area of work. The user keeps one Rex session per area, plus the inbox I/O for scratch work and light follow-ups. The candidates, with each session's tabs, working directories, and description. Listing them also moves the sessions that ~/.config/rex/sessions.toml gives an order to the top of Rex's session list:

!bun "${CLAUDE_SKILL_DIR}/scripts/dispatch.ts" sessions --apply-order

Take the first rule that fits:

  • A light follow-up to existing work, such as a small CI fix: stay in this session, or pass --session I/O.
  • One area session clearly matches the repo, a working directory, a tab label, or the description: pass --session <label>.
  • Several sessions match, or none does: pass --session I/O, and name the closest areas in the hand-off. Once the user picks one, move the tab there with rex window move <title> -s I/O --to <session>.
  • The user named another host: list that host's sessions with claude-dispatch sessions --host <label>, then dispatch with --host <label> --session <label> --repo <path or slug>.

--help above names the tab multiplexer --mux defaults to. When the task calls for a pane or tab and --help says to pass --mux instead, ask the user with AskUserQuestion whether to use rex or herdr.

The user finds a background session in claude agents and picks it up with claude attach <target>. This session follows it with SendMessage to name, and reads its output with claude logs <target>. The ledger, dispatches.jsonl in the plugin data dir, records every dispatch.

Run It

!sh "${CLAUDE_PLUGIN_ROOT}/scripts/bin-path-check.sh" claude-dispatch

claude-dispatch --branch "$BRANCH" --prompt "$PROMPT_FILE" [--allow <rule>]... [--sandbox-write <path>]...
  • Make claude-dispatch the entire Bash command, with no cd, env prefix, pipe, &&, or loop, because only that form matches its sandbox exclusion. For several dispatches, write one prompt file each and issue the Bash calls in parallel in one message.
  • --repo defaults to this session's repository, shown in --help above. Pass it only to dispatch into another repository. See Other Repositories below.
  • A branch that exists locally or on a remote is reused, and a branch t
Полный SKILL.md на GitHub

Установить dispatch в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Bash(claude-dispatch:*)
Bash(sh "${CLAUDE_PLUGIN_ROOT}/scripts/bin-path-check.sh":*)
Bash(bun "${CLAUDE_SKILL_DIR}/scripts/dispatch.ts" --help)
Bash(bun "${CLAUDE_SKILL_DIR}/scripts/dispatch.ts" sessions:*)

Вложенные файлы

scripts/__snapshots__/dispatch.test.ts.snapscripts/dispatch.test.tsscripts/dispatch.tsscripts/launch.tsscripts/ledger.tsscripts/mux.tsscripts/naming.tsscripts/record.tsscripts/repo.integration.tsscripts/repo.test.tsscripts/repo.tsscripts/required.tsscripts/runner.tsscripts/sender.tsscripts/sessions.test.tsscripts/sessions.tsscripts/settings.tsscripts/status.tsscripts/worktree.ts

FAQ

Что делает скилл dispatch?

Hand new work bound for its own pull request to a fresh Claude session in a new worktree, opened in a Rex tab or a herdr workspace with its permissions written ahead of time. Use when a task should run beside this session rather than inside it, including a change this session found that belongs in another branch or repository. Not for re-rooting this session (`worktrunk:wt-switch-create`) or in-session subagents (`Agent`).

Как установить скилл dispatch?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл dispatch запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить dispatch с