← Back to Skills Marketplace
ezpeasydave

Claude Code Dispatch

by EZPeasyDave · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
474
Downloads
0
Stars
3
Active Installs
1
Versions
Install in OpenClaw
/install claude-code-dispatch
Description
Invoke Claude Code CLI as a subprocess for coding tasks that require file access, editing, and shell execution
README (SKILL.md)

Claude Code Dispatch

Delegate coding tasks to Claude Code CLI. Use this when a task requires capabilities beyond what the current agent can do: file editing, shell commands, multi-file debugging, code review with file access, or any work that needs direct filesystem interaction.

Prerequisites

Claude Code must be installed and authenticated on the host machine. The host's ~/.claude/settings.json must pre-authorize the tools this skill will use. Example minimal config:

{
  "permissions": {
    "allow": [
      "Read",
      "Edit",
      "Glob",
      "Grep",
      "Bash(git:*)",
      "Bash(npm:*)"
    ]
  }
}

Without pre-authorized permissions, Claude Code will fail in non-interactive mode because it cannot prompt for approval.

When to Use

Route tasks to Claude Code when they require:

  • File reading, editing, or creation on the host filesystem
  • Shell command execution (builds, tests, git operations)
  • Multi-file debugging or refactoring
  • Code review with actual file access
  • Any task where the agent needs to interact with the local filesystem

Do NOT use when:

  • The task is purely conversational (answering questions, planning)
  • You can handle it with your own capabilities or other skills
  • The task involves external APIs you already have access to

Usage

bash {baseDir}/scripts/invoke-claude.sh \
  --prompt "Fix the broken import in src/App.tsx" \
  --workdir "/path/to/project" \
  --model sonnet \
  --tools "Read,Edit,Glob,Grep,Bash"

Parameters

Parameter Required Default Description
--prompt Yes Task description for Claude Code
--workdir Yes Working directory (must exist)
--model No sonnet Model: sonnet, opus, or haiku
--tools No Read,Edit,Glob,Grep Comma-separated allowed tools
--budget No 2.00 Max budget in USD (for cost reporting)
--timeout No 300 Timeout in seconds
--system No Additional system prompt text

Model Selection Guide

  • sonnet (default): Fast. Good for single-file fixes, simple refactors, code review, running tests.
  • opus: Slower but more capable. Use for complex multi-file debugging, architectural changes, tasks requiring deep reasoning across many files.
  • haiku: Fastest and cheapest. Use for trivial tasks like renaming, formatting, or simple lookups.

Tool Presets

Common tool combinations for different task types:

  • Read-only (code review, analysis): Read,Glob,Grep
  • Standard editing (default): Read,Edit,Glob,Grep
  • Full access (builds, tests, git): Read,Edit,Glob,Grep,Bash

Output Format

The script returns a structured summary:

STATUS: success|failure
MODEL: sonnet|opus|haiku
COST: $0.04
DURATION: 12s
RESULT: \x3CClaude Code's response>

Exit codes: 0 = success, 1 = Claude Code error, 2 = preflight failure, 3 = timeout.

Examples

Fix a build error:

bash {baseDir}/scripts/invoke-claude.sh \
  --prompt "The build is failing with 'Cannot find module ./utils'. Diagnose and fix." \
  --workdir "/Users/dave/WebProjects/summer-camps" \
  --tools "Read,Edit,Glob,Grep,Bash"

Code review:

bash {baseDir}/scripts/invoke-claude.sh \
  --prompt "Review the changes in the last commit. Focus on correctness and security." \
  --workdir "/Users/dave/WebProjects/summer-camps" \
  --model opus \
  --tools "Read,Glob,Grep,Bash"

Run tests and fix failures:

bash {baseDir}/scripts/invoke-claude.sh \
  --prompt "Run the test suite, then fix any failing tests." \
  --workdir "/Users/dave/WebProjects/summer-camps" \
  --tools "Read,Edit,Glob,Grep,Bash" \
  --timeout 600

Limitations

  • No concurrent invocations to the same working directory. Queue tasks sequentially.
  • No multi-turn conversations. Each invocation is independent. For follow-up work, dispatch a new invocation with more context in the prompt.
  • Result truncation. Responses longer than 2000 characters are truncated at the nearest line boundary.

