← Back to Skills Marketplace
snlcc

X Creat Agent

by SNLCC · GitHub ↗ · v1.2.14 · MIT-0
cross-platform ✓ Security Clean
11
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install x-creat-agent
Description
规范化创建 OpenClaw Agent 的完整工作流。当用户说"创建 agent"、"新建 agent"、"添加 agent"、"new agent"时触发。执行三步流程:(1) 收集 agent_id/中文名/职能描述;(2) 执行脚本创建 agent 和工作区文件(--user-name 防硬编码);(3)...
README (SKILL.md)

x-create-agent — OpenClaw Agent 标准化创建流程

作者:少年李迟迟 工作区文件(USER.md 等)不写死任何用户名,参考模板结合用户信息动态生成。 飞书配对自动化(脚本直接写入 openclaw.json),无需主 agent 介入。

工作流程

Step 1:收集信息

向用户收集以下信息(逐项询问,不要一次性问完):

信息 说明 验证规则
agent_id 唯一标识,英文字母/数字/连字符 必须是合法标识符(字母开头)
name 中文名称 1-20字
description 职能描述 一句话说明这个 agent 是做什么的
feishu_appid 飞书 AppID 格式:cli_xxxxxxxx
feishu_appsecret 飞书 AppSecret 非空字符串

⚠️ 如果用户跳过飞书信息,创建完成后仍需引导填写。

路径说明: ~/.openclaw/skills/x-create-agent 是默认安装路径示例,实际路径因用户环境而异。脚本支持自动搜索,搜不到时会交互式询问,用户只需输入自己的 OPENCLAW_HOME 绝对路径即可,开源分享无障碍。

Step 2:执行创建脚本

路径确认制:脚本发现路径后,先展示汇总信息,用户确认(输入 y)后再创建。

cd ~/.openclaw/skills/x-create-agent
python3 scripts/create_agent.py "\x3Cagent_id>" "\x3Cname>" "\x3Cdescription>" \
  [--openclaw-home \x3Cpath>] \
  [--workspace \x3Cpath>] \
  [--user-name \x3Cname>] \
  [--feishu-appid \x3Cappid>] \
  [--feishu-appsecret \x3Csecret>]

展示内容(等用户确认):

  • Agent ID / 名称 / 职能描述
  • 发现的配置目录路径
  • 将创建的 Agent 目录路径
  • 将创建的工作区路径

路径发现优先级(自动搜索,无需手动指定):

  1. OPENCLAW_HOME 环境变量(如已设置)
  2. 脚本自身目录向上持续搜索(无层级限制,直到根目录)
  3. openclaw 二进制所在目录向上搜索
  4. 常见安装路径(~/.openclaw/ 等 Linux/macOS/Windows 平台覆盖)

手动指定(可选):

  • --openclaw-home \x3Cpath> — 显式指定配置目录路径
  • --workspace \x3Cpath> — 自定义工作区路径(相对路径基于脚本目录 resolve)

如全部搜索失败:脚本进入交互模式,提示用户输入配置目录路径并验证 openclaw.json 存在。

用户输入非 y:脚本立即退出,不创建任何文件。

Step 2.1:飞书配对(可选,命令行直接传入)

创建时直接传入 AppID 和 AppSecret,自动完成飞书机器人配对:

python3 scripts/create_agent.py "\x3Cagent_id>" "\x3Cname>" "\x3Cdescription>" \
  --feishu-appid "cli_xxxxxxxx" \
  --feishu-appsecret "\x3Csecret>"

这会在 openclaw.json 中自动写入:

  • channels.feishu.accounts[\x3Cagent_id>]:机器人凭证
  • bindings:路由绑定

如未传入,脚本会在创建完成后打印操作指引。无需主 agent 介入,skill 调用者自己引导用户完成即可。

飞书机器人创建链接:

Step 3:确认完成

创建完成后,报告:

  • Agent 目录路径
  • 工作区路径
  • 飞书绑定状态(如已传入凭证,则自动完成)

脚本详情:scripts/create_agent.py

