Install
openclaw skills install openclaw-claude-dispatcherDispatch long-running coding tasks to Claude Code CLI with automatic callback notifications to Feishu/WeCom when complete. Use this skill whenever the user wants to: - Create a new project or application from scratch - Modify/upgrade an existing project with new features - Refactor or improve existing code - Run any coding task that might take a long time - Get notified in Feishu or WeCom when the task completes TRIGGER on phrases like: "create a new project", "build an app", "add feature to project", "upgrade project", "refactor code", "improve the codebase", or any request that involves substantial code generation or modification where the user wants to be notified when it's done.
openclaw skills install openclaw-claude-dispatcherThis skill helps you dispatch coding tasks to Claude Code CLI and receive automatic notifications when they complete.
Use this skill when the user wants to:
The task runs in the background via Claude Code CLI, and when it completes, a notification is sent to the configured channel (Feishu group, WeCom group, or WeCom private message).
User request → dispatch-claude-code.sh → Claude Code CLI executes task
↓
Task completes → Hook triggers
↓
notify-agi.sh sends notification
↓
Feishu/WeCom receives message
Extract these details from the user's request:
~/projects/<project-name>Ask clarifying questions if needed, but default to Feishu if the user doesn't specify.
Notification targets:
oc_934e5b3011709a0ea5d713789e61dc4egroup:wrCQYUEQAAHpLlnGfGnpwcxxverWPs7Auser:xclipse (or other userid)Dispatch script:
~/openclaw/scripts/dispatch-claude-code.sh
-p, --prompt TEXT # Task description (required)
-n, --name NAME # Task name for tracking
-c, --channel CHANNEL # feishu or wecom (default: feishu)
-g, --group ID # Target group/user ID
-w, --workdir DIR # Working directory (default: /home/ecs-user/openclaw)
--permission-mode MODE # bypassPermissions, dontAsk, acceptEdits
--agent-teams # Enable multi-agent collaboration
Use these defaults unless the user specifies otherwise:
feishuoc_934e5b3011709a0ea5d713789e61dc4ebypassPermissions (for non-interactive execution)~/projects/~/openclaw/scripts/dispatch-claude-code.sh \
-p "Your detailed task description here" \
-n "descriptive-task-name" \
-c feishu \
-g "oc_934e5b3011709a0ea5d713789e61dc4e" \
-w "/path/to/project" \
--permission-mode bypassPermissions
When creating a new project:
~/projects/<project-name>mkdir -p ~/projects/<project-name>Example:
mkdir -p ~/projects/vocab-app
~/openclaw/scripts/dispatch-claude-code.sh \
-p "Create a vocabulary learning application with spaced repetition..." \
-n "vocab-app-creation" \
-g "oc_934e5b3011709a0ea5d713789e61dc4e" \
-w "/home/ecs-user/projects/vocab-app" \
--permission-mode bypassPermissions
When modifying an existing project, the user should tell you where it is:
~/openclaw/scripts/dispatch-claude-code.sh \
-p "Add user login functionality with JWT authentication..." \
-n "dgt-web-add-login" \
-g "oc_934e5b3011709a0ea5d713789e61dc4e" \
-w "/home/ecs-user/projects/dgt-web" \
--permission-mode bypassPermissions
If the task is complex or involves multiple components, add --agent-teams:
~/openclaw/scripts/dispatch-claude-code.sh \
-p "Refactor the entire test suite, add integration tests..." \
-n "test-refactor" \
-g "oc_934e5b3011709a0ea5d713789e61dc4e" \
-w "/home/ecs-user/projects/myapp" \
--agent-teams \
--permission-mode bypassPermissions
After running the dispatch command, tell the user:
Example response:
✅ Task dispatched successfully!
📋 Task: Create vocabulary learning app
📁 Location: ~/projects/vocab-app
💬 Notification: Feishu group
The task is running in Claude Code. You'll receive a notification in Feishu when it completes (usually 5-15 minutes for a new project, depending on complexity).
# WeCom group
-c wecom -g "group:wrCQYUEQAAHpLlnGfGnpwcxxverWPs7A"
# WeCom private message
-c wecom -g "user:xclipse"
Important: For WeCom (企业微信), the WebSocket session must be active. Remind the user: "Make sure you've interacted with the bot in WeCom recently so the session is active."
You can dispatch once and the notification goes to the specified channel. If they want multiple notifications, you'd need to run the hook manually after completion (advanced, usually not needed).
User: "Create a new project, write a todo list app with React"
mkdir -p ~/projects/todo-app
~/openclaw/scripts/dispatch-claude-code.sh \
-p "Create a React-based todo list application with local storage, add/delete/complete functionality, and a clean modern UI" \
-n "todo-app-creation" \
-g "oc_934e5b3011709a0ea5d713789e61dc4e" \
-w "/home/ecs-user/projects/todo-app" \
--permission-mode bypassPermissions
User: "Upgrade project 'projects/dgt-web' add user login"
~/openclaw/scripts/dispatch-claude-code.sh \
-p "Add complete user authentication system: login page, JWT token handling, protected routes, and session management" \
-n "dgt-web-add-auth" \
-g "oc_934e5b3011709a0ea5d713789e61dc4e" \
-w "/home/ecs-user/projects/dgt-web" \
--permission-mode bypassPermissions
User: "Refactor the test suite in ~/myapp, make it more maintainable"
~/openclaw/scripts/dispatch-claude-code.sh \
-p "Refactor the test suite: improve organization, add helper utilities, increase coverage, use consistent patterns" \
-n "myapp-test-refactor" \
-g "oc_934e5b3011709a0ea5d713789e61dc4e" \
-w "/home/ecs-user/myapp" \
--agent-teams \
--permission-mode bypassPermissions
Common issues:
mkdir -pls -l ~/openclaw/scripts/dispatch-claude-code.shIf needed, verify the system is ready:
# Check if hook is installed
ls -la ~/.claude/hooks/notify-agi.sh
# Check if dispatch script exists
ls -la ~/openclaw/scripts/dispatch-claude-code.sh
# Verify OpenClaw is running
openclaw status
But avoid doing this proactively - only if there's an actual problem.
❌ Don't monitor logs in real-time - This consumes tokens and the user will get notified when done
❌ Don't read task outputs - Wait for the notification, the summary will be in the message
❌ Don't check status repeatedly - The hook will fire when complete
❌ Don't try to run Claude Code yourself - Always use the dispatch script, which handles the hook setup
Choose based on the task:
bypassPermissions - No prompts, fully automated (recommended default)dontAsk - Run without asking, but still show what's happeningacceptEdits - Safer for critical codebases, but requires some interactionDefault to bypassPermissions unless the user expresses concern about automated changes.
Before dispatching, make sure you have:
Then run the dispatch command and confirm with the user what you did.