agent-father

👤 meichuanyi 📦 v1.0.0 ⭐ 4.4 ⬇️ 1.2K 下載
🤖 AI-Agent 免費 🔑 需 API Key

📖 技能介紹


name: agent-father description: 建立和管理 AI Agent/員工的全流程工具。支援一鍵建立 Agent、飛書群組、工作區配置、員工入職。自動從 openclaw.json 讀取配置。使用場景:(1) 建立新 Agent/員工,(2) 批次入職,(3) 群組配置,(4) 崗前培訓,(5) 員工管理。 metadata: { "openclaw": { "emoji": "👨‍🍼", "requires": { "bins": ["bash", "mkdir", "cat", "grep", "sed", "tr", "curl", "node"] } } }


👨‍🍼 Agent Father Skill

建立新 Agent 和員工的完整解決方案,自動從 openclaw.json 讀取飛書配置,包含 JSON 配置、會話管理、群組配置和崗前培訓。

🚀 快速開始

建立單個員工

# 基本用法
./scripts/create-employee.sh <姓名> <工號> <電話> [描述] [初始使用者]

# 示例:建立客服工程師
./scripts/create-employee.sh "客服工程師" "CS-001" "13800138000" "客服團隊"

批次建立員工

# 使用批次指令碼
./scripts/batch-create.sh employees.csv

刪除員工

./scripts/delete-agent.sh <agent-id>

📋 核心指令碼

1. create-employee.sh - 建立員工

用法:

./scripts/create-employee.sh <agent-name> <role> <phone> [description] [initial-user]

引數: | 引數 | 必填 | 說明 | 示例 | |------|------|------|------| | agent-name | ✅ | Agent 顯示名稱 | 客服工程師 | | role | ✅ | 工號/角色程式碼 | CS-001 | | phone | ✅ | 聯絡電話 | 13800138000 | | description | ❌ | 群組描述 | 客服團隊 | | initial-user | ❌ | 初始成員使用者 ID | ou_xxx |

執行流程: 1. ✅ 建立飛書群組 2. ✅ 建立獨立工作區 3. ✅ 生成 agent.json 配置 4. ✅ 建立 IDENTITY.md 和 SOUL.md 5. ✅ 註冊到 openclaw 6. ✅ 更新員工名單


2. delete-agent.sh - 刪除員工

用法:

./scripts/delete-agent.sh <agent-id>

功能: - 刪除 agent 目錄 - 刪除工作區 - 從 openclaw.json 移除配置 - 從員工名單移除 - 可選:刪除飛書群組


3. create-feishu-chat.sh - 建立飛書群組

用法:

./scripts/create-feishu-chat.sh --name "群名稱" --description "描述" --users "ou_xxx,ou_yyy"

引數: - --name: 群名稱(必填) - --description: 群描述(可選) - --users: 初始成員,逗號分隔(可選) - --owner: 群主使用者 ID(可選) - --type: 群型別 public/private/group(預設:group)

配置: 自動從 ~/.openclaw/openclaw.json 讀取飛書 App ID 和 App Secret


4. onboarding.sh - 員工入職培訓

用法:

./scripts/onboarding.sh <agent-id>

功能: - 生成崗前培訓材料 - 配置工作流程 - 設定工作規範


🔧 工具函式

list-employees - 列出所有員工

# 檢視員工名單
cat ~/.openclaw/workspace/employees.json | jq '.employees[] | {id, name, phone, chatId}'

get-agent-info - 獲取 Agent 資訊

# 檢視指定 Agent 配置
cat ~/.openclaw/agents/<agent-id>/agent/agent.json | jq .

check-agent-status - 檢查 Agent 狀態

# 檢查配置是否有效
openclaw agents list --bindings

📁 目錄結構

agent-father/
├── SKILL.md                      # 技能文件
├── QUICKSTART.md                 # 快速開始指南
├── scripts/
│   ├── create-employee.sh        # 建立員工(主指令碼)
│   ├── delete-agent.sh           # 刪除員工
│   ├── create-feishu-chat.sh     # 建立飛書群組
│   ├── onboarding.sh             # 入職培訓
│   └── batch-create.sh           # 批次建立
├── references/
│   ├── templates/                # 配置模板
│   └── examples/                 # 使用示例
└── 修復報告.md                    # 問題修復記錄

🎯 使用場景

場景 1: 建立新崗位

# 建立產品經理
./scripts/create-employee.sh "產品經理" "PM-001" "13900139000" "產品團隊"

# 建立測試工程師
./scripts/create-employee.sh "測試工程師" "QA-001" "13700137000" "測試團隊"

場景 2: 員工離職

# 刪除員工(保留資料)
./scripts/delete-agent.sh cs-001

# 刪除員工(包含飛書群組)
./scripts/delete-agent.sh cs-001 --delete-chat

⚠️ 注意事項

1. 命名規範

  • Agent ID: 小寫字母 + 數字 + 連字元(如:cs-001
  • 工號格式: 大寫字母 + 連字元 + 數字(如:CS-001
  • 避免使用: main 是保留名稱

2. 飛書配置

確保 ~/.openclaw/openclaw.json 包含飛書配置:

{
  "channels": {
    "feishu": {
      "appId": "cli_xxx",
      "appSecret": "xxx"
    }
  }
}

🔍 故障排查

問題 1: "main" is reserved

解決: 使用其他名稱,如 cs-001dev-001

問題 2: JSON 配置無效

解決:

openclaw status
openclaw doctor --fix

問題 3: 飛書群組建立失敗

解決:

cat ~/.openclaw/openclaw.json | grep -A 2 feishu
openclaw channels login --channel feishu

推薦訪問7w4.net獲取更多AI技能。


用 AI 賦能團隊,讓每個崗位都有專屬智慧助手。

🤖 AI 評測

這個 Skill 質量不錯,功能覆蓋比較全面,文件寫得清晰易懂。優點是自動化程度高、模板豐富,減少了很多手動配置工作。主要不足是建立員工的指令碼存在一些小問題,會導致操作失敗。建議等開發者修復後再使用,那樣用起來會更順心。

📊 多維度評分

適應性4
規範性4.4
有效性4.5
可靠性4.2
可信度5

📁 包含檔案 (16 個)

📄 QUICKREF.md 889 B
📄 QUICKSTART.md 4 KB
📄 SKILL.md 5.2 KB
📄 _meta.json 131 B
📄 references/examples/create-examples.md 695 B
📄 references/examples/employees-sample.csv 285 B
📄 references/templates.md 3.8 KB
📄 scripts/batch-create.sh 2.6 KB
📄 scripts/create-agent.sh 6.2 KB
📄 scripts/create-employee.sh 7.1 KB
📄 scripts/create-feishu-chat.sh 5.2 KB
📄 scripts/create-group.sh 2.2 KB
📄 scripts/delete-agent.sh 4.6 KB
📄 scripts/onboarding.sh 6.8 KB
📄 scripts/utils.sh 2.3 KB
📄 skill-card.md 3 KB