Agent Recruiter

👤 junchen19 📦 v2.0.0 ⭐ 4.4 ⬇️ 1.1K 下載
🤖 AI-Agent 免費

📖 技能介紹


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 <agent_id> <agent_name> [群聊 ID]

# 示例:建立 Tim 維護專員,繫結到指定群
~/.openclaw/workspace-recruiter/skills/agent-recruiter/scripts/recruit-agent.sh tim "Tim 維護專員" <群聊 ID>

指令碼會自動完成: 1. ✅ 建立 Agent 目錄結構 (~/.openclaw/agents/<id>/agent/ + ~/.openclaw/workspace-<id>/) 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_id>/
│       └── agent/
│           ├── agent.json           # Agent 基本配置
│           ├── models.json          # 模型配置
│           └── auth-profiles.json   # 認證配置
│
├── workspace-<agent_id>/
│   ├── 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: 建立目錄結構
```bash
mkdir -p ~/.openclaw/agents/<agent_id>/agent
mkdir -p ~/.openclaw/workspace-<agent_id>

步驟 2: 建立 agent.json

{
  "id": "<agent_id>",
  "name": "<agent_name>",
  "workspace": "/Users/junchen/.openclaw/workspace-<agent_id>",
  "agentDir": "/Users/junchen/.openclaw/agents/<agent_id>/agent",
  "model": "modelstudio/qwen3.5-plus"
}

步驟 3: 複製模型和認證配置

cp ~/.openclaw/agents/mike/agent/models.json ~/.openclaw/agents/<agent_id>/agent/
cp ~/.openclaw/agents/mike/agent/auth-profiles.json ~/.openclaw/agents/<agent_id>/agent/

步驟 4: 建立核心檔案

# 使用模板
cp ~/.openclaw/workspace-recruiter/skills/agent-recruiter/templates/SOUL.md.template ~/.openclaw/workspace-<agent_id>/SOUL.md
cp ~/.openclaw/workspace-recruiter/skills/agent-recruiter/templates/AGENTS.md.template ~/.openclaw/workspace-<agent_id>/AGENTS.md
cp ~/.openclaw/workspace-recruiter/skills/agent-recruiter/templates/IDENTITY.md.template ~/.openclaw/workspace-<agent_id>/IDENTITY.md

# 編輯內容
vim ~/.openclaw/workspace-<agent_id>/SOUL.md
vim ~/.openclaw/workspace-<agent_id>/IDENTITY.md

步驟 5: 更新 openclaw.json

agents.list 新增:

{
  "id": "<agent_id>",
  "name": "<agent_name>",
  "workspace": "/Users/junchen/.openclaw/workspace-<agent_id>",
  "agentDir": "/Users/junchen/.openclaw/agents/<agent_id>/agent",
  "model": "modelstudio/qwen3.5-plus"
}

bindings 新增(繫結群聊):

{
  "type": "route",
  "agentId": "<agent_id>",
  "match": {
    "channel": "feishu",
    "peer": {
      "kind": "group",
      "id": "<群聊 ID>"
    }
  }
}

步驟 6: 重啟 Gateway

openclaw gateway restart

📚 示例 Agent

Tim - 維護專員

參考模板:templates/examples/tim/SOUL.mdtemplates/examples/tim/IDENTITY.md

職責: - 每小時系統健康巡檢 - cron/agent/skill 監控 - 異常告警和修復

配置:

# 建立 Tim
./scripts/recruit-agent.sh tim "Tim 維護專員" <群聊 ID>

# 自定義 SOUL.md
vim ~/.openclaw/workspace-tim/SOUL.md

7w4.net提供免費和付費技能下載。


🔧 工具函式

檢查 Agent 是否存在

ls ~/.openclaw/agents/<agent_id>/agent/agent.json 2>/dev/null && echo "✅ 存在" || echo "❌ 不存在"

檢視 Agent 配置

cat ~/.openclaw/agents/<agent_id>/agent/agent.json
cat ~/.openclaw/workspace-<agent_id>/SOUL.md

檢視 Binding 路由

cat ~/.openclaw/openclaw.json | grep -A8 '"agentId": "<agent_id>"'

測試 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 - 配置才能生效

📚 參考資源

  • agency-agents: https://github.com/msitarzewski/agency-agents
  • 144 個專業化 Agent 模板
  • 涵蓋 Engineering、Design、Marketing、Sales 等 12 個部門
  • 專業的 SOUL.md 結構和成功指標定義

  • Agent 目錄: ~/.openclaw/agents/

  • Workspace 目錄: ~/.openclaw/workspace-<agent_id>/
  • 配置檔案: ~/.openclaw/openclaw.json
  • Gateway 日誌: /tmp/openclaw/openclaw-*.log
  • OpenClaw 文件: /opt/homebrew/lib/node_modules/openclaw/docs

🔄 最佳化現有 Agent 的 SOUL/IDENTITY

適用場景

  • Agent 已建立,但 SOUL.md/IDENTITY.md 還是模板
  • 需要根據具體職責定製人格和工作流程
  • 參考 agency-agents 的 144 個專業模板來匹配角色

最佳化流程

Step 1: 讀取現有配置

cat ~/.openclaw/workspace-<agent_id>/SOUL.md
cat ~/.openclaw/workspace-<agent_id>/IDENTITY.md

識別: 哪些是模板佔位符(如 [Agent 顯示名稱]),哪些已有內容

Step 2: 參考 agency-agents 模板

  • 瀏覽 https://github.com/msitarzewski/agency-agents
  • 找最匹配的角色類別(Engineering、Sales、Marketing 等)
  • 參考對應模板的 SOUL.md 結構

常見角色參考: | 角色型別 | agency-agents 參考 | |----------|-------------------| | 系統維護/DevOps | engineering-devops-automator.md | | 資訊分析師 | research-news-analyst.md | | 金融分析師 | sales-sales-pipeline-analyst.md | | 客服支援 | support-customer-success.md |

Step 3: 結合使用者需求定製

  • 問清楚 Agent 的具體職責(4 大板塊以內)
  • 確定使用的工具/技能(如 Tavily、cron、API 等)
  • 明確輸出格式和交付標準

Step 4: 更新 SOUL.md + IDENTITY.md

保持 agency-agents 結構: - 🧠 Identity & Memory - 🎯 Core Mission(分板塊,每板塊有預設要求) - 🚨 Critical Rules - 📋 Technical Deliverables(含模板示例) - 🔄 Workflow Process(Step 1-4) - 💭 Communication Style - 📊 Success Metrics(可量化)

IDENTITY.md 精簡版: - Name/Creature/Vibe/Emoji - Specialty(一句話) - Personality Traits(3-4 個) - When to Use(使用場景) - Success Metrics

實戰示例:David 資訊專家

背景: Agent 已建立,但 SOUL/IDENTITY 是模板

最佳化過程: 1. 讀取發現是模板 → 需要填充實際內容 2. 參考 agency-agents 資訊分析類别範本 3. 結合需求:Tavily 搜尋 + AI 資訊 + 政治 + 金融 4. 按 agency-agents 結構重寫 SOUL.md 和 IDENTITY.md

關鍵改進: - ✅ 明確 4 大職責板塊(AI 大模型、AI 行業、國際政治、金融) - ✅ 強調必須用 Tavily 搜尋(不依賴訓練資料) - ✅ 每條資訊必須標註來源 URL - ✅ 成功指標可量化(30 秒掌握、100% 可追溯) - ✅ 加了 Instructions Reference 段落


🎯 最佳實踐

1. SOUL.md 要具體

❌ 壞例子:"你是一個有用的助手" ✅ 好例子:"你是系統維護專員,每小時巡檢 cron/agent/skill 狀態,連續錯誤≥3 次必須告警"

2. 成功指標要可量化

❌ 壞例子:"系統執行良好" ✅ 好例子:"系統異常發現時間 <1 小時,cron 連續錯誤率 <5%"

3. 工作流程要清晰

❌ 壞例子:"檢查系統狀態" ✅ 好例子:"Step1: 執行 gateway status → Step2: 讀取 jobs.json → Step3: 生成報告"

4. 人格特質要鮮明

❌ 壞例子:"友好、專業" ✅ 好例子:"細緻、主動、預防性思維、系統化"

5. 複用 agency-agents 模板

❌ 壞例子:自己瞎寫結構 ✅ 好例子:參考 agency-agents 的專業模板,保持一致性

🤖 AI 評測

質量良好,主要優點是自動化程度高、文件詳盡、示例專業。適合快速建立 OpenClaw Agent,使用說明清晰易懂。主要缺點是部分模板檔案缺失,指令碼配置存在硬編碼限制,缺乏完整的錯誤恢復機制。整體是一個比較完善的 Skill,功能覆蓋完整但有小細節需要最佳化。

📊 多維度評分

適應性4.2
規範性4.3
有效性4.4
可靠性4.1
可信度5

📁 包含檔案 (7 個)

📄 SKILL.md 10.5 KB
📄 _meta.json 134 B
📄 scripts/recruit-agent.sh 5 KB
📄 templates/examples/mike/IDENTITY.md 1.1 KB
📄 templates/examples/mike/SOUL.md 5.3 KB
📄 templates/examples/tim/IDENTITY.md 1 KB
📄 templates/examples/tim/SOUL.md 6.1 KB