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:
- Easy rollback when the agent gets it wrong (and it will)
- 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.