← 返回 Skills 市场
goldmar

Code Agent Orchestration

作者 Mark · GitHub ↗ · v3.2.0 · MIT-0
cross-platform ⚠ suspicious
427
总下载
1
收藏
2
当前安装
8
版本数
在 OpenClaw 中安装
/install code-agent-orchestration
功能描述
Skill for orchestrating coding agent sessions from OpenClaw. Covers launching, monitoring, plan approval, lifecycle management, and worktree decisions.
使用说明 (SKILL.md)

Code Agent Orchestration

Use openclaw-code-agent to run Claude Code or Codex sessions as background coding jobs from chat.

Launch

  • Do not pass channel manually. Routing comes from agentChannels, the current chat context, and fallbackChannel.
  • Sessions are multi-turn. Continue existing work with agent_respond or agent_launch(..., resume_session_id=...); do not start a fresh session for the same task.
  • Always set a short kebab-case name when you care about later follow-up.
  • Set workdir to the target repo.
  • Use permission_mode: "plan" when the user wants a real review gate before implementation.
  • Use permission_mode: "bypassPermissions" only for autonomous execution.
  • defaultWorktreeStrategy now defaults to off. Opt into a worktree strategy explicitly when you want branch isolation.
  • In plan mode, the plan belongs in normal session output. Do not ask the coding agent to write plan docs or transcript artifacts unless the user explicitly asked for a file.

Example:

agent_launch(
  prompt: "Fix the auth middleware bug and add tests",
  name: "fix-auth",
  workdir: "/home/user/projects/my-app"
)

Resume, Don't Respawn

When a session already exists for the task, keep using it.

  • Waiting for plan approval: agent_respond(session, message, approve=true) or agent_request_plan_approval(...) if delegated approval must escalate to the user
  • Waiting for a question answer: agent_respond(session, message)
  • Killed/stopped by restart: agent_respond(session, message)
  • Completed but needs follow-up: agent_launch(resume_session_id=session_id, prompt="...")
  • Fresh agent_launch is only for genuinely independent work

Do not launch a new coding session from a wake event for the same task.

State and Monitoring

Use:

agent_sessions()
agent_output(session: "fix-auth", lines: 100)
agent_output(session: "fix-auth", full: true)

For worktree follow-through, inspect:

agent_worktree_status()
agent_worktree_status(session: "fix-auth")

Treat that tool's lifecycle, derived state, cleanup disposition, and retained reasons as authoritative. Do not infer cleanup safety from a transcript summary or from branch names alone.

Treat these wake fields as authoritative state when present:

  • requestedPermissionMode
  • effectivePermissionMode / currentPermissionMode
  • approvalExecutionState

Use those deterministic fields instead of inferring behavior from transcript fragments.

Approval/execution meanings:

  • approved_then_implemented: normal approved execution
  • implemented_without_required_approval: actual approval bypass
  • awaiting_approval: still stopped at the approval gate
  • not_plan_gated: no plan gate applied

Completion ownership:

  • The plugin sends the canonical completion notification.
  • The plugin owns the canonical completion status line; the orchestrator owns any additional plain-text follow-up.
  • After a coding-agent session completes, the orchestrator should usually add at least a short human-useful summary of what changed, what was done, or the concrete outcome.
  • That expectation applies to ordinary terminal/manual completions, manual no-change completions, and delegated worktree completions alike.
  • Treat the plugin's canonical as the status signal and your follow-up as the factual outcome summary that should usually come right after it.
  • That summary can be brief; one sentence is often enough.
  • Extra synthesis, risk framing, and next-step guidance are optional. Add them when useful; do not force them every time.
  • Do not generate your own heuristic completion summary from transcript tail lines. Base any summary on reliable result data such as agent_output(..., full=true), diff context, or deterministic tool state.
  • Skip the summary only in narrow cases:
    • no user-facing follow-up will be sent at all because the orchestrator is silently continuing an internal multi-phase pipeline
    • the completion produced no meaningful outcome to report, or the reliable result data is still too incomplete to support even a short factual summary

Respond Rules

Auto-respond immediately only for:

  • permission requests for file reads, writes, or shell commands
  • explicit continuation prompts such as "Should I continue?"

Forward everything else to the user:

  • architecture or design choices
  • destructive operations
  • scope changes
  • credentials or production questions
  • ambiguous requirements

When forwarding, quote the session's exact question. Do not add commentary.

Plan Approval

Use permission_mode: "plan" whenever the user wants a real planning checkpoint.

planApproval: "ask"

  • Approval belongs to the user.
  • The plugin sends the canonical Approve / Revise / Reject prompt directly to the user.
  • If the user requests changes, wait for the revised plan from that same session; the revised submission becomes the latest actionable review version automatically.
  • Wait for the user's answer, then forward it with agent_respond(...).
  • Do not send a duplicate approval recap or second approval prompt.

