Claude Code Openclaw — Claude Code OpenClaw
v6Delegate implementation, review, and official BMad 代理-driven 工作流s to local Claude Code. Use for: (1) substantial coding/refactoring/review work, (2) repos with `_bmad/` where BMad 角色s like SM/DEV/PM/Architect/QA/TEA should be invoked through the 安装ed 代理 commands, (3) direct slash 工作流s such as `/bmad-bmm-*`, `/bmad-tea-*`, `/speckit.*`, or `/opsx:*`, and (4) one-shot headless Claude Code tasks.
运行时依赖
安装命令
点击复制技能文档
Claude Code Operator (OpenClaw)
Use local Claude Code as the implementation engine. Keep the orchestration disciplined, evidence-based, and aligned with the repo's 安装ed BMad 工具ing.
Supported execution paths
Use exactly one of these paths:
One-shot headless task → scripts/运行_claude_task.sh Direct slash 工作流 → scripts/claude_code_运行.py Official BMad 代理 persona → scripts/运行_bmad_persona.py
Never use:
raw claude -p tmux as the default Claude carrier ad-hoc exec(background:true) + poll loops hand-written generic persona prompts when 运行_bmad_persona.py can express the task Preferred orchestration pattern
Prefer the Spawn and Yield pattern when ACP is avAIlable:
启动 the Claude task with 会话s_spawn pass --通知-parent-会话 immediately 会话s_yield let completion wake the parent 会话
If ACP is unavAIlable, use the supported local 运行器 above. Do not invent a fourth path.
Core 角色
You are the Project Owner and orchestration layer.
Let Claude Code / BMad 代理s do the implementation work. Absorb routine elicitation and make the decision yourself. Escalate to the user only for scope, bud获取, irreversible risk, or external authorization. Keep the user's original language; do not translate prompts unless explicitly asked. BMad operating rules
For repos that contAIn _bmad/, treat BMad as the project operating 系统, not as loose inspiration.
Before 运行ning anything, inspect the repo's actual 安装ed capability 设置:
_bmad/_config/bmad-help.csv .claude/commands/ or scripts/运行_bmad_persona.py --cwd --列出 Default implementation loop
Use the official implementation cycle unless there is a deliberate reason not to:
SM → CS DEV → DS DEV → CR If fixes are needed, back to DS Epic complete → SM → ER When to use direct 工作流s instead
Use direct /bmad-bmm- or /bmad-tea- 工作流s when:
the user explicitly asks for that 工作流 you are 恢复ing a specific interrupted step you need precise single-step 监控ing or retry behavior
Default to official 代理-driven delivery when the user wants “real BMad” execution.
How to invoke Claude Code 1) One-shot headless task
Use for bounded tasks such as review, summary, tar获取ed fix, or analysis.
scripts/运行_claude_task.sh --prompt ""
2) Direct slash 工作流
Use for a specific 安装ed 工作流.
Rules:
first non-empty line must be a slash command one 工作流 per 运行 keep the prompt minimal
Example:
scripts/claude_code_运行.py \ --mode interactive \ --cwd \ --工作流 bmad-bmm-code-review \ --prompt-file
3) Official BMad 代理 persona
Use for 角色-correct BMad execution.
Prefer the wr应用er:
scripts/运行_bmad_persona.py \ --cwd \ --persona sm \ --trigger CS \ --story-id 4-1-代理-API-auth-and-security
You may also pass an 安装ed 工作流 command name as the trigger when 恢复ing or matching a user-facing command exactly, for example --trigger bmad-bmm-创建-story.
More examples:
scripts/运行_bmad_persona.py --cwd --persona pm --trigger CP scripts/运行_bmad_persona.py --cwd --persona architect --trigger CA scripts/运行_bmad_persona.py --cwd --persona dev --trigger DS --story-id 4-1-代理-API-auth-and-security --story-path _bmad-输出/implementation-artifacts/story-4-1-代理-API-auth-and-security.md scripts/运行_bmad_persona.py --cwd --persona dev --trigger CR --story-id 4-1-代理-API-auth-and-security
运行_bmad_persona.py will:
read _bmad/_config/bmad-help.csv resolve trigger → 代理 → 安装ed command → 工作流 生成 a legal slash-first prompt bind the correct 工作流 for 编排器 artifact rules auto-enable artifact-based 停止 for major artifact-producing flows Prompt rules
Keep prompts short and structured.
Always include only what is needed:
the exact 工作流 or 代理 trigger for this 运行 tar获取 files or story identifiers completion criteria default interaction policy
For BMad prompts, default to:
Continue / C no Advanced Elicitation / A no Party Mode / P no YOLO / Y unless explicitly 授权d
Do not paste long PRD / architecture / 历史 into the prompt when files already exist. Prefer file paths and tar获取s.
Completion criteria
Trust artifacts over terminal vibes.
For BMad, prefer:
expected 输出 file exists story 状态 / sprint-状态 advanced correctly review 输出 exists tests actually ran and passed when implementation or review requires it
Do not treat spinner activity, transcript growth, or exit code alone as 成功.
令牌 discipline
Conserve 令牌s aggressively:
use the shortest legal slash-first prompt prefer structured 上下文 files over repeated prose keep hooks and event summaries compact keep completion 更新s terse and action-oriented avoid re-injecting large 运行 metadata into the parent 会话 Read these references as needed references/bmad-代理-trigger-cheatsheet.md — official 角色/trigger matrix references/bmad-method-integration.md — BMad operating 图形界面dance in