Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
win4r avatar

Claude Code Dispatch

  • 10 installs
  • 44 repo stars
  • Updated March 3, 2026
  • win4r/claude-code-dispatch

Helps with ai & agent building tasks.

About

claude-code-dispatch is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.

  • claude-code-dispatch
  • AI & Agent Building
  • AI-coding skill

Claude Code Dispatch by the numbers

  • 10 all-time installs (skills.sh)
  • Ranked #11,937 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Jul 27, 2026 (Skillselion catalog sync)
npx skills add https://github.com/win4r/claude-code-dispatch --skill claude-code-dispatch

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs10
repo stars44
Last updatedMarch 3, 2026
Repositorywin4r/claude-code-dispatch

What it does

Helps with ai & agent building tasks.

Files

SKILL.mdMarkdownGitHub ↗

Claude Code Dispatch Skill

Dispatch development tasks to Claude Code with automatic notification on completion. Zero polling, zero token waste.

Architecture

dispatch.sh
  → write task-meta.json
  → launch Claude Code via claude_code_run.py (PTY wrapper)
  → [Agent Teams: --agents JSON defines Testing Agent + custom subagents]
  → Claude Code finishes → Stop/TaskCompleted hook fires automatically
    → notify-agi.sh reads meta + output
    → writes latest.json
    → sends Telegram notification (group + callback)
    → writes pending-wake.json (heartbeat fallback)

Quick Reference

Basic dispatch

⚠️ Always use `nohup` + background (`&`) — dispatch runs until done.

nohup bash scripts/dispatch.sh \
  -p "Build a Python REST API with FastAPI" \
  -n "my-api" \
  -g "-5006066016" \
  --permission-mode bypassPermissions \
  --workdir /home/ubuntu/projects/my-api \
  > /tmp/dispatch-my-api.log 2>&1 &

With Agent Teams

nohup bash scripts/dispatch.sh \
  -p "Build a full-stack app with React + Express" \
  -n "fullstack-app" \
  --agent-teams \
  --permission-mode bypassPermissions \
  --workdir /home/ubuntu/projects/fullstack-app \
  > /tmp/dispatch-fullstack.log 2>&1 &

When --agent-teams is passed without --agents-json, a default Testing Agent is auto-defined via the --agents CLI flag (structured JSON, not prompt injection).

With cost controls

nohup bash scripts/dispatch.sh \
  -p "Refactor the database layer" \
  -n "db-refactor" \
  --max-budget-usd 5.00 \
  --max-turns 50 \
  --fallback-model sonnet \
  --permission-mode bypassPermissions \
  --workdir /home/ubuntu/projects/my-app \
  > /tmp/dispatch-refactor.log 2>&1 &

With custom subagents

nohup bash scripts/dispatch.sh \
  -p "Build CLI tool" \
  -n "cli-tool" \
  --agent-teams \
  --agents-json '{"security-reviewer":{"description":"Security expert","prompt":"Review for vulnerabilities","tools":["Read","Grep","Glob"],"model":"opus"}}' \
  --permission-mode bypassPermissions \
  --workdir /home/ubuntu/projects/cli-tool \
  > /tmp/dispatch-cli.log 2>&1 &

With git worktree isolation

nohup bash scripts/dispatch.sh \
  -p "Implement feature X" \
  -n "feature-x" \
  --worktree feature-x \
  --permission-mode bypassPermissions \
  --workdir /home/ubuntu/projects/my-app \
  > /tmp/dispatch-feature.log 2>&1 &

All Parameters

ParamShortDescription
--prompt-pTask description (required*)
--prompt-fileRead prompt from file (required*)
--name-nTask name for tracking
--group-gTelegram group ID for notifications
--workdir-wWorking directory
--agent-teamsEnable Agent Teams mode
--agents-jsonCustom subagent definitions (JSON)
--teammate-modeDisplay: auto / in-process / tmux
--permission-modebypassPermissions / plan / acceptEdits / default
--allowed-toolsTool allowlist
--disallowed-toolsTool denylist
--modelModel override (sonnet/opus/haiku/full name)
--fallback-modelAuto-fallback when primary is overloaded
--max-budget-usdMaximum dollar spend before stopping
--max-turnsMaximum agentic turns
--worktreeGit worktree name for isolation
--no-session-persistenceDon't save session to disk
--append-system-promptAppend text to system prompt
--append-system-prompt-fileAppend system prompt from file
--mcp-configLoad MCP servers from JSON file
--verboseEnable verbose logging
--callback-groupCallback to dispatching agent's group
--callback-dmDM callback user ID
--callback-accountDM callback bot account
--session-sCallback session key

\* One of --prompt or --prompt-file is required.

Hook Setup

See references/hook-setup.md for full hook configuration. The skill uses Stop, TaskCompleted, and SessionEnd hooks with the notify-agi.sh script. HTTP hooks are also supported as an alternative.

Prompt Tips

See references/prompt-guide.md for examples and best practices, including cost control, Agent Teams, worktree isolation, custom subagents, and MCP integration.

Debugging

# Watch hook log
tail -f data/claude-code-results/hook.log

# Check latest result
cat data/claude-code-results/latest.json | jq .

# Check task metadata
cat data/claude-code-results/task-meta.json | jq .

# Test Telegram delivery
openclaw message send --channel telegram --target "-5006066016" --message "test"

# Check dispatch log
tail -f /tmp/dispatch-*.log

Gotchas

1. Must use PTY wrapper — Direct claude -p can hang in exec environments 2. Hook fires twice — Stop + SessionEnd both trigger; .hook-lock deduplicates (30s window) 3. Hook stdin is empty in PTY — Output read from task-output.txt, not stdin 4. tee pipe race — Hook sleeps 1s for pipe flush before reading output 5. Meta freshness — Hook validates meta age (<2h) and session ID 6. Agent Teams cost — Use --max-budget-usd to cap spend on multi-agent tasks 7. Rate limits — Claude Code has daily rate limits resetting at 11:00 UTC; check hook.log for "limit" messages

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.