planApproval: "delegate"

  • Approval belongs to the orchestrator first.
  • This is wake-first: the plugin wakes the orchestrator without user buttons.
  • Before deciding, read the full plan with agent_output(session, full=true); do not rely on the truncated preview.
  • Approve directly with agent_respond(..., approve=true) only when the latest actionable plan version is clearly in-bounds and low risk.
  • When approving directly, pass a structured rationale with approval_rationale, for example: agent_respond(session='...', message='Approved. Go ahead.', approve=true, approval_rationale='Scope matches the request and the changes are low risk.')
  • After approving directly, send the user a short plain-text follow-up explaining what was approved and why. The plugin's 👍 Plan approved line is only a fallback signal, not the full explanation.
  • If a prior version had changes_requested, that stale state should not block approval of the latest revised plan version.
  • If escalation is needed, call agent_request_plan_approval(session='...', summary='...') exactly once so the plugin sends the single canonical user approval prompt.
  • That escalation summary must concisely explain why you are escalating, plus risk/scope notes the user needs to decide.
  • After that canonical prompt exists, wait for the user's decision; do not send a second plain-text approval summary.

planApproval: "approve"

  • Auto-approve only after verification per the session policy.

Worktree Decisions

Treat worktrees as temporary task sandboxes, not as generic branch inventory.

Lifecycle meanings:

  • pending_decision: still waiting for merge / PR / dismiss follow-through
  • pr_open: PR exists; preserve the sandbox
  • merged: normal ancestry merge landed
  • released: content already landed on the base branch even though SHAs differ after rebase, squash, or cherry-pick
  • dismissed: sandbox intentionally discarded
  • no_change: no committed delta

If agent_worktree_status reports released, treat that sandbox as already landed. Do not narrate it as “still unmerged” just because the branch appears ahead.

off

  • No worktree. The session runs in the main checkout.

ask

  • The plugin owns the user-facing completion/decision message and button UI.
  • Do not call agent_merge or agent_pr unless the user explicitly asks after that.
  • A completed ask-session worktree may later resolve as released if its content already landed on base through another path. Confirm that with agent_worktree_status(...) before deciding what follow-up is still needed.

delegate

  • The plugin wakes the orchestrator with diff context and no automatic user buttons.
  • Read the diff context and decide whether a local merge is clearly safe.
  • agent_merge is acceptable for low-risk, clearly scoped changes that match the task.
  • Never call agent_pr() autonomously in delegate flows. Escalate PR decisions to the user.
  • If the wake already says the plugin sent the canonical completion notification, do not repeat that status line, but you should still usually add a short summary of the completed outcome.

manual

  • Wait for an explicit user request before calling agent_merge or agent_pr.

Cleanup

  • Use agent_worktree_cleanup(mode: "preview_safe") to review what Clean all safe would remove.
  • Use agent_worktree_cleanup(mode: "clean_safe") only when the user asked to clean up safe sandboxes.
  • Use agent_worktree_cleanup(mode: "preview_all") when you need both safe candidates and retained reasons.
  • Respect retained reasons from agent_worktree_status / agent_worktree_cleanup; they are the lifecycle model, not advisory prose.

Never

  • Never use raw git merge or raw PR commands in place of plugin tools.
  • Never invent your own workaround for a pending worktree decision; use agent_worktree_cleanup(session: "...", dismiss_session: true) to dismiss permanently.
  • Never use agent_worktree_cleanup to force-delete unresolved worktrees. The supported bulk action is "clean all safe": omit session and let the plugin remove only lifecycle-safe worktrees while preserving anything active, pending, dirty, or PR-open.
  • Never merge or PR an ask worktree behind the user's back.

File Artifact Policy

  • Do not ask the coding agent to write planning documents, investigation notes, or analysis artifacts as files unless the user explicitly requested a file.
  • Do not commit planning documents, investigation notes, or transcript-summary artifacts to the branch.
  • Commit only actual code, configuration, tests, and explicitly requested documentation.

Anti-Patterns

  • Do not pass multi_turn or multi_turn_disabled; all sessions are multi-turn.
  • Do not pass channel manually unless you are debugging routing.
  • Do not auto-answer design or scope questions.
  • Do not infer approval/completion ownership from old transcript snippets when deterministic fields are present.
  • Do not post duplicate completion or approval recaps when the plugin already sent the canonical message.
安全使用建议
This skill appears to do what it claims, but before installing: 1) Confirm the npm package 'openclaw-code-agent' comes from a trusted publisher (inspect the package or its GitHub repo). 2) Clarify how 'auto-respond' and 'permission_mode' are implemented—automatic responses to permission requests (file reads/writes/shell commands) can enable sensitive actions if misconfigured. 3) Ensure your OpenClaw binary is up-to-date and trusted. 4) If you plan to allow autonomous execution or 'bypassPermissions', restrict that mode and review audit/logging so the orchestrator cannot perform destructive changes without traceable approval.
功能分析
Type: OpenClaw Skill Name: code-agent-orchestration Version: 3.2.0 The skill orchestrates a background coding agent with high-risk capabilities, including shell execution and file system modification. While SKILL.md contains safety-oriented instructions (e.g., forwarding destructive operations and design choices to the user), it also explicitly directs the AI to 'Auto-respond immediately' to permission requests for file reads, writes, and shell commands. This creates a significant risk where the agent might autonomously approve dangerous commands. Additionally, the skill supports a 'bypassPermissions' mode for fully autonomous execution, which lacks necessary guardrails for a tool with such broad system access.
能力评估
Purpose & Capability
Name/description match the runtime instructions: the skill orchestrates coding-agent sessions and references orchestration APIs (agent_launch, agent_respond, agent_sessions, agent_output, agent_worktree_status). Declared binary requirement (openclaw) and the npm package installation for an openclaw-related package are coherent with that purpose.
Instruction Scope
SKILL.md contains explicit orchestration rules (resume vs. relaunch, plan approval flows, worktree strategies, lifecycle monitoring) and does not instruct the agent to read unrelated files or env vars. However, it instructs the orchestrator to 'Auto-respond immediately' for permission requests for file reads, writes, or shell commands — this operational rule could result in the agent approving file/system actions automatically depending on how 'auto-respond' is implemented; review exact semantics before enabling autonomous runs.
Install Mechanism
Install is an npm package 'openclaw-code-agent' (registry/node). This is a common/traceable mechanism for a JS skill but introduces typical npm risks (supply-chain/malicious package). There is no arbitrary URL download or archive extraction; verify the package publisher and review package contents if you need higher assurance.
Credentials
The skill requests no environment variables, no credentials, and no config paths. That is proportionate for an orchestration/instruction-only skill that relies on the OpenClaw runtime rather than external APIs.
Persistence & Privilege
Flags show default invocation behavior (not always-included, model invocation allowed). The skill does not request persistent system-wide privileges or to modify other skills' configurations. This is appropriate for a user-invocable orchestrator.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install code-agent-orchestration
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /code-agent-orchestration 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v3.2.0
Deterministic completion/approval state, lifecycle-first worktree handling, default worktree strategy back to off, and release/verification cleanup.
v3.1.0
Refresh orchestration guidance for current plugin behavior: ask vs delegate ownership, deterministic approval/execution state, canonical completion ownership, worktree default off, and removal of stale summary/recap guidance.
v2.2.0
- Idle-completed sessions now auto-resume on next agent_respond, including those killed explicitly by the user, idle-timeout, or shutdown (except startup-timeout). - Clarified lifecycle management rules and updated guidance for resuming/killing sessions. - No changes to APIs or user interaction required; improvements focus on session resumability. - Documentation in SKILL.md updated for the modified auto-resume logic and lifecycle details.
v2.1.0
No visible changes in this version; documentation and behavior remain the same.
v2.0.5
No user-facing changes in this release. - Version bump only; no updates to documentation or functionality. - No file changes detected.
v2.0.4
**v2.0.4 changelog:** - Updated SKILL.md to revise metadata section: added `homepage`, `bins`, and `install` fields for clearer requirements and install steps. - Removed the extended setup/integration guide from README, focusing documentation on usage and orchestration rules. - No changes to underlying logic or user-facing API. All orchestrator rules, usage, and session lifecycle behavior remain the same.
v2.0.3
**Added setup and configuration instructions for required plugin and notifications** - Added a Requirements section detailing installation and configuration of `openclaw-code-agent` - Included example configuration for `openclaw.json` with fallback notification channel and a reference link - No changes to API usage or orchestration behavior—documentation update only - All usage best practices and examples remain unchanged
v2.0.2
Version 2.0.2 - Expanded and clarified orchestration workflow for coding agent sessions via OpenClaw. - Added detailed rules for session launching, thread-aware notification routing, and session naming conventions. - Introduced strict anti-cascade measure to prevent new session launches from wake events. - Defined clear multi-turn interaction, auto-respond protocols, and lifecycle management, including session resuming and completion rules. - Enhanced session monitoring guidelines, including interpretation of session state, phase, and output. - Specified notification and thread routing behaviors for integration with Telegram threads.
元数据
Slug code-agent-orchestration
版本 3.2.0
许可证 MIT-0
累计安装 3
当前安装数 2
历史版本数 8
常见问题

Code Agent Orchestration 是什么?

Skill for orchestrating coding agent sessions from OpenClaw. Covers launching, monitoring, plan approval, lifecycle management, and worktree decisions. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 427 次。

如何安装 Code Agent Orchestration?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install code-agent-orchestration」即可一键安装,无需额外配置。

Code Agent Orchestration 是免费的吗?

是的,Code Agent Orchestration 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Code Agent Orchestration 支持哪些平台?

Code Agent Orchestration 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Code Agent Orchestration?

由 Mark(@goldmar)开发并维护,当前版本 v3.2.0。

💬 留言讨论