openclaw-command-pilot-plugin compiles rough ideas into an executable blueprint and a clean OpenClaw execution packet.
Current packaging direction: ship the behavior contract first via a public
OpenClaw Pilotskill shell, then add heavier plugin/distribution layers only where they add real value.
Validated against OpenClaw 2026.3.31.
This project has been checked for deprecated root imports. There are no openclaw/plugin-sdk root imports; all SDK imports use the supported subpath form:
openclaw/plugin-sdk/core
api.registerCommand(...)for/pilotapi.on("before_prompt_build", ...)for standing-order injectionapi.runtime.subagent.getSessionMessages(...)for recent session contextapi.runtime.subagent.run(...)andwaitForRun(...)for execution handoffapi.runtime.agent.runEmbeddedPiAgent(...)for structured professionalization
There are two approval layers:
- Command Pilot preflight approval:
/pilot confirm <id>or/pilot cancel <id> - Official OpenClaw exec approval after handoff:
/approve <id> allow-once|allow-always|deny
Current OpenClaw 2026.3.31 exposes official /approve for exec approvals through approvals.exec. It does not expose a generic plugin-level approvals.plugin surface for arbitrary native plugin command gates. This plugin therefore keeps a narrow preflight approval for its own risk gate, while remaining compatible with official /approve if downstream execution triggers exec approval.
{
plugins: {
entries: {
"command-pilot": {
enabled: true,
hooks: {
allowPromptInjection: true
},
config: {
defaultMode: "preview",
recentTurns: 8,
maxHistoryMessages: 12,
allowAutoRunUpTo: "low"
}
}
}
},
approvals: {
exec: {
enabled: true,
mode: "session"
}
}
}Notes:
plugins.entries.command-pilot.enabledis required.plugins.entries.command-pilot.hooks.allowPromptInjectionis recommended. Iffalse,/pilotstill works, but standing-order injection viabefore_prompt_buildis skipped.approvals.execis the real current OpenClaw approval-forwarding config.approvals.pluginis not a current host key in2026.3.31.
cd /Users/jiahuiwu/Desktop/指令优化/openclaw-command-pilot-plugin
pnpm install
pnpm test
pnpm build
openclaw plugins install -l /Users/jiahuiwu/Desktop/指令优化/openclaw-command-pilot-plugin
openclaw gateway restart- WebUI Chat:
/pilot 把 OCAX 首页和 roles 页统一成 linear 风格,先审计再改,不要动后端 - Telegram:
/pilot 把 OCAX 首页和 roles 页统一成 linear 风格,先审计再改,不要动后端
Expected:
- command triggers successfully
- recent session context is reflected in the brief when available
- low-risk requests show a preview and can hand off
- higher-risk requests stop at the preflight approval gate
- if downstream OpenClaw exec approval is triggered, official
/approveremains the resolver
Note: the public
OpenClaw Pilotskill shell is the recommended first release artifact. The native plugin in this repo is the implementation base, not a claim that ClawHub users will automatically get the full plugin install/runtime flow from the skill alone.
/pilot Build a lightweight OpenClaw workflow that turns vague ideas into execution-ready packets, but keep the first release minimal and scope-controlled.
Expected reply shape:
- a first message with real user value
- project-style requests: a human-readable blueprint
- content/marketing/script-style requests: a ready-to-use deliverable first
- a separate pure
[OPENCLAW_EXECUTION_PACKET v1] ... [END_OPENCLAW_EXECUTION_PACKET]message
That two-message behavior is the main publishable contract for the public beta skill shell.
- Before: rough idea mixed with assumptions and hidden scope drift, or content requests getting forced into empty blueprint shells
- After: either a scoped blueprint or a ready-to-use content deliverable first, plus a packet-only handoff message and
/pilot next <pilot_id> ...continuation path