Token导航 LogoToken导航TokenDH.com
研究检索只读clawhub未标认证来源可访问clear审计提醒

add-agent添加 Agent

Agent Skill

add-agent 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

14,457

周安装

621

GitHub Stars

公开资料未说明

下载量

5,067
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:add-agent(添加 Agent)
来源仓库:https://github.com/owen-ai-01/add-agent
安装命令:
openclaw skills install add-agent
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install add-agent

简介

添加新的 OpenClaw Agent,自动配置 openclaw.json,创建工作区,复制身份验证和技能。

SKILL.md

name
add-agent
description
Add a new OpenClaw Agent, automatically configure openclaw.json, create workspace, copy auth and skills.

add-agent

Quickly add a new isolated Agent with a dedicated Telegram Bot.

Trigger

User says something like:

"Add a new agent, ID is marketing, name is Marketing Assistant, telegram Bot Token is xxx, allowFrom is 123456789, responsible for content marketing and social media"

Steps

Once a new agent request is received, execute in the following order:

1. Extract Parameters

Extract the following fields from user input:

  • AGENT_ID: English ID (e.g. marketing)
  • AGENT_NAME: Agent name (e.g. Marketing Assistant, Alice, WorkBot, etc.)
  • BOT_TOKEN: Telegram Bot Token
  • ALLOW_FROM: allowFrom numeric ID (e.g. 123456789)
  • DESCRIPTION: Role description (e.g. responsible for content marketing and social media)

If any field is missing, ask the user to provide it before continuing.

2. Detect Installation Directory

Read the current openclaw.json path, extract the actual paths from the existing main agent in agents.list to derive:

  • STATE_DIR: e.g. /home/openclaw/.openclaw
  • MAIN_WORKSPACE: main agent workspace path
  • MAIN_AGENT_DIR: main agent agentDir path
  • NEW_WORKSPACE: ${STATE_DIR}/workspace-${AGENT_ID}
  • NEW_AGENT_DIR: ${STATE_DIR}/agents/${AGENT_ID}/agent

3. Backup Config File

cp ${CONFIG_PATH} ${CONFIG_PATH}.bak.$(date +%Y%m%d%H%M%S)

4. Run openclaw agents add

openclaw agents add ${AGENT_ID}

This automatically initializes the workspace directory structure, agentDir, and default files like SOUL.md and AGENTS.md.

5. Copy Auth, Skills and USER.md

# Copy auth profiles
cp ${MAIN_AGENT_DIR}/auth-profiles.json \
   ${NEW_AGENT_DIR}/auth-profiles.json

# Copy skills
cp -r ${MAIN_WORKSPACE}/skills/ \
      ${NEW_WORKSPACE}/skills/

# Copy USER.md
cp ${MAIN_WORKSPACE}/USER.md \
   ${NEW_WORKSPACE}/USER.md

6. Generate Persona Files

Overwrite ${NEW_WORKSPACE}/SOUL.md:

# ${AGENT_NAME}

## Identity
You are ${AGENT_NAME}, ${DESCRIPTION}.
Your partner is the main agent. You collaborate together to complete tasks.

## Core Responsibilities
${DESCRIPTION}

## Personality
- Action-oriented: Break down tasks immediately and provide clear execution steps
- Proactive reporting: Report results to main after completing tasks
- Professional: Maintain high standards for all outputs

## Rules
- Do not execute high-risk operations without confirmation
- Always notify the user before executing operations that require manual approval

Overwrite ${NEW_WORKSPACE}/AGENTS.md:

# ${AGENT_NAME} Agent Configuration

## Other Agents in the System

- **main**: Primary agent, responsible for daily conversation, task coordination and decisions
- **${AGENT_ID} (yourself)**: ${DESCRIPTION}

## Collaboration Rules

### Receiving Tasks from main
1. Confirm task goal and priority
2. Break down execution steps
3. Execute and record results
4. Report results back to main upon completion

### When to Proactively Contact main
- Operations that require final user confirmation
- Result reporting after task completion
- Escalating anomalies or unexpected situations

7. Update openclaw.json

Read the current config and append the following:

Add to agents.list:

{
  "id": "${AGENT_ID}",
  "name": "${AGENT_NAME}",
  "workspace": "${NEW_WORKSPACE}",
  "agentDir": "${NEW_AGENT_DIR}"
}

Add to bindings:

{
  "agentId": "${AGENT_ID}",
  "match": {
    "channel": "telegram",
    "accountId": "${AGENT_ID}"
  }
}

Add to channels.telegram.accounts:

"${AGENT_ID}": {
  "enabled": true,
  "botToken": "${BOT_TOKEN}",
  "dmPolicy": "pairing",
  "allowFrom": ["${ALLOW_FROM}"],
  "groupPolicy": "allowlist",
  "streaming": "off"
}

Handle tools config (check before writing):

Check whether the tools field exists:

  • If tools does not exist, add the full block:
"tools": {
  "agentToAgent": {
    "enabled": true,
    "allow": ["main", "${AGENT_ID}"]
  },
  "sessions": {
    "visibility": "all"
  }
}
  • If tools exists but has no agentToAgent, add it:
"agentToAgent": {
  "enabled": true,
  "allow": ["main", "${AGENT_ID}"]
}
  • If agentToAgent already exists, only append "${AGENT_ID}" to the allow array (no duplicates)
  • If sessions.visibility does not exist, add it:
"sessions": {
  "visibility": "all"
}

8. Validate JSON

cat ${CONFIG_PATH} | python3 -m json.tool

If validation fails, stop immediately and restore from backup:

cp ${CONFIG_PATH}.bak.* ${CONFIG_PATH}

Report the exact error to the user.

9. Fix File Permissions

chown -R $(stat -c '%U:%G' ${MAIN_WORKSPACE}) ${NEW_WORKSPACE}/
chown -R $(stat -c '%U:%G' ${MAIN_AGENT_DIR}) ${NEW_AGENT_DIR}/

10. Report Completion

Reply to the user:

✅ Agent "${AGENT_NAME}" (${AGENT_ID}) created successfully!

Completed:
- openclaw agents add initialized
- openclaw.json updated
- Auth, skills and USER.md copied from main
- SOUL.md / AGENTS.md generated
- agentToAgent communication configured
- JSON validation passed

⚠️ Manual steps required:
1. Restart the Gateway:
   openclaw gateway restart

2. Verify bindings:
   openclaw agents list --bindings

3. Open Telegram, find the new Bot and send /start to complete pairing

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

73.99%
按下载量换算3,749

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

未展示

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills