Openclaw-tools claude-code-bridge
Dispatch coding tasks to Claude Code with two-way communication. Send tasks, receive status updates, answer clarifying questions, and get results.
install
source · Clone the upstream repo
git clone https://github.com/syphax/openclaw-tools
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/syphax/openclaw-tools "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/claude-code-bridge" ~/.claude/skills/syphax-openclaw-tools-claude-code-bridge && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/syphax/openclaw-tools "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/claude-code-bridge" ~/.openclaw/skills/syphax-openclaw-tools-claude-code-bridge && rm -rf "$T"
manifest:
skills/claude-code-bridge/SKILL.mdsource content
Claude Code Bridge
Send coding tasks to Claude Code and handle two-way communication. When Claude needs clarification, it writes a question that you can relay to the user and answer back.
When to Use
- User asks to build a script (Python, bash, etc.)
- User asks to fix, refactor, or modify code in a project
- User asks for multi-file code generation or large refactors
- User wants a long coding task in the background
- User wants parallel coding tasks across different projects
- Task may require back-and-forth clarification
When NOT to Use
- Quick questions or explanations (just answer directly)
- Simple single-file reads
- Planning or design discussions
- Non-coding tasks
Dispatching a Task
~/.openclaw/skills/claude-code-bridge/claude-bridge-dispatch.sh \ --task-id <descriptive-name> \ --workdir <project-directory> \ --prompt "<detailed task description>"
Naming Conventions
Use descriptive task IDs with project prefixes:
— bug fixmyapp-fix-auth
— feature workmyapp-add-csv-export
— new script creationscripts-build-parser
Writing Good Prompts
Be specific. Include:
- What to build or fix
- File paths if known
- Expected behavior or output format
- Language and framework preferences
Example:
~/.openclaw/skills/claude-code-bridge/claude-bridge-dispatch.sh \ --task-id scripts-csv-parser \ --workdir ~/projects/data-tools \ --prompt "Create a Python script called parse_orders.py that reads a CSV file of orders, filters rows where status is 'shipped', groups by customer_id, and outputs a summary CSV with columns: customer_id, order_count, total_amount. Use pandas."
Checking Status
Quick status check:
~/.openclaw/skills/claude-code-bridge/claude-bridge-status.sh --task-id <id>
Get recent output from Claude:
~/.openclaw/skills/claude-code-bridge/claude-bridge-status.sh --task-id <id> --output
Get more output lines:
~/.openclaw/skills/claude-code-bridge/claude-bridge-status.sh --task-id <id> --output -n 100
List all tasks:
~/.openclaw/skills/claude-code-bridge/claude-bridge-status.sh --list
View the result when complete:
~/.openclaw/skills/claude-code-bridge/claude-bridge-status.sh --task-id <id> --result
Answering Questions (Two-Way Communication)
When status shows
waiting_for_answer, Claude is asking a clarifying question.
Read the question:
~/.openclaw/skills/claude-code-bridge/claude-bridge-status.sh --task-id <id> --question
The output is JSON with a
questions array. Each question has question text and options with labels.
Send the answer:
~/.openclaw/skills/claude-code-bridge/claude-bridge-answer.sh \ --task-id <id> \ --answer "<the answer text or selected option label>"
After answering, Claude resumes work automatically.
Workflow
- User requests a coding task
- You dispatch a task with a clear, detailed prompt
- Report the task ID and how to monitor it
- Periodically check status (every 30-60 seconds for active tasks, or when the user asks)
- If status is
: read the question withwaiting_for_answer
, present it to the user, then send their answer with--questionclaude-bridge-answer.sh - When status is
: read the result withcomplete
and report to the user--result - If status is
: checkerror
and--output
for details--log
Important Notes
- Claude Code runs in
mode: it auto-approves file edits and bash commands. OnlyacceptEdits
triggers the question relay.AskUserQuestion - Tasks persist across OpenClaw restarts (state is in
).~/.claude-bridge/tasks/ - Each task runs in its own Python process.
- If no answer is provided within 10 minutes, the bridge times out and picks the first option as default.
- Kill a task:
kill $(cat ~/.claude-bridge/tasks/<id>/bridge.pid)