Create and wire a new OpenClaw agent with a fixed workflow. Use when the user asks to create/add a new OpenClaw agent or says “我要创建一个新的 Agent”, automate mult...
编程
Agent + Feishu Onboarding
试用Create OpenClaw agents and onboard Feishu routing with explicit multi-step confirmations. Use when the user needs to (1) define a new agent role and workspac...
它能做什么
Create OpenClaw agents and onboard Feishu routing with explicit multi-step confirmations. Use when the user needs to (1) define a new agent role and workspac...
技能文档
OpenClaw Agent Feishu Onboarding
Standardize creation of new OpenClaw agents and Feishu route binding. Use this skill for operational execution with strict confirmations.
Runtime Prerequisites
- Required binaries:
openclaw(CLI available in PATH)python(3.x, used byscripts/validate_feishu_bindings.py)
- Preflight checks:
openclaw --versionpython --version
- Data access behavior:
- Reads local OpenClaw config (
openclaw.json/OPENCLAW_CONFIG_PATH) - May write local agent and routing state (
agents.list[],bindings[]) - Do not run on machines where local config access is not permitted
- Reads local OpenClaw config (
Core Scope
- Create a new agent (
agents.list+ workspace + identity). - Confirm Feishu route target fields before any write.
- Bind routing using
bindings.matchwithchannel/accountId/peer. - Verify final route and provide rollback steps.
Required Inputs
- Agent intent:
- Agent purpose and responsibility boundary.
- Explicit out-of-scope items.
- Agent spec:
agentId(lowercase, digits, hyphen).workspacepath.modelid.- Identity object in
agents.list[]:- use
identityobject (for exampleidentity.name,identity.emoji,identity.theme) - do not rely on top-level
nameonly
- use
- Feishu route spec:
match.channel:feishumatch.accountId: for examplemainmatch.peer.kind:group(ordmwhen needed)match.peer.id: Feishu session id (group id likeoc_xxxor dm id)
Hard Validation Gates (Must Pass)
agents.list[]entry for new agent must includeidentityobject.identity.namemust be set for human-readable routing/debug checks.match.accountIdmust be one ofchannels.feishu.accountskeys (for examplemain).- Never put Feishu group/session id (
oc_xxx) intomatch.accountId. - Group routing must include
match.peer = { kind: "group", id: "oc_xxx" }. - If routing is for a specific group but
match.peeris missing, abort and correct config before continuing. - Before write, print the final binding object and require explicit confirmation.
Multi-Step Confirmation Protocol
Do not skip confirmations. Ask and confirm in this exact order.
- Confirmation A: Agent Goal
- Confirm what this agent should do.
- Confirm what this agent must not do.
- Confirmation B: Agent Configuration
- Confirm
agentId,workspace, model, identity fields. - Confirm naming conventions and collision check (
agentIduniqueness).
- Confirm
- Confirmation C: Feishu Routing Target
- Confirm
accountId. - Confirm
peer.kind. - Confirm
peer.id(explicitly state this is the Feishu session id). - Confirm whether this is a precise peer binding or account-level fallback.
- Confirm
- Confirmation D: Execution Approval
- Summarize all fields in one compact block.
- Ask for final go/no-go before writing config.
Execution Workflow
- Discover current state:
openclaw agents listopenclaw config get agents.list --jsonopenclaw config get channels.feishu.accounts --jsonopenclaw directory groups list --channel feishu --account --query "" --jsonopenclaw config get bindings --json
- Create agent:
openclaw agents add ...- Optional:
openclaw agents set-identity ...
- Apply routing:
- Use
openclaw agents bindfor account-scoped binding when needed. - Ensure peer-precise rule exists in top-level
bindings[]withmatch.peer.
- Use
- Validate:
python -X utf8 ./scripts/validate_feishu_bindings.py --configopenclaw config validate --json- ensure target
agents.list[]entry hasidentity.name - Check
bindings[]entry content and ordering. - Ensure every group-targeted rule has
match.peer.kind = "group"andmatch.peer.id = "oc_xxx".
- Reload/restart gateway if required by deployment policy.
Routing Rules
peerrule is the precise route key for a specific Feishu conversation.- Use
match.peer.idto bind a specific session (groupoc_xxx). - If both peer-level and account-level bindings exist, keep peer rule first.
- Avoid broad fallback rules until peer-specific routes are confirmed.
- Wrong example (forbidden):
match.accountId: "oc_xxx"withoutmatch.peer.
Agent list entry should follow this shape:
{
"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:
{
"agentId": "",
"match": {
"channel": "feishu",
"accountId": "main",
"peer": {
"kind": "group",
"id": "oc_xxx"
}
}
}
Safety and Rollback
- Never delete agents unless explicitly requested.
- Before changing
bindings, capture currentbindingssnapshot. - If wrong route is applied, revert to previous binding set and re-validate.
- Prefer reversible, explicit changes and post-change verification.
Why It Still Routes to main
- Binding did not match the real incoming
peer.id(most common). bindings[]was written but gateway runtime did not reload the latest config.match.accountIdmismatched current Feishu account key.- Target agent exists but
agents.list[]entry is malformed (missing required fields such asidentityobject expected by your convention). - Message arrived in a different conversation than the configured group.
References
- Command examples and rollback snippets: commands.md
- Chinese runbook and confirmation checklist: usage-zh.md
- Auto-check script: validate_feishu_bindings.py
相关技能
Configure OpenClaw multi-agent routing for Feishu multi-account setups. Use when users need two or more Feishu bots (different appId/appSecret) to run on iso...
Create and wire a new OpenClaw agent with a fixed workflow. Use when the user asks to create/add a new OpenClaw agent or says “我要创建一个新的 Agent”, automate mult...
Use when configuring OpenClaw chat channels to send an immediate acknowledgement before the main reply starts. Supports Feishu and DingTalk, includes bilingu...
Use when installing or configuring OpenClaw with DingTalk, Feishu, Discord, and additional channels with Bailian/DashScope models on Linux hosts. Use when pr...
Orchestrate OpenClaw end-to-end R&D delivery in Feishu from requirement intake to closure using PM, developer, reviewer, and tester subagents. Use when handl...