From delegate-to-agents
Use when delegating a coding task to the OpenClaude CLI (`openclaude`) from Claude Code. OpenClaude is a Claude-Code-compatible agent CLI whose standout feature is --provider (anthropic/openai/gemini/github/bedrock/vertex/ollama). Covers print mode, permission modes, providers, and tmux. Load delegate-to-agents first.
How this skill is triggered — by the user, by Claude, or both
Slash command
/delegate-to-agents:drive-openclaudeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Delegate to [OpenClaude](https://github.com/openclaude) — a Claude-Code-compatible
Delegate to OpenClaude — a Claude-Code-compatible
coding agent CLI. Its flag surface mirrors Claude Code, so the drive-claude-code
patterns mostly apply; the key difference is --provider, which lets one CLI
run against many model backends. Read delegate-to-agents first.
Flags verified against OpenClaude 0.14.0 (openclaude --help).
command -v openclaude && openclaude --version
--provider. OpenClaude reads provider API keys from the
environment (e.g. ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY, …),
or Anthropic OAuth for the default provider. Confirm the relevant key is set
before a headless run.-p / --print# headless (workspace-trust dialog is skipped under -p)
Bash(command="cd /repo && openclaude -p 'Add structured logging to the request handler'", timeout=300000)
# against a specific provider
Bash(command="cd /repo && openclaude -p 'Review src/auth.ts for security issues' --provider openai --model gpt-5.4", timeout=300000)
# structured JSON output
Bash(command="cd /repo && openclaude -p 'List all exported functions' --output-format json", timeout=300000)
# long task: detach + log
Bash(command="cd /repo && openclaude -p 'Refactor the cache layer' --permission-mode acceptEdits > /tmp/agent-oc.log 2>&1", run_in_background=true)
| Flag | Effect |
|---|---|
-p, --print | Non-interactive; print result and exit (skips workspace-trust dialog) |
--provider <p> | anthropic, openai, gemini, github, bedrock, vertex, ollama (reads keys from env) |
--model <model> | Alias (sonnet/opus) or full name |
--output-format <fmt> | text, json, stream-json (print mode) |
--json-schema <schema> | Structured output validation |
--permission-mode <mode> | default, acceptEdits, plan, auto, dontAsk, bypassPermissions |
--dangerously-skip-permissions | Auto-approve everything (isolated dirs only) |
--allowedTools / --disallowedTools / --tools | Scope tool access |
--max-budget-usd <n> | Spend cap (print mode) |
--fallback-model <m> | Fall back when default is overloaded (print mode) |
--no-session-persistence | Don't save the session (print mode) |
-c, --continue / -r, --resume [id] | Resume conversations |
-w, --worktree [name] / --tmux | Isolated git worktree (+ tmux session) |
--from-pr [n] | Resume a session linked to a PR |
--bare | Minimal: skip hooks/LSP/plugins/CLAUDE.md (needs ANTHROPIC_API_KEY or --settings) |
--append-system-prompt <text> | Extend the system prompt |
--max-turnsis not listed in OpenClaude 0.14.0's--help(it's an inherited, hidden flag — it's still accepted at runtime). Prefer--max-budget-usdas the documented, guaranteed bound for a print-mode run.
Default (no -p) is interactive; drive via tmux exactly like Claude Code. The
workspace-trust dialog appears on first visit to a directory — answer it by
sending Enter (default is "trust"). With --dangerously-skip-permissions a
second confirmation defaults to "No" — send Down then Enter.
Bash(command="tmux new-session -d -s oc -x 200 -y 50")
Bash(command="tmux send-keys -t oc 'cd /repo && openclaude' Enter")
Bash(command="sleep 5 && tmux send-keys -t oc Enter") # trust dialog → default Yes
Bash(command="sleep 2 && tmux send-keys -t oc 'Add a /health route' Enter")
Bash(command="sleep 25 && tmux capture-pane -t oc -p -S -80")
Bash(command="tmux kill-session -t oc")
-p for automation — clean, skips the trust dialog.--provider + the matching API key env var when not using Anthropic.--permission-mode deliberately; reserve --dangerously-skip-permissions
for isolated dirs.--max-budget-usd (documented); --max-turns
is hidden-but-accepted and may also be added.Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
npx claudepluginhub josephyaduvanshi/delegate-to-agents --plugin delegate-to-agents