claude-code-dispatchlisted
Install: claude install-skill win4r/claude-code-dispatch
# 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.
```bash
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
```bash
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
```bash
nohup bash scripts/dispatch.sh \
-p "Refactor the database la