← Back to Skills Marketplace
dao24dao

create-agent

by dao24dao · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
341
Downloads
1
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install create-agent-arch
Description
完整创建一个 OpenClaw Agent,包括:一次性问卷收集配置信息、自动生成 workspace 文件(SOUL.md/AGENTS.md/IDENTITY.md/USER.md/MEMORY.md/HEARTBEAT.md)、 执行 `openclaw agents add` CLI 注册、内置 capa...
README (SKILL.md)

Create Agent Skill

这个 skill 的职责是:从零到一完整创建并注册一个具备自我进化能力的 OpenClaw Agent

核心流程分为 5 个阶段,依次执行,不要跳步。


Phase 1 — 一次性问卷

在执行任何操作前,先一次性向用户呈现以下问卷,要求用户填写后统一返回。 从对话上下文中提取已知信息,不要重复问已经明确的字段。

请填写以下信息来创建你的 Agent(有默认值的可以留空):

必填:
  Agent ID(唯一标识,如 work / research / assistant):
  Agent 名称(展示名,如 "Aria"、"Max"):
  性格/主题(如 "sharp analyst"、"friendly assistant"、"严谨的运营助手"):

选填(留空将使用默认值):
  Emoji(默认 🤖):
  你的名字/昵称(Agent 对你的称呼):
  你的职业或使用场景(帮助 Agent 更好地理解你的需求):
  Workspace 路径(默认 ~/.openclaw/workspace-\x3Cid>):
  绑定的频道(如 telegram / discord / whatsapp,可跳过,后续单独确认参数):
  Heartbeat 周期(默认 30m,即每 30 分钟自检一次):

收到回复后,进入 Phase 1.5。


Phase 1.5 — ID 冲突检查

在生成任何文件之前,先执行以下命令检查 Agent ID 是否已被占用:

openclaw agents list
  • 如果输出中已存在相同 ID,停止流程,告知用户:

    ⚠️ Agent ID "\x3CAGENT_ID>" 已存在,请重新选择一个唯一的 ID。
    当前已有的 Agent:\x3C列出 agents list 的结果>
    

    等待用户提供新的 ID,重新执行本阶段检查,直到 ID 不冲突为止。

  • 如果 ID 不冲突,进入 Phase 1.8。


Phase 1.8 — 频道参数确认

仅当用户在 Phase 1 填写了频道时执行此阶段,填写了「跳过」则直接进入 Phase 2。

先读取 references/channel-params.md 获取各频道的参数模板,然后按以下步骤执行。

Step 1:检测当前对话所在频道

openclaw channels list --json

从输出中识别当前对话所在的频道类型(如 telegram、discord、feishu 等)和 accountId。

Step 2:识别用户填写的频道类型

references/channel-params.md 找到对应频道的参数模板:

  • 找到 → 继续 Step 3
  • 未找到(不在列表中)→ 告知用户该频道暂无内置模板,引导其参考官方文档提供参数

Step 3:与当前频道对比,分两种情况处理

情况 A — 用户填写的频道与当前对话频道一致:

⚠️ 你填写的频道「\x3CCHANNEL>」与当前对话所在频道相同。请确认绑定方式:

  A. 绑定到当前机器人应用(当前 Account: \x3C当前 accountId>)
  B. 绑定到该频道的另一个机器人应用(需提供新的应用凭证)
  C. 跳过频道绑定(稍后手动配置)
  • 选 A:直接使用当前 accountId,跳到 Step 5
  • 选 B:继续 Step 4(展示该频道的参数问卷)
  • 选 C:标记 BIND_SKIP=true,进入 Phase 2

情况 B — 用户填写的频道与当前对话频道不一致:

直接进入 Step 4。

Step 4:展示该频道的动态参数问卷

根据 references/channel-params.md 中对应频道的「用户需提供的参数」, 动态生成问卷展示给用户:

📋 请提供「\x3CCHANNEL>」频道的配置参数:

  \x3C参数1名称>(\x3C说明>):___________
  \x3C参数2名称>(\x3C说明>):___________
  ...
  Account ID(此账号的别名,默认 default):___________(可留空)

  \x3C如该频道需要特殊前置操作,在此提示,如飞书需先安装插件>

等待用户填写完成后,继续 Step 5。

Step 5:记录最终绑定参数

将以下信息记录供 Phase 3 使用:

BIND_CHANNEL = \x3Cchannel>
BIND_ACCOUNT_ID = \x3CaccountId>
BIND_PARAMS = { \x3C参数键值对,按该频道的 channels add 命令格式组织> }
BIND_SKIP = true / false
BIND_NEEDS_PLUGIN = true / false   # 飞书、LINE、Zalo 等需要先装插件
BIND_NEEDS_QR = true / false       # WhatsApp 等需要 QR 扫码

进入 Phase 2。


Phase 2 — 生成 Workspace 文件

根据用户填写的信息,调用 scripts/generate-workspace.sh 生成 workspace 目录和所有文件。

读取 references/workspace-templates.md 了解每个文件的模板结构,然后用用户提供的信息填充变量。

bash scripts/generate-workspace.sh \
  --id "\x3CAGENT_ID>" \
  --name "\x3CAGENT_NAME>" \
  --emoji "\x3CEMOJI>" \
  --theme "\x3CTHEME>" \
  --user-name "\x3CUSER_NAME>" \
  --user-context "\x3CUSER_CONTEXT>" \
  --workspace "\x3CWORKSPACE_PATH>"

脚本会生成以下文件(详见 references/workspace-templates.md):

文件 作用
IDENTITY.md Agent 身份:名称、emoji、主题、自我认知
SOUL.md 核心价值观、行为哲学、沟通风格
AGENTS.md 操作规程、记忆读取顺序、安全边界、进化规则
USER.md 用户画像:名字、偏好、沟通风格
HEARTBEAT.md 周期自检清单,含进化触发逻辑
MEMORY.md 长期记忆,初始化为空结构
TOOLS.md 工具能力说明,初始化为默认模板
.learnings/LEARNINGS.md 学习日志,供 self-improving-agent 使用
.learnings/ERRORS.md 错误日志

Phase 3 — 执行 CLI 注册

生成文件后,依次执行以下命令:

# 1. 注册 Agent
openclaw agents add \x3CAGENT_ID> --workspace \x3CWORKSPACE_PATH>

# 2. 应用 Identity(从 IDENTITY.md 读取)
openclaw agents set-identity --agent \x3CAGENT_ID> --from-identity

# 3. 绑定频道(使用 Phase 1.8 确认的参数,BIND_SKIP=true 则跳过)
if [ "$BIND_SKIP" != "true" ]; then

  # 3a. 如需先安装插件(飞书、LINE、Zalo 等)
  if [ "$BIND_NEEDS_PLUGIN" = "true" ]; then
    openclaw plugin add \x3CBIND_CHANNEL>
  fi

  # 3b. 添加频道账号(使用 channel-params.md 中对应频道的 channels add 命令格式)
  openclaw channels add --channel \x3CBIND_CHANNEL> --account \x3CBIND_ACCOUNT_ID> \x3CBIND_PARAMS>

  # 3c. 绑定 Agent 路由
  openclaw agents bind --agent \x3CAGENT_ID> --bind \x3CBIND_CHANNEL>:\x3CBIND_ACCOUNT_ID>

  # 3d. 如需 QR 扫码配对(WhatsApp 等),提示用户手动完成
  if [ "$BIND_NEEDS_QR" = "true" ]; then
    echo "⚠️  请运行以下命令扫描 QR 码完成配对:"
    echo "   openclaw channels login --channel \x3CBIND_CHANNEL> --account \x3CBIND_ACCOUNT_ID>"
  fi
fi

# 4. 确认注册成功
openclaw agents list

如果任一命令失败,向用户报告具体错误,不要静默跳过。


Phase 4 — 安装进化 Skills

两个 skill 的分工与闭环

这两个 skill 不是替代关系,而是上下游关系,缺一不可:

skill 角色 写入位置 读取位置
self-improving-agent 观察者/记录员 .learnings/ERRORS.md\x3Cbr>.learnings/LEARNINGS.md\x3Cbr>memory/YYYY-MM-DD.md 每次 session 的对话内容
capability-evolver 执行引擎 SOUL.mdTOOLS.md 等(需批准)\x3Cbr>assets/gep/events.jsonl memory/YYYY-MM-DD.md\x3Cbr>.learnings/ERRORS.md\x3Cbr>.learnings/LEARNINGS.md

闭环链路:

每次对话
  └→ self-improving-agent 写入 memory/YYYY-MM-DD.md + .learnings/
       └→ heartbeat 触发 capability-evolver 扫描上述两个信号源
            └→ 生成进化提案 → 发给用户批准 → 应用变更

⚠️ 关键:memory/YYYY-MM-DD.md 是两者的衔接点。 Agent 必须在每次 session 结束时按 AGENTS.md 规定的格式写入该文件, capability-evolver 才能读到有效信号。如果 memory/ 为空,进化不会触发。

安装命令

在 workspace 目录下执行:

