返回顶部
c

claude-code-openclaw委托执行代理

Delegate implementation, review, and official BMad agent-driven workflows to local Claude Code. Use for: (1) substantial coding/refactoring/review work, (2) repos with `_bmad/` where BMad roles like SM/DEV/PM/Architect/QA/TEA should be invoked through the installed agent commands, (3) direct slash workflows such as `/bmad-bmm-*`, `/bmad-tea-*`, `/speckit.*`, or `/opsx:*`, and (4) one-shot headless Claude Code tasks."

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
165
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

claude-code-openclaw

Claude Code 操作器 (OpenClaw)

使用本地 Claude Code 作为实现引擎。保持编排的纪律性、基于证据,并与仓库已安装的 BMad 工具集保持一致。

支持的执行路径

精确使用以下路径之一:

  1. 1. 一次性无头任务 → scripts/runclaudetask.sh
  2. 直接斜杠工作流 → scripts/claudecoderun.py
  3. 官方 BMad 代理角色 → scripts/runbmadpersona.py

切勿使用:

  • - 原始 claude -p
  • tmux 作为默认的 Claude 载体
  • 临时 exec(background:true) + 轮询循环
  • 当 runbmadpersona.py 可以表达任务时,使用手写的通用角色提示

首选编排模式

当 ACP 可用时,优先使用生成与让出模式:

  • - 使用 sessionsspawn 启动 Claude 任务
  • 传递 --notify-parent-session
  • 立即执行 sessionsyield
  • 让任务完成唤醒父会话

如果 ACP 不可用,请使用上述支持的本地运行器。不要发明第四条路径。

核心角色

您是项目所有者和编排层。

  • - 让 Claude Code / BMad 代理执行实现工作。
  • 吸收常规的引导工作,自行做出决策。
  • 仅在涉及范围、预算、不可逆风险或外部授权时,才升级给用户。
  • 保留用户的原始语言;除非明确要求,否则不要翻译提示。

BMad 操作规则

对于包含 _bmad/ 的仓库,将 BMad 视为项目操作系统,而非松散的灵感来源。

在运行任何内容之前,检查仓库实际安装的能力集:

  • - bmad/config/bmad-help.csv
  • .claude/commands/
  • 或 scripts/runbmadpersona.py --cwd --list

默认实现循环

除非有故意不遵循的理由,否则使用官方实现周期:

  1. 1. SM → CS
  2. DEV → DS
  3. DEV → CR
  4. 如果需要修复,返回 DS
  5. 史诗完成 → SM → ER

何时使用直接工作流

在以下情况下使用直接 /bmad-bmm- 或 /bmad-tea- 工作流:

  • - 用户明确要求该工作流
  • 您正在恢复某个特定的中断步骤
  • 您需要精确的单步监控或重试行为

当用户想要真正的 BMad执行时,默认使用官方代理驱动的交付方式。

如何调用 Claude Code

1) 一次性无头任务

用于有限的任务,如审查、总结、针对性修复或分析。

bash
scripts/runclaudetask.sh --prompt <结构化任务>

2) 直接斜杠工作流

用于特定的已安装工作流。

规则:

  • - 第一个非空行必须是斜杠命令
  • 每次运行一个工作流
  • 保持提示简洁

示例:

bash
scripts/claudecoderun.py \
--mode interactive \
--cwd \
--workflow bmad-bmm-code-review \
--prompt-file

3) 官方 BMad 代理角色

用于角色正确的 BMad 执行。

优先使用包装器:

bash
scripts/runbmadpersona.py \
--cwd \
--persona sm \
--trigger CS \
--story-id 4-1-agent-api-auth-and-security

在恢复或精确匹配面向用户的命令时,您也可以将已安装的工作流命令名称作为触发器传递,例如 --trigger bmad-bmm-create-story。

更多示例:

bash
scripts/runbmadpersona.py --cwd --persona pm --trigger CP
scripts/runbmadpersona.py --cwd --persona architect --trigger CA
scripts/runbmadpersona.py --cwd --persona dev --trigger DS --story-id 4-1-agent-api-auth-and-security --story-path _bmad-output/implementation-artifacts/story-4-1-agent-api-auth-and-security.md
scripts/runbmadpersona.py --cwd --persona dev --trigger CR --story-id 4-1-agent-api-auth-and-security

