Install
openclaw skills install @jlacroix82/claude-delegateDelegate coding, repository analysis, file edits, test runs, or code review to the local Claude Code CLI without embedding an Anthropic API key. Works with Claude Pro/Max/Enterprise accounts that authenticate via OAuth and have no API key. Invokes claude -p with the existing Claude CLI login and returns Claude's final output.
openclaw skills install @jlacroix82/claude-delegateUse this skill when the user wants OpenClaw to hand a coding or repository task to Claude Code and receive a result back. It is meant for local, trusted operator setups where claude is already installed and signed in.
claude (Claude Code CLI) is installed on PATH.claude auth login (browser OAuth — works for Pro, Max, and Enterprise accounts). No API key is required or used. Enterprise accounts sign in with their org credentials/SSO; some orgs route through a corporate gateway (claude gateway --config), which the CLI handles automatically once configured.--cwd.exec for the wrapper script.If Claude is not authenticated, tell the operator to run claude auth status then claude auth login once and complete the browser sign-in. Do not request, print, copy, or inspect ~/.claude/.credentials.json.
Prefer the bundled wrapper:
{baseDir}/scripts/claude-delegate.sh --cwd /path/to/repo --prompt "summarize the repository and list the riskiest files"
For file creation or edits (auto-accept workspace edits):
{baseDir}/scripts/claude-delegate.sh \
--cwd /path/to/repo \
--sandbox workspace-write \
--prompt "Create docs/architecture.md explaining the current service layout."
For machine-readable event logs while still returning the final Claude answer:
{baseDir}/scripts/claude-delegate.sh \
--cwd /path/to/repo \
--sandbox workspace-write \
--json-log .openclaw/claude-runs/last.jsonl \
--output .openclaw/claude-runs/last.md \
--prompt "Review the auth changes and fix any failing tests."
To pass CLI-style context:
npm test 2>&1 | {baseDir}/scripts/claude-delegate.sh \
--cwd /path/to/repo \
--sandbox workspace-write \
--prompt "Summarize the failing tests and make the smallest safe fix."
Use --prompt-file path when a generated prompt is already on disk. Use --stdin-file path when another tool wrote context to a file. Use --allowed-tools "Read,Edit,Bash(git *)" to restrict which tools Claude may call, and --model sonnet (or opus) to pick a model.
read-only (maps to Claude plan mode) for analysis, review, summaries, planning.workspace-write (maps to acceptEdits) for creating or editing files in the repo.danger-full-access (maps to bypassPermissions) only on an isolated machine/container with explicit operator approval.--cwd.git diff --stat and relevant diffs before claiming files were changed.ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, or raw tokens to Claude. The wrapper unsets API-key env vars before invoking claude, forcing the saved OAuth login.~/.claude/.credentials.json.claude: command not found: ask the operator to install Claude Code CLI (claude install or npm).claude auth status / claude auth login with their Pro/Max/Enterprise sign-in, then retry. No API key needed.--sandbox workspace-write only if file changes are intended, or narrow --allowed-tools.