功能

  • 创建 agents/\x3Cagent_id>/agent/ 目录
  • 创建工作区目录及标准文件(SOUL.md / AGENTS.md / USER.md 等)
  • 将新 agent 注册到 openclaw.json
  • 自动完成飞书机器人配对(写入 accounts + bindings)

关键实现细节

路径发现逻辑(按优先级):

  1. OPENCLAW_HOME 环境变量
  2. ~/.openclaw/
  3. 常见安装路径(如 ~/.openclaw/

openclaw.json 注册

  • agents.list 中添加新条目(含 idnameworkspaceagentDir
  • tools.agentToAgent.allow 中添加新 agent_id

飞书配对自动写入

  • channels.feishu.accounts[\x3Cagent_id>]:机器人凭证(appId + appSecret)
  • bindings:路由绑定(channel=feishu, accountId=\x3Cagent_id>)

工作区文件

  • 脚本参考内置模板,结合用户提供的 agent_idnamedescriptionuser_name 动态渲染生成各文件
  • SOUL.md → 填入 agent 名称和职能描述(专属内容)
  • USER.md → 填入 user_name(主人名)
  • IDENTITY.md → 填入 agent 名称
  • AGENTS.md / HEARTBEAT.md / TOOLS.md / MEMORY.md / SESSION-STATE.md → 使用模板固定内容

注意事项

  • 脚本不生成任何业务内容,工作区文件内容由模板 + 用户信息共同渲染生成
  • 不在 openclaw.json 中写入 enabled 字段(schema 不支持)
  • 不在顶层 agents 下创建配置(schema 要求在 agents.list 中)
  • agent 的 workspaceagentDir 必须使用绝对路径
  • --user-name 为可选,不传则 USER.md 中显示为"用户"

依赖

  • lark-cli(用于验证飞书凭证连通性,可选)
  • Python 3(脚本执行)
Usage Guidance
Install only if you want a helper that can create new OpenClaw agents and modify your OpenClaw configuration. Review the generated workspace templates, correct the timezone if needed, and be careful with Feishu AppSecret: avoid exposing it in shell history or logs and protect openclaw.json because it may contain plaintext credentials.
Capability Assessment
Purpose & Capability
The artifacts consistently describe and implement an OpenClaw agent creation workflow: create directories and workspace files, register the agent in openclaw.json, and optionally add Feishu bot credentials and routing.
Instruction Scope
The activation phrases are broad, but the workflow collects specific agent details and the script requires an explicit y confirmation before creating files or modifying configuration.
Install Mechanism
There is no install-time execution hook or hidden installer behavior; the executable component is a Python script that runs when invoked by the user or agent workflow.
Credentials
The script searches common OpenClaw config locations and writes to the selected OpenClaw home and workspace, which is proportionate to the stated purpose and shown to the user before mutation.
Persistence & Privilege
It persistently modifies openclaw.json, creates agent/workspace files, and may store Feishu appSecret in plaintext; this is disclosed and purpose-aligned, but sensitive.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install x-creat-agent
  3. After installation, invoke the skill by name or use /x-creat-agent
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.2.14
- Added standardized workflow for creating OpenClaw Agents, including step-by-step user guidance. - Automates collection of agent info and Feishu robot credentials, with validation. - Improved path detection logic; now searches for openclaw home directory and workspace more robustly across environments. - Creation script dynamically generates all required files from templates, with user-provided agent information. - Feishu bot pairing is automatic if credentials are supplied, without needing manual intervention. - Ensures no hardcoded user data; supports open sharing and flexible installation paths.
Metadata
Slug x-creat-agent
Version 1.2.14
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is X Creat Agent?

规范化创建 OpenClaw Agent 的完整工作流。当用户说"创建 agent"、"新建 agent"、"添加 agent"、"new agent"时触发。执行三步流程:(1) 收集 agent_id/中文名/职能描述;(2) 执行脚本创建 agent 和工作区文件(--user-name 防硬编码);(3)... It is an AI Agent Skill for Claude Code / OpenClaw, with 11 downloads so far.

How do I install X Creat Agent?

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

Is X Creat Agent free?

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

Which platforms does X Creat Agent support?

X Creat Agent is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created X Creat Agent?

It is built and maintained by SNLCC (@snlcc); the current version is v1.2.14.

💬 Comments