Notes

  • Cost is reported for observability. Subscription users are not charged per-token but the field shows what the task would cost on the API.
  • Claude Code inherits environment variables from the host, including any API keys loaded by load-openclaw-env or similar scripts.
  • The prompt is passed via stdin pipe, not shell interpolation, so special characters in prompts are safe.
Usage Guidance
This skill appears to do exactly what it promises — run the local Claude Code CLI to perform file edits and shell work — but that means the subprocess will run with your user's permissions and will inherit environment variables (including API keys). Before installing or running it: (1) confirm the 'claude' binary you install is the official package you trust (inspect package source or vendor), (2) review ~/.claude/settings.json and grant only the minimal tools (avoid granting Bash or broad Read/Edit unless necessary), (3) avoid running the skill in directories containing secrets or private keys, and (4) consider running it in an isolated user account or container if you need to limit blast radius. If you're unsure about the npm package or your environment contains sensitive credentials, treat this skill as high-risk until you audit the local Claude installation and permissions.
Capability Analysis
Type: OpenClaw Skill Name: claude-code-dispatch Version: 1.0.0 The skill acts as a wrapper for the Claude Code CLI, enabling an AI agent to perform high-risk operations including arbitrary shell execution and direct filesystem modification. While these capabilities are aligned with the stated purpose of delegating complex coding tasks, the 'agent-within-an-agent' pattern significantly expands the attack surface for prompt injection and unintended command execution. The script `scripts/invoke-claude.sh` passes user-provided prompts directly to the sub-agent, and the documentation in `SKILL.md` explicitly encourages granting broad permissions (Read, Edit, Bash) which could be exploited if the agent is misdirected.
Capability Assessment
Purpose & Capability
The name/description match the implementation: the skill dispatches prompts to a local Claude Code CLI. Required binaries (claude, jq) and the declared npm/brew installs align with that purpose; there are no unrelated credentials or surprising binaries.
Instruction Scope
SKILL.md and the included script keep scope narrowly to invoking the claude CLI in the specified workdir. The script checks inputs, runs claude with JSON output, and truncates results. However the documentation explicitly directs users to pre-authorize tools (Read/Edit/Glob/Grep/Bash), and notes that Claude Code inherits host environment variables — so the delegated process may be able to read/edit files and run shell commands beyond what the OpenClaw agent itself would do.
Install Mechanism
Install metadata uses standard package managers: npm package '@anthropic-ai/claude-code' for the 'claude' binary and brew install for jq. No arbitrary downloads, IPs, or extract-from-URL steps are present in the manifest.
Credentials
The skill does not request any environment variables itself, which is appropriate. But the SKILL.md and script acknowledge that the spawned Claude process inherits the host environment (including any API keys). That creates a real risk of exposing secrets to the subprocess or to Claude Code if its permissions allow broad filesystem or shell access. Users should treat this as sensitive and confirm the claude tool and its ~/.claude/settings.json are configured with least privilege.
Persistence & Privilege
The skill is not always-enabled and does not request persistent privileges or modify other skills or system-wide agent settings. It runs only when invoked.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install claude-code-dispatch
  3. After installation, invoke the skill by name or use /claude-code-dispatch
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- Initial release of claude-code-dispatch skill. - Enables delegating coding tasks to Claude Code CLI for operations requiring file access, editing, and shell command execution. - Supports triggering via phrases like "use claude code" or "run claude on". - Requires pre-installed and authenticated Claude Code CLI and jq. - Provides detailed usage instructions, toolset selection, and model options. - Includes structured output and clear guidelines on when and how to use the skill.
Metadata
Slug claude-code-dispatch
Version 1.0.0
License MIT-0
All-time Installs 3
Active Installs 3
Total Versions 1
Frequently Asked Questions

What is Claude Code Dispatch?

Invoke Claude Code CLI as a subprocess for coding tasks that require file access, editing, and shell execution. It is an AI Agent Skill for Claude Code / OpenClaw, with 474 downloads so far.

How do I install Claude Code Dispatch?

Run "/install claude-code-dispatch" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Claude Code Dispatch free?

Yes, Claude Code Dispatch is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Claude Code Dispatch support?

Claude Code Dispatch is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Claude Code Dispatch?

It is built and maintained by EZPeasyDave (@ezpeasydave); the current version is v1.0.0.

💬 Comments