Agent Recruiter
by @junchen19
招聘 Agent 工具 - 创建、配置和管理 OpenClaw Agent。 参考 [agency-agents](https://github.com/msitarzewski/agency-agents) 的专业 agent 模板结构。 **当以下情况时使用此 Skill**: (1) 需要创建新的 Agen...
clawhub install agent-recruiter📖 About This Skill
name: agent-recruiter description: | 招聘 Agent 工具 - 创建、配置和管理 OpenClaw Agent。 参考 agency-agents 的专业 agent 模板结构。 当以下情况时使用此 Skill: (1) 需要创建新的 Agent(如 Tim、Mike 等) (2) 需要为 Agent 配置飞书群绑定 (3) 需要复制现有 Agent 的配置模板 (4) 用户提到"招聘 agent"、"创建 agent"、"配置 agent" 核心文件: - 自动化脚本:
~/.openclaw/workspace-recruiter/skills/agent-recruiter/scripts/recruit-agent.sh
- 模板目录:~/.openclaw/workspace-recruiter/skills/agent-recruiter/templates/
Agent Recruiter - 招聘 Agent 工具
🎯 一键招聘(推荐)
用法:
# 基础用法 - 创建常驻 Agent(绑定群聊)
~/.openclaw/workspace-recruiter/skills/agent-recruiter/scripts/recruit-agent.sh [群聊 ID]示例:创建 Tim 维护专员,绑定到指定群
~/.openclaw/workspace-recruiter/skills/agent-recruiter/scripts/recruit-agent.sh tim "Tim 维护专员" <群聊 ID>
脚本会自动完成:
1. ✅ 创建 Agent 目录结构 (~/.openclaw/agents/ + ~/.openclaw/workspace-)
2. ✅ 生成 agent.json 配置
3. ✅ 复制 models.json 和 auth-profiles.json
4. ✅ 生成 SOUL.md、AGENTS.md、IDENTITY.md 模板
5. ✅ 更新 openclaw.json(添加 agent 和 binding)
6. ✅ 重启 Gateway
📁 Agent 文件结构(参考 agency-agents)
每个 Agent 包含以下核心文件:
~/.openclaw/
├── agents/
│ └── /
│ └── agent/
│ ├── agent.json # Agent 基本配置
│ ├── models.json # 模型配置
│ └── auth-profiles.json # 认证配置
│
├── workspace-/
│ ├── SOUL.md # ⭐ Agent 人格和身份(核心)
│ ├── AGENTS.md # 工作区规范
│ ├── IDENTITY.md # 名称、Emoji、Vibe
│ ├── TOOLS.md # 本地工具配置
│ ├── USER.md # 用户信息
│ ├── HEARTBEAT.md # 定期任务清单
│ └── memory/
│ ├── YYYY-MM-DD.md # 每日日志
│ └── MEMORY.md # 长期记忆
│
└── openclaw.json
├── agents.list[] # Agent 注册列表
└── bindings[] # 消息路由绑定
核心文件说明
| 文件 | 作用 | 必填 | |------|------|------| | SOUL.md | Agent 的人格、使命、工作流程、成功指标 | ⭐ 必填 | | AGENTS.md | 工作区使用规范、记忆系统、工具指南 | ✅ 推荐 | | IDENTITY.md | 名称、Emoji、Vibe、专业领域 | ✅ 推荐 | | agent.json | OpenClaw 注册配置 | ⭐ 必填 |
📋 SOUL.md 模板结构(参考 agency-agents)
# SOUL.md - Who You Are🧠 Your Identity & Memory
Role: [核心角色定位]
Personality: [性格特点]
Memory: [记住的成功模式]
Experience: [经历过的案例] 🎯 Your Core Mission
[核心职责 1]
[具体任务]
[可量化目标] [核心职责 2]
[具体任务]
[交付标准] 🚨 Critical Rules You Must Follow
[规则类别 1]
[必须遵守的规则] 📋 Your Technical Deliverables
[交付物示例]
code
// 代码或模板示例
🔄 Your Workflow Process
Step 1: [阶段名]
[行动]
[产出] 💭 Your Communication Style
Be [特质]: "示例表达" 📊 Your Success Metrics
You're successful when:
[可量化指标 1]
[可量化指标 2]
🚀 手动创建 Agent(学习用)
步骤 1: 创建目录结构
mkdir -p ~/.openclaw/agents//agent
mkdir -p ~/.openclaw/workspace-
步骤 2: 创建 agent.json
{
"id": "",
"name": "",
"workspace": "/Users/junchen/.openclaw/workspace-",
"agentDir": "/Users/junchen/.openclaw/agents//agent",
"model": "modelstudio/qwen3.5-plus"
}
步骤 3: 复制模型和认证配置
cp ~/.openclaw/agents/mike/agent/models.json ~/.openclaw/agents//agent/
cp ~/.openclaw/agents/mike/agent/auth-profiles.json ~/.openclaw/agents//agent/
步骤 4: 创建核心文件
# 使用模板
cp ~/.openclaw/workspace-recruiter/skills/agent-recruiter/templates/SOUL.md.template ~/.openclaw/workspace-/SOUL.md
cp ~/.openclaw/workspace-recruiter/skills/agent-recruiter/templates/AGENTS.md.template ~/.openclaw/workspace-/AGENTS.md
cp ~/.openclaw/workspace-recruiter/skills/agent-recruiter/templates/IDENTITY.md.template ~/.openclaw/workspace-/IDENTITY.md编辑内容
vim ~/.openclaw/workspace-/SOUL.md
vim ~/.openclaw/workspace-/IDENTITY.md
步骤 5: 更新 openclaw.json
在agents.list 添加:
{
"id": "",
"name": "",
"workspace": "/Users/junchen/.openclaw/workspace-",
"agentDir": "/Users/junchen/.openclaw/agents//agent",
"model": "modelstudio/qwen3.5-plus"
}
在 bindings 添加(绑定群聊):
{
"type": "route",
"agentId": "",
"match": {
"channel": "feishu",
"peer": {
"kind": "group",
"id": "<群聊 ID>"
}
}
}
步骤 6: 重启 Gateway
openclaw gateway restart
📚 示例 Agent
Tim - 维护专员
参考模板:templates/examples/tim/SOUL.md 和 templates/examples/tim/IDENTITY.md职责:
配置:
# 创建 Tim
./scripts/recruit-agent.sh tim "Tim 维护专员" <群聊 ID>自定义 SOUL.md
vim ~/.openclaw/workspace-tim/SOUL.md
🔧 工具函数
检查 Agent 是否存在
ls ~/.openclaw/agents//agent/agent.json 2>/dev/null && echo "✅ 存在" || echo "❌ 不存在"
查看 Agent 配置
cat ~/.openclaw/agents//agent/agent.json
cat ~/.openclaw/workspace-/SOUL.md
查看 Binding 路由
cat ~/.openclaw/openclaw.json | grep -A8 '"agentId": ""'
测试 Gateway 状态
openclaw gateway status
列出所有 Agent
cat ~/.openclaw/openclaw.json | jq '.agents.list[].id'
⚠️ 注意事项
1. agent_id 必须唯一 - 不能与现有 agent 重复 2. workspace 目录必须存在 - 否则 agent 启动会失败 3. SOUL.md 是核心 - 定义 Agent 的人格和行为 4. models.json 和 auth-profiles.json 必须配置 - 否则无法调用模型 5. Binding 路由的群 ID 必须正确 - 否则消息无法路由 6. 修改 openclaw.json 后必须重启 Gateway - 配置才能生效
📚 参考资源
~/.openclaw/agents/~/.openclaw/workspace-/ ~/.openclaw/openclaw.json/tmp/openclaw/openclaw-*.log/opt/homebrew/lib/node_modules/openclaw/docs🔄 优化现有 Agent 的 SOUL/IDENTITY
适用场景
优化流程
#### Step 1: 读取现有配置
cat ~/.openclaw/workspace-/SOUL.md
cat ~/.openclaw/workspace-/IDENTITY.md
识别: 哪些是模板占位符(如 [Agent 显示名称]),哪些已有内容#### Step 2: 参考 agency-agents 模板
常见角色参考: | 角色类型 | agency-agents 参考 | |----------|-------------------| | 系统维护/DevOps | engineering-devops-automator.md | | 资讯分析师 | research-news-analyst.md | | 金融分析师 | sales-sales-pipeline-analyst.md | | 客服支持 | support-customer-success.md |
#### Step 3: 结合用户需求定制
#### Step 4: 更新 SOUL.md + IDENTITY.md 保持 agency-agents 结构:
IDENTITY.md 精简版:
实战示例:David 资讯专家
背景: Agent 已创建,但 SOUL/IDENTITY 是模板
优化过程: 1. 读取发现是模板 → 需要填充实际内容 2. 参考 agency-agents 资讯分析类模板 3. 结合需求:Tavily 搜索 + AI 资讯 + 政治 + 金融 4. 按 agency-agents 结构重写 SOUL.md 和 IDENTITY.md
关键改进: