add-openclaw-agent
/install add-openclaw-agent
Add OpenClaw Agent
Create a new isolated OpenClaw agent and configure it (identity + role + task) in its workspace.
When this skill applies
- User asks to create a new agent (by name).
- User wants to give that agent an identity (display name, emoji, theme, avatar) or a task/purpose (persona, rules, scope).
Workflow (recommended)
0. Ask what the new agent is for (required)
- Ask the user what they want the new agent to do.
- Ask for any constraints that affect identity and rules (language, tone, safety boundaries, sources allowed, output format, etc.).
Then pick an agent-name based on the purpose. Prefer short, stable ids like:
beauty,coding,support,ops,research,personal
Notes:
- OpenClaw normalizes names to an agent id (lowercase; invalid characters collapse to
-). The id cannot bemain(reserved). - Use the normalized id in the workspace directory:
~/.openclaw/workspace-\x3Cagent-id>.
1. Create the agent with exec (non-interactive, JSON)
Use the exec tool to run the OpenClaw CLI. Non-interactive creation requires --workspace and --non-interactive.
Before creating, check whether it already exists:
openclaw agents list --json
Before running creation, explicitly ask for confirmation, for example:
I am ready to run: openclaw agents add \x3Cagent-name> --workspace ~/.openclaw/workspace-\x3Cagent-id> --non-interactive --json. Run it now?
Only execute the command after the user confirms.
Create the agent:
openclaw agents add \x3Cagent-name> --workspace ~/.openclaw/workspace-\x3Cagent-id> --non-interactive --json
Optional flags you can add when needed:
--model \x3Cid>– default model for this agent.--agent-dir \x3Cdir>– agent state dir (default:~/.openclaw/agents/\x3Cid>/agent).--bind \x3Cchannel[:accountId]>– route a channel to this agent (repeatable).
2. Configure identity by editing IDENTITY.md (then sync)
Edit the new workspace file:
~/.openclaw/workspace-\x3Cagent-id>/IDENTITY.md
The top section is a template with identity key-value lines (examples):
name: My Agentemoji: 🦞theme: short themeavatar: path/or/url
Supported keys: name, emoji, theme, creature, vibe, avatar.
Hard rule (IDENTITY.md):
- Only edit the identity field lines (the
- **Name:** ...style lines / key-value fields). - Do not rewrite, delete, or reorder any other template text above the separator.
- Any additional identity/role description must be appended after the
---separator. - If the file does not contain
---, add a blank line and then a---line at the end, and append your description after it. - Tool priority for file changes: prefer
editfor targeted append/update; usewriteonly wheneditcannot be applied reliably (for example file missing or malformed beyond safe patching).
Short example (append style):
... (keep/update existing identity fields)
---
我负责:根据肤质/预算/场景给出 2-3 个可选方案,并说明优缺点与使用顺序。
After editing, sync to config via exec:
openclaw agents set-identity --workspace ~/.openclaw/workspace-\x3Cagent-id> --from-identity --json
3. Configure role + task + operating rules in AGENTS.md
Edit the new workspace file:
~/.openclaw/workspace-\x3Cagent-id>/AGENTS.md
Put task definition and operating rules here (how to work), based on what the user told you in step 0. Examples of good content:
- What this agent is responsible for (scope)
- What it must not do (red lines)
- The question-asking checklist before acting
- Output format expectations (bullets, structure, brevity)
- Tooling rules (when to use exec; avoid destructive commands unless asked)
Hard rule (AGENTS.md):
- Do not rewrite, delete, or reorder the default template content.
- Add all custom “role/task/rules” content only by appending after the
---separator. - If the file has no
---, add a blank line +---near the end, then append your custom section after it. - Tool priority for file changes: prefer
editfor targeted append/update; usewriteonly wheneditcannot be applied reliably (for example file missing or malformed beyond safe patching).
Short example (append style):
... (keep default template unchanged)
---
## 美妆助手工作规范
- 先问:肤质/预算/诉求/过敏史
- 再给:2-3 个方案 + 优缺点 + 价格区间
- 禁止:假装亲测;推荐三无/杂牌
If you also want a stable persona/tone/boundary file, place that in SOUL.md too, but keep the core “how to operate” rules in AGENTS.md.
End-to-end flow (summary)
- Ask what the new agent is for (purpose + constraints).
- Choose
\x3Cagent-name>(short, stable; will normalize to\x3Cagent-id>). openclaw agents add \x3Cagent-name> --workspace ~/.openclaw/workspace-\x3Cagent-id> --non-interactive --json- Edit
~/.openclaw/workspace-\x3Cagent-id>/IDENTITY.md openclaw agents set-identity --workspace ~/.openclaw/workspace-\x3Cagent-id> --from-identity --json- Edit
~/.openclaw/workspace-\x3Cagent-id>/AGENTS.mdwith the role/task/rules.
References
- Multi-agent routing and paths: Multi-Agent Routing, Agent workspace.
- CLI:
openclaw agents add,openclaw agents set-identity,openclaw agents bindin agents CLI.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install add-openclaw-agent - 安装完成后,直接呼叫该 Skill 的名称或使用
/add-openclaw-agent触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
add-openclaw-agent 是什么?
Create a new OpenClaw agent via exec (openclaw agents add) and configure its identity + operating rules by editing the new workspace files (IDENTITY.md, AGEN... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 222 次。
如何安装 add-openclaw-agent?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install add-openclaw-agent」即可一键安装,无需额外配置。
add-openclaw-agent 是免费的吗?
是的,add-openclaw-agent 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
add-openclaw-agent 支持哪些平台?
add-openclaw-agent 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 add-openclaw-agent?
由 xiguazhiPrince(@xiguazhiprince)开发并维护,当前版本 v1.0.0。