用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/dvcrn/openclaw-skills-marketplace --skill claude-code-delegate命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your agent a soul.
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
基于 SOC 职业分类
正在显示 SKILL.md
| name | claude-code-delegate |
| description | Delegate programming tasks to Claude Code CLI |
Delegate programming tasks to local Claude Code CLI.
RULE: You NEVER write code directly. ALL programming goes through claude -p.
Before delegating any task, verify the environment is ready:
which claude — if not found, tell user: npm install -g @anthropic-ai/claude-codeclaude --version — if it errors about auth, tell user to run claude and complete login.openclaw/extensions/write-guard/. If not, warn the user:
⚠️ No write-guard detected. The delegate uses
--permission-mode bypassPermissionswhich grants full filesystem read/write access. It is strongly recommended to set up a write-guard plugin before running tasks. See README.md for setup instructions.
Only proceed with delegation after items 1 and 2 pass. Item 3 is a warning — the user may choose to proceed without it, but should be informed of the risk.
Auto-trigger on ANY of these:
Manual trigger: user sends /code <task>
Do NOT trigger: chat, emotional interaction, information lookup.
cd "<project_dir>" && claude -p "<task_description>" --output-format text --max-turns 10 --permission-mode bypassPermissions
| Param | Purpose | Required |
|---|---|---|
-p | Non-interactive mode | Yes |
cd "<dir>" && | Set working dir (no --cwd flag exists) | Yes |
--output-format text | Plain text output | Recommended |
--max-turns 10 | Limit execution rounds | Recommended |
--permission-mode bypassPermissions | Auto-accept file edits (requires write-guard, see Prerequisites) | Recommended |
--continue | Resume previous session (for debugging/iteration) | When fixing bugs in same project |
FORBIDDEN: --dangerously-skip-permissions
Set exec timeout to 300 (5 minutes). The delegate needs time to write code.
The delegate MUST NOT block you. You must remain responsive to the user at all times.
Step 1: exec claude -p "..." → get session ID (e.g. "marine-sage")
Step 2: IMMEDIATELY reply to user → "On it! Working on that now."
Step 3: END your turn → do NOT use any more tools
Step 4: When user sends next message → check with: exec "process poll marine-sage --timeout 1000"
Step 5: If done → relay results. If not done → tell user "still working", continue chat
exec claude -p "..." → process poll → (BLOCKED! user waits with no response)
exec claude -p, you MUST reply to user and END your turn. No more tool calls.process tool directly. Use exec "process poll <id> --timeout 1000" on next user message.claude -p tasks in parallel.When user reports bugs in code the delegate previously wrote:
--continue flag to resume the delegate's session context--continue = the delegate remembers what it wroteAfter the delegate writes code, use a separate fresh session (NO --continue) to test and verify it.
Why: The author has context bias. A fresh session reads the source code independently — like an external code reviewer. This catches issues the author missed.
Step 1: claude -p "Write X in projects/X/" → Author session (can use --continue to iterate)
Step 2: claude -p "Run and test projects/X/, report bugs" → Tester session (ALWAYS fresh, NO --continue)
--continue to iterate on bugs--continue — must read source fresh--continue)--continue on author session| Scenario | --continue? |
|---|---|
| Fix/iterate on code the delegate just wrote | Yes |
| Test/verify code the delegate just wrote | No (fresh session) |
| Run existing program | No (fresh session) |
| New project/task | No (fresh session) |
The delegate does not talk to the user directly. You relay all results.
When relaying:
Keep technical summary concise. Do not copy the delegate's full output verbatim.
| Error | Action |
|---|---|
command not found | Tell user to install: npm install -g @anthropic-ai/claude-code |
| Empty output | Ask user to clarify the task |
| Timeout | Suggest breaking into smaller tasks |
| Permission error | Ask user to check file path |
| API error | Ask user to run claude to check login status |
If the delegate fails or times out, do NOT write code yourself.
Tell the user: "The coding task didn't finish. Want me to try again?"
Retry with longer timeout or simpler task description. Only write code yourself if user explicitly says "you do it" (not recommended).
projects/ or workplace/ directory..openclaw/, LaunchAgents/, auth profiles) at the platform level.--dangerously-skip-permissions — This flag is explicitly forbidden. --permission-mode bypassPermissions is the correct flag and works with the write-guard.cd "<project_dir>" && prefix ensures the delegate operates within the intended directory. Never omit it.