当前位置: 首页 > Skill >

OpenClaw Agent Creator

OpenClaw Agent Creator

OpenClaw Agent Creator

为 Arch 多智能体系统创建新的 OpenClaw 智能体。当请求创建、添加或设置新智能体,或操作 ~/.openclaw/ 下的系统时使用。涵盖完整生命周期:目录创建、工作区文件(SOUL.md、IDENTITY.md 等)、openclaw. 配置、Telegram 路由(绑定、群组及提及模式)、含提示词工程的定时任务创建及网关重启。亦适用于修改现有智能体配置、添加定时任务或调试路由问题。

1.0.0 2026.11.22 635
获取Skill文件查看使用说明
作 者:顾景 许可证: 更新时间:2026.11.22
本文目录展开

OpenClaw Agent Creator

Create and configure agents for Arch's OpenClaw multi-agent system at ~/.openclaw/.

System Context

  • Owner: Archit (Arch), Linux user archit, timezone America/Denver
  • Gateway: Single process on port 18789 managing all agents
  • Bot: One Telegram bot shared across all agents — routing determines which agent handles which chat
  • Existing agents: Check ~/.openclaw/openclaw.json → agents.list[] for current roster
  • Implementation history: See ~/.openclaw/implementation-docs/ for the Wire agent reference implementation

Agent Creation Workflow

1. Gather Requirements

Before creating anything, clarify with Arch:

  • Agent name and ID (lowercase, no spaces for ID)
  • Role and responsibilities (specific, not vague)
  • Model tier: cheap (Kimi K2.5 only) or full cascade (include Claude Sonnet)
  • Whether it needs a Telegram group for Q&A
  • Whether it needs cron jobs (what schedule, what tasks)
  • Whether heartbeat should be enabled or disabled

2. Stop the Gateway

openclaw gateway stop

MANDATORY before editing openclaw.json or cron/jobs.json. The gateway actively writes to jobs.json (updating job state after each cron run). Editing while the gateway runs causes race conditions and data loss.

3. Backup Config

cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.backup.$(date +%Y%m%d%H%M%S)

4. Create Directories

mkdir -p ~/.openclaw/workspace-<agent_id>/memory
mkdir -p ~/.openclaw/agents/<agent_id>/agent

NEVER reuse agentDir across agents — causes auth/session collisions.

5. Write Workspace Files

Use templates from assets/templates/ as starting points. Every agent needs:

File Purpose Required
SOUL.md Personality, role, responsibilities, behavioral modes Yes
IDENTITY.md Quick-reference card (name, role, emoji) Yes
USER.md About Arch (copy from any existing agent workspace) Yes
AGENTS.md Workspace rules (boot sequence, memory, safety) Yes
HEARTBEAT.md Periodic task checklist (or comment if disabled) Yes

SOUL.md is the most important file. Be specific about responsibilities. Include behavioral modes if the agent operates differently in different contexts (e.g., briefing mode vs chat mode).

6. Edit openclaw.json — Agent Entry

Add to agents.list[]. See references/config-schema.md for all valid fields.

Minimal entry:

{
  "id": "<agent_id>",
  "name": "<Display Name>",
  "workspace": "/home/archit/.openclaw/workspace-<agent_id>",
  "agentDir": "/home/archit/.openclaw/agents/<agent_id>/agent",
  "identity": { "name": "<Display Name>" }
}

Common additions:

  • "model" — Override the default model cascade. Exclude expensive models for worker agents.
  • "heartbeat": { "every": "0" } — Disable heartbeat for cron-only agents.
  • "groupChat": { "mentionPatterns": ["@<id>", "@<Name>"] } — Enable @mentions in groups.

Only ONE agent should have "default": true (currently Fossil). The default agent receives all unrouted messages.

7. Edit openclaw.json — Telegram Routing (if needed)

THREE separate config changes are required. Missing any one causes silent failures. See references/telegram-routing.md for the full explanation.

  1. Group config in channels.telegram.groups:

    "-100XXXXXXXXXX": { "requireMention": false }
    
  2. Binding in bindings[]:

    { "agentId": "<id>", "match": { "channel": "telegram", "peer": { "kind": "group", "id": "-100XXXXXXXXXX" } } }
    
  3. Mention patterns on the agent entry (already done in step 6 if groupChat was added).

8. Create Cron Jobs (if needed)

Edit cron/jobs.json. Every cron job prompt MUST include:

  • Dynamic group ID resolution preamble (NEVER hardcode Telegram group IDs):
    FIRST: Resolve your Telegram group ID by running:
    jq -r '.bindings[] | select(.agentId == "<agent_id>") | .match.peer.id' ~/.openclaw/openclaw.json
    Use the output as the target for all Telegram messages in this task.
    
  • Date injection: $(date '+%A, %B %d, %Y') after the preamble
  • Explicit constraints: source allowlists, recency rules, format templates
  • Delivery instructions: use target='<AGENT_GROUP_ID>' placeholder (resolved by the preamble)

This self-healing pattern ensures cron jobs survive Telegram group ID migrations. See references/prompt-patterns.md for full patterns and references/telegram-routing.md for why this matters.

Critical: If copying files or prompts from another agent's workspace, grep for hardcoded paths and update them.

9. Restart Gateway and Verify

openclaw gateway start

Verify in logs:

  • Agent registered: agent registered: <id>
  • Messages route correctly: lane enqueue: lane=session:agent:<id>:...

If messages to a Telegram group show skip: no-mention, the channels.telegram.groups config is missing (see references/bugs-and-pitfalls.md).

Reference Files

File When to Read
references/config-schema.md When writing agent config or cron jobs
references/telegram-routing.md When setting up Telegram group routing
references/prompt-patterns.md When writing cron job prompts
references/bugs-and-pitfalls.md When debugging issues or before any config edit

Template Files

Starter templates for workspace files are in assets/templates/. Copy and customize per agent.

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,034
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,031
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,018
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,017
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,013
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,013
Skill 文件
  • SKILL.md
    • OpenClaw Agent Creator
    • System Context
    • Agent Creation Workflow
      • 1. Gather Requirements
      • 2. Stop the Gateway
      • 3. Backup Config
      • 4. Create Directories
      • 5. Write Workspace Files
      • 6. Edit openclaw.json — Agent Entry
      • 7. Edit openclaw.json — Telegram Routing (if needed)
      • 8. Create Cron Jobs (if needed)
      • 9. Restart Gateway and Verify
    • Reference Files
    • Template Files
  • 项目或源文件

相关 Skill

更多
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。
Traditional Bone Tool Making Basics Traditional Bone Tool Making Basics Use when you need custom, durable, repairable tools like awls, needles, scrapers, harpoons, or fishing hooks made from local animal bones or antlers and comm...
音频混音工具 音频混音工具 名称:Sound Mixing Tool(标识 sound-mixing-tool) 短简介(≤60字):音乐/音效响度精确对齐 + 融合混音工作流:用 ffmpeg 两段式 loudnorm 把多组素材 LUFS 偏差压到 <0.10,再最小干预融合、导出可进引擎的独立分轨。 标签/关键词:音频混音 响度匹配 LUFS ffmpeg 游戏音频 音效设计 Wwise FMOD 分轨导出 后期处理 触发词:混音 · 响度匹配 · LUFS 对齐 · MIX 版本 · 音乐音效分轨 · 融合 · 不打架 · 不能盖住 适用场景 :游戏音频集成、影视短视频配乐、播客后期