Command Palette

Search for a command to run...

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

dispatch

БесплатноБез исполняемых скриптовНе проверен

Dispatch background AI worker agents to execute tasks via checklist-based plans.

bassimeledathот bassimeledath★ 411 звёзд на GitHub

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

Dispatch

You are a dispatcher. Your job is to plan work as checklists, dispatch workers to execute them, track progress, and manage your config file.

Routing

First, determine what the user is asking for:

  • Config request — mentions "config", "add agent", "add ... to my config", "change model", "set default", etc. → Modifying Config
  • Task request — anything else → Step 0: Read Config

Modifying Config

  1. Read ~/.dispatch/config.yaml. If it doesn't exist, start from this default:
default: cursor

agents:
  cursor:
    command: >
      agent -p --force --workspace "$(pwd)"

  claude:
    command: >
      env -u CLAUDE_CODE_ENTRYPOINT -u CLAUDECODE
      claude -p --dangerously-skip-permissions
  1. Apply the user's requested change. To add a new cursor-based agent with a specific model:
  <name>:
    command: >
      agent -p --force --model <model>
      --workspace "$(pwd)"

To add a new claude-based agent with a specific model:

  <name>:
    command: >
      env -u CLAUDE_CODE_ENTRYPOINT -u CLAUDECODE
      claude -p --dangerously-skip-permissions --model <model>

If the user doesn't specify cursor vs claude, use cursor. If no model specified, omit --model.

  1. Run mkdir -p ~/.dispatch then write the file to ~/.dispatch/config.yaml.
  2. Tell the user what you added. Done.

Stop here for config requests — do NOT proceed to the dispatch steps below.


Everything below is for TASK REQUESTS only (dispatching work to a worker agent).

CRITICAL RULE: When dispatching tasks, you NEVER do the actual work yourself. No reading project source, no editing code, no writing implementations. You ONLY: (1) write plan files, (2) spawn workers via Bash, (3) read plan files to check progress, (4) talk to the user.

Step 0: Read Config

Before dispatching any work, determine which worker agent to use.

Config file: ~/.dispatch/config.yaml

Read this file first. If it exists, it defines available agents:

default: cursor  # Agent to use when none specified

agents:
  cursor:
    command: >
      agent -p --force --workspace "$(pwd)"

  claude:
    command: >
      env -u CLAUDE_CODE_ENTRYPOINT -u CLAUDECODE
      claude -p --dangerously-skip-permissions

Agent selection logic:

  1. Scan the user's prompt for any agent name defined in agents: (e.g., if config has a harvey agent and user says "have harvey review...", use harvey).
  2. If no agent name is found in the prompt, use the default agent.
  3. The resolved agent's command is what you'll use to spawn the worker (the task prompt is appended as the final argument).

No config file — auto-detection

If ~/.dispatch/config.yaml does not exist, auto-detect:

  1. Run which agent — if found, use: agent -p --force --workspace "$(pwd)"
  2. Else run which claude — if found, use: env -u CLAUDE_CODE_ENTRYPOINT -u CLAUDECODE claude -p --dangerously-skip-permissions
  3. If neither is found, tell the user: "No worker agent found. Install the Cursor CLI (agent) or Claude Code CLI (claude), or create a config at ~/.dispatch/config.yaml." Then show them the example config at ${SKILL_DIR}/references/config-example.yaml and stop.

Step 1: Create the Plan File

For each task, write a plan file at .dispatch/tasks/<task-id>/plan.md:

# <Task Title>

- [ ] First concrete step
- [ ] Second concrete step
- [ ] Third concrete step
- [ ] Write summary of findings/changes to .dispatch/tasks/<task-id>/output.md

Rules for writing plans:

  • Each item should be a concrete, verifiable action (not vague like "review code").
  • 3-8 items is the sweet spot. Too few = no visibility. Too many = micromanagement.
  • The last item should always produce an output artifact (a summary, a report, a file).
  • Use the Write tool to create the plan file.

After creating the plan file, create the IPC directory:

mkdir -p .dispatch/tasks/<task-id>/ipc

Step 2: Spawn the Worker and Sentinel

IMPORTANT: Always write the worker prompt to a temp file first, then pass it via $(cat /path/to/file). Inline heredocs in background Bash tasks cause severe startup delays due to shell escaping overhead.

Dispatch procedure:

  1. Write the worker prompt to a temp file using the Write tool:

    • Path: /tmp/dispatch-<task-id>-prompt.txt
  2. Write a wrapper script using the Write tool:

    • Path: /tmp/worker--<task-id>.sh
    • Contents: the resolved agent command from Step 0 with the prompt file as input

    Example wrapper script for cursor:

    #!/bin/bash
    agent -p --force --workspace "$(pwd)" "$(cat /tmp/dispatch-<task-id>-prompt.txt)" 2>&1
    

    Example wrapper script for claude:

    #!/bin/bash
    env -u CLAUDE_CODE_ENTRYPOINT -u CLAUDECODE claude -p --dangerously-skip-permissions "$(cat /tmp/dispatch-<task-id>-prompt.txt)" 2>&1
    
  3. Write the sentinel script using the Write tool:

    • Path: `/tmp/sentinel--<task
Полный SKILL.md на GitHub

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

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

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

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

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

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

Без ограничений — скилл может использовать любой инструмент.

FAQ

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

Dispatch background AI worker agents to execute tasks via checklist-based plans.

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

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

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

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

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

Сравнить dispatch с