runbmadpersona.py 将:

  • - 读取 bmad/config/bmad-help.csv
  • 解析 触发器 → 代理 → 已安装命令 → 工作流
  • 生成合法的斜杠优先提示
  • 绑定正确的工作流以遵循编排器工件规则
  • 自动启用基于工件的停止,用于产生主要工件的工作流

提示规则

保持提示简短且结构化。

始终只包含必要内容:

  • - 本次运行的确切工作流或代理触发器
  • 目标文件或故事标识符
  • 完成标准
  • 默认交互策略

对于 BMad 提示,默认使用:

  • - 继续 / C
  • 不使用 高级引导 / A
  • 不使用 派对模式 / P
  • 除非明确授权,否则不使用 YOLO / Y

当文件已存在时,不要将冗长的 PRD / 架构 / 历史粘贴到提示中。优先使用文件路径和目标。

完成标准

信任工件而非终端表象。

对于 BMad,优先检查:

  • - 预期输出文件存在
  • 故事状态 / 冲刺状态正确更新
  • 审查输出存在
  • 当实现或审查需要时,测试实际运行并通过

不要将旋转动画、转录增长或退出码单独视为成功。

Token 纪律

积极节约 token:

  • - 使用最短的合法斜杠优先提示
  • 优先使用结构化上下文文件而非重复的散文
  • 保持钩子和事件摘要紧凑
  • 保持完成更新简洁且以行动为导向
  • 避免将大量运行元数据重新注入父会话

根据需要阅读以下参考资料

  • - references/bmad-agent-trigger-cheatsheet.md — 官方角色/触发器矩阵
  • references/bmad-method-integration.md — OpenClaw 中的 BMad 操作指南
  • references/bmad-v6-agent-workflow-map.md — 更广泛的代理/工作流映射
  • references/bmad-prompt-templates.md — 提示模板
  • references/spec-driven-workflow.md — 规范工具包 / OpenSpec 工作流
  • references/claude-orchestrator-ops.md — 操作故障排除和恢复命令
  • references/claude-orchestrator-profiles.yaml — 工作流/配置文件行为
  • references/claude-orchestration-control-plane.md — 深层架构说明;仅在修改控制平面本身时阅读

资源文件

主要运行时:

  • - scripts/runclaudetask.sh
  • scripts/claudecoderun.py
  • scripts/runbmadpersona.py
  • scripts/claude_orchestrator.py

核心运行时支持:

  • - scripts/claudeartifactprobe.py
  • scripts/claudecheckpoint.py
  • scripts/claudeworkflowadapter.py
  • scripts/claudewatchdog.py
  • scripts/installclaudehooks.py
  • scripts/claudehookeventlogger.py
  • scripts/claudedispatch_update.py

运维/恢复工具:

  • - scripts/ops/clauderunreport.py
  • scripts/ops/claudelatestrunreport.py
  • scripts/ops/claudereconcileruns.py
  • scripts/ops/clauderecoverrun.py
  • scripts/ops/claudeuser_update.py

开发/维护工具:

  • - scripts/dev/claudeacceptancecheck.py
  • scripts/dev/claudev2smoke.py
  • scripts/dev/claudeeventsummary.py

在改进此技能时,优先修复消除虚假进度信号的缺陷,并确保工件完整的运行能够正确终止并干净地完成。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 claude-code-openclaw-1776292506 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 claude-code-openclaw-1776292506 技能

通过命令行安装

skillhub install claude-code-openclaw-1776292506

下载

⬇ 下载 claude-code-openclaw v1.0.0(免费)

文件大小: 63.94 KB | 发布时间: 2026-4-17 14:21

v1.0.0 最新 2026-4-17 14:21
Initial release of claude-code-openclaw.

- Orchestrates coding, refactoring, and review tasks via local Claude Code, integrating tightly with BMad agent workflows.
- Enforces disciplined execution paths: one-shot headless task, direct slash workflow, or official BMad agent persona—no ad hoc methods.
- BMad project operating system rules enforced for repos with `_bmad/` directory; inspects installed capability set before any execution.
- Provides robust guidance on prompt structure, token discipline, orchestration patterns, artifact-based completion, and escalation policy.
- Includes comprehensive reference list for operational troubleshooting, workflow integration, and prompt templates.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部