# 安装 self-improving-agent(信号收集层)
npx playbooks add skill openclaw/skills --skill self-improving-agent

# 安装 capability-evolver(进化执行层)
npx playbooks add skill openclaw/skills --skill capability-evolver

capability-evolver 已在 .env 中配置为 --review 模式(变更需用户批准),无需额外操作。


Phase 5 — 输出用户操作清单

执行完所有步骤后,向用户发送以下清单(用实际值替换占位符):

✅ Agent "\x3CAGENT_NAME>"(ID: \x3CAGENT_ID>)已创建完毕!

━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 接下来你需要完成的操作:
━━━━━━━━━━━━━━━━━━━━━━━━━━

【必做】
1. 初始化 Git 版本控制(capability-evolver 依赖 git 进行回滚):
   cd \x3CWORKSPACE_PATH>
   git init
   git add .
   git commit -m "init: \x3CAGENT_NAME> agent workspace"

【推荐】
2. 备份到私有仓库(保护你的 Agent 记忆和个性):
   git remote add origin \x3CYOUR_PRIVATE_REPO_URL>
   git push -u origin main

3. 启动第一次对话,完成 bootstrap:
   在你的频道中发送给 Agent:
   "Hey, let's get you set up. Read your IDENTITY.md and tell me who you are."

【如需绑定频道(如果刚才跳过了)】
4. openclaw agents bind --agent \x3CAGENT_ID> --bind \x3Cchannel:account>

【进化管理】
5. Agent 会按照 \x3CHEARTBEAT_INTERVAL> 的频率自检并记录学习日志。
   当 capability-evolver 检测到需要进化时,会向你发送变更请求,
   你批准后(node index.js --review)变更才会应用。

   如需立即触发一次进化分析:
   cd \x3CWORKSPACE_PATH>
   node index.js --review

【可选:加入 EvoMap 进化网络】
6. npx playbooks add skill openclaw/skills --skill evomap-gepa2a
   (让你的 Agent 参与跨 Agent 的进化资产共享网络)

━━━━━━━━━━━━━━━━━━━━━━━━━━
📁 Workspace 位置:\x3CWORKSPACE_PATH>
🔁 进化模式:capability-evolver --review(变更需你批准)
━━━━━━━━━━━━━━━━━━━━━━━━━━

