Skip to main content
Chapter 6 Agentic Coding: Orchestrating Claude Code, Codex & OpenCode

Driving Claude Code from Inside OpenClaw

9 min read Lesson 34 / 65 Preview

Wiring Claude Code as a Skill

Claude Code is the heaviest hitter in the agentic coding category in 2026. We make it a first-class Skill in OpenClaw.

Manifest

name: code_with_claude
description: Hand off a coding task to Claude Code in a target repo.
input_schema:
  repo_path: { type: string, required: true }
  task:      { type: string, required: true }
  model:     { type: string, default: "claude-opus-4-7" }
  max_minutes: { type: integer, default: 20 }
exec: ./bin/claude_run.sh

Implementation outline

#!/usr/bin/env bash
set -euo pipefail
cd "$REPO_PATH"
git switch -c "openclaw/$(date +%s)" || true
timeout "${MAX_MINUTES}m" claude code --model "$MODEL" --print "$TASK" > /tmp/claude.log
diff=$(git diff --stat)
echo "{\"diff_stat\": \"$diff\", \"log\": \"/tmp/claude.log\"}"

Replace the claude code … line with the current invocation from the Claude Code docs — the binary's flags rotate.

Always work on a branch

The Skill cuts a fresh branch per run. Two reasons:

  1. Easy rollback when the agent gets it wrong (and it will)
  2. Clean diff to review in your chat before merging

Verification step

Before reporting "done", the Skill runs the project's test command. Codify it in a verify.sh per project so OpenClaw can pick it up automatically:

#!/usr/bin/env bash
# verify.sh
php artisan test --parallel
vendor/bin/pint --test
composer test:phpstan

OpenClaw runs ./verify.sh. Only on green does it Telegram you "ready for review".

Try it

Hand Claude Code a tiny task ("rename function foo to bar across the codebase") via OpenClaw. Confirm the branch, the diff, the green verify, and the Telegram ping.

Previous Why an Orchestrator Beats a Single Coding Agent
Engr Mejba Ahmed

Engr Mejba Ahmed

Claude Code Expert · Online

👋

Hey there!

Quick Actions

WhatsApp Instant reply

Chat on WhatsApp

+880 1723 741224 · Instant reply

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

[email protected]

✓ Details sent! I'll get back to you shortly.

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support