创建OpenClaw代理并配置飞书路由,包含明确的多步确认流程。适用于用户需要(1)定义新的代理角色和工作空间、(2)设置飞书消息路由、(3)配置多步骤确认工作流的场景。
Standardize creation of new OpenClaw agents and Feishu route binding. Use this skill for operational execution with strict confirmations.
openclaw (CLI available in PATH)python (3.x, used by scripts/validate_feishu_bindings.py)openclaw --versionpython --versionopenclaw.json / OPENCLAW_CONFIG_PATH)agents.list[], bindings[])agents.list + workspace + identity).bindings.match with channel/accountId/peer.agentId (lowercase, digits, hyphen).
workspace path.
model id.
Identity object in agents.list[]:
identity object (for example identity.name, identity.emoji, identity.theme)name onlymatch.channel: feishumatch.accountId: for example mainmatch.peer.kind: group (or dm when needed)match.peer.id: Feishu session id (group id like oc_xxx or dm id)agents.list[] entry for new agent must include identity object.identity.name must be set for human-readable routing/debug checks.match.accountId must be one of channels.feishu.accounts keys (for example main).oc_xxx) into match.accountId.match.peer = { kind: "group", id: "oc_xxx" }.match.peer is missing, abort and correct config before continuing.Do not skip confirmations. Ask and confirm in this exact order.
agentId, workspace, model, identity fields.agentId uniqueness).accountId.peer.kind.peer.id (explicitly state this is the Feishu session id).openclaw agents listopenclaw config get agents.list --jsonopenclaw config get channels.feishu.accounts --jsonopenclaw directory groups list --channel feishu --account <account-id> --query "<keyword>" --jsonopenclaw config get bindings --jsonopenclaw agents add ...openclaw agents set-identity ...openclaw agents bind for account-scoped binding when needed.bindings[] with match.peer.python -X utf8 ./scripts/validate_feishu_bindings.py --config <openclaw.json-path>openclaw config validate --jsonagents.list[] entry has identity.namebindings[] entry content and ordering.match.peer.kind = "group" and match.peer.id = "oc_xxx".peer rule is the precise route key for a specific Feishu conversation.match.peer.id to bind a specific session (group oc_xxx).match.accountId: "oc_xxx" without match.peer.Agent list entry should follow this shape:
json
{
"id": "data-analyst",
"workspace": "C:\\Users\\Administrator\\.openclaw\\workspace-dataAnalysis",
"agentDir": "C:\\Users\\Administrator\\.openclaw\\agents\\data-analyst\\agent",
"identity": {
"name": "data-analyst"
}
}
Canonical peer binding object:
json
{
"agentId": "<agent-id>",
"match": {
"channel": "feishu",
"accountId": "main",
"peer": {
"kind": "group",
"id": "oc_xxx"
}
}
}
bindings, capture current bindings snapshot.main#peer.id (most common).bindings[] was written but gateway runtime did not reload the latest config.match.accountId mismatched current Feishu account key.agents.list[] entry is malformed (missing required fields such as identity object expected by your convention).