错误处理

  • openclaw agents add 失败:检查 workspace 路径是否存在,检查 ID 是否已被占用(openclaw agents list
  • npx playbooks 失败:提示用户确认 Node.js 已安装(node --version),以及网络连通性
  • workspace 路径已存在:提示用户是否覆盖,不要直接覆盖
  • 用户跳过必填字段:不进行下一步,明确提示哪些字段是必须的

相关参考

  • references/workspace-templates.md — 所有 workspace 文件的完整模板(Phase 2 必读)
  • scripts/generate-workspace.sh — workspace 生成脚本(Phase 2 调用)
  • OpenClaw 文档:https://docs.openclaw.ai/cli/agents
Usage Guidance
Before installing or running this skill, confirm the following: - Required tooling: ensure you have the openclaw CLI and Node (with npx) installed. The skill's instructions call openclaw and npx but the package metadata does not declare these dependencies. - Sensitive credentials: the flow will ask you to provide channel credentials (bot tokens, app secrets, service-account JSON, etc.). Only provide secrets you trust to be stored/used by your local OpenClaw instance; verify how OpenClaw persists and protects those credentials. - Network installs: the skill instructs using 'npx playbooks add skill ...' which will fetch code from the network. Review the source and contents of the skills being installed (self-improving-agent, capability-evolver) before approving them. - Workspace writes and overwrites: the bundled script will create and may overwrite files under the workspace path (default $HOME/.openclaw/workspace-<id>); back up any existing data and note the script will prompt before destructive actions. - Self-evolution implications: capability-evolver and self-improving-agent are intended to read/write memory and .learnings and can propose automated changes. The configuration here sets review mode, but you should verify that automatic application of changes is disabled and that you have an audit/rollback plan (e.g., initialize git as recommended). If any of the above points are unacceptable or unclear, ask the publisher for clarification (declare required binaries, where credentials are stored, and exact sources for npx-installed skills) before proceeding.
Capability Analysis
Type: OpenClaw Skill Name: create-agent-arch Version: 1.0.1 The skill bundle automates the end-to-end creation and registration of OpenClaw agents, including workspace generation and communication channel configuration. It is classified as suspicious due to a shell injection vulnerability in SKILL.md, where user-provided inputs (such as Agent ID, Name, and channel parameters) are passed directly into shell commands and the scripts/generate-workspace.sh script without sanitization. Additionally, the skill performs high-privilege actions such as installing external code via 'npx playbooks' and setting up a self-evolution loop (capability-evolver) that can modify the agent's core identity and behavioral logic, which significantly expands the attack surface if the agent is exposed to malicious prompts.
Capability Assessment
Purpose & Capability
The SKILL.md instructs the agent/operator to run many openclaw CLI commands (openclaw agents list/add/set-identity/channels, openclaw plugin add, openclaw channels login, openclaw message) and to use npx to install other skills. The registry metadata declares no required binaries or primary credentials. This is a mismatch: the skill will not work without the openclaw CLI and node/npx being available, but those are not declared. While these tools are reasonable for an 'create agent' skill, the omission is an incoherence that could confuse less technical users.
Instruction Scope
The instructions are largely scoped to agent creation: collect answers, generate workspace files, register the agent with the openclaw CLI, and optionally bind channels. The flow intentionally asks for channel tokens/credentials from the user and to record them for openclaw channel setup. This is expected for channel binding, but it means the skill will prompt the user to provide many sensitive secrets (Bot tokens, app secrets, service-account JSON paths). The skill also instructs installing two skills (self-improving-agent and capability-evolver) that will read/write memory/.learnings — again consistent with the stated goal but raising data-handling implications.
Install Mechanism
There is no install spec in the package (instruction-only), and the shipped script only writes workspace files (no network downloads). However the runtime instructions tell the user/agent to run 'npx playbooks add skill openclaw/skills --skill ...' which will fetch packages from the network via npm. The skill does not declare or validate the presence of node/npx, nor does it declare any trusted source for those playbooks. Network installs invoked at runtime are higher risk and should be made explicit.
Credentials
The registry declares no required environment variables, and the package itself does not embed secrets. That said, the workflow collects and uses many external credentials (channel tokens, app secrets, service-account JSON paths) from the user and feeds them into 'openclaw channels add' or plugin commands. Those credentials are expected for the described functionality, but the skill does not provide guidance about secure storage/rotation or where those secrets will be persisted by the openclaw installation — users should confirm how their OpenClaw instance stores channel credentials.
Persistence & Privilege
The skill does not request elevated platform privileges, and 'always' is false. The generate-workspace.sh writes files into a workspace path (default under $HOME/.openclaw), creates .env and asset files, and may overwrite existing workspaces (it prompts). It also instructs installing additional skills that will read/write memory/.learnings; those components are designed to operate within the workspace and are configured to run in review mode. This is functionally expected for an agent-creation skill.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install create-agent-arch
  3. After installation, invoke the skill by name or use /create-agent-arch
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
- 支持多种频道类型的参数确认,新增 Phase 1.8「频道参数确认」阶段,智能读取 references/channel-params.md 动态生成问卷。 - 根据用户填写或跳过的频道,自动分支处理绑定参数、插件预装、扫码等操作,并记忆参数供后续注册流程使用。 - Phase 3 注册逻辑细化,支持多通道与多步骤自动化(如需 plugin、channels add、扫码等)。 - 用户问卷/频道信息收集流程更流畅,减少手动干预。 - 新增 references/channel-params.md 作为渠道参数模板参考依据。
v1.0.0
- Major update: The skill is now focused on the end-to-end creation and registration of a self-evolving OpenClaw Agent, structured into a strict 5-phase workflow. - Added detailed, questionnaire-driven setup: Before any action, requires all necessary Agent info from the user, deduplicating fields from conversation context when possible. - Integrates workspace generation via the new scripts/generate-workspace.sh using templates documented in references/workspace-templates.md. - CLI registration steps are now fully specified and error-checked, including channel binding and workspace identity application. - Introduces the installation and workflow integration of two agent evolution skills (self-improving-agent and capability-evolver) with a clear closed-loop logic. - Completes the process with a user checklist for git initialization, backup, conversation bootstrap, further evolution configuration, and error handling guidelines.
Metadata
Slug create-agent-arch
Version 1.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is create-agent?

完整创建一个 OpenClaw Agent,包括:一次性问卷收集配置信息、自动生成 workspace 文件(SOUL.md/AGENTS.md/IDENTITY.md/USER.md/MEMORY.md/HEARTBEAT.md)、 执行 `openclaw agents add` CLI 注册、内置 capa... It is an AI Agent Skill for Claude Code / OpenClaw, with 341 downloads so far.

How do I install create-agent?

Run "/install create-agent-arch" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is create-agent free?

Yes, create-agent is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does create-agent support?

create-agent is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created create-agent?

It is built and maintained by dao24dao (@dao24dao); the current version is v1.0.1.

💬 Comments