一键导入
oc-add-agent
Use when the user wants to add a new bot/agent to OpenClaw, or says '加 bot', '新增 agent', 'add agent', 'add bot', '多一個 bot', '再加一個'.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when the user wants to add a new bot/agent to OpenClaw, or says '加 bot', '新增 agent', 'add agent', 'add bot', '多一個 bot', '再加一個'.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when the user has an idea or feature request and wants to explore implementation approaches, or says 'brainstorm', '腦力激盪', '想辦法', 'explore idea', '有個想法', '可不可以做', 'how would we', '怎麼實現'.
Use when the user asks to search, browse, install, or audit ClawHub skills, or says '找 skill', 'search clawhub', '裝 skill', 'install skill', '安全檢查', 'audit skill', 'suggest skills', '推薦 skill', or wants to add new capabilities from ClawHub.
Use when the user asks to deploy, push, or sync openclaw.json to the remote host, or says '部署設定', '推設定', or wants to apply local config changes to the remote.
Use when the user asks to check remote host health, OpenClaw service status, or recent gateway errors, or says '檢查狀態', 'health check', '遠端狀態', '龍蝦狀態'.
Use when the user wants to pause or shelve current work due to a blocker, or says 'park', '暫存', '先放著', 'blocker', '等一下再做'.
Use when the user says 'resume', '繼續', 'pending', '撿回', '之前暫存的', or asks what was parked previously.
| name | oc-add-agent |
| description | Use when the user wants to add a new bot/agent to OpenClaw, or says '加 bot', '新增 agent', 'add agent', 'add bot', '多一個 bot', '再加一個'. |
執行前讀取 setup.json:
remote.sshAlias(以下以 ${SSH_ALIAS} 表示)remote.openclawPath(以下以 ${OPENCLAW_PATH} 表示)gateway.serviceName(以下以 ${SERVICE_NAME} 表示)agents 陣列取得確認 setup.json 存在且 onboarding.completed === true。如果沒完成 onboarding,引導使用者先完成。
從 setup.json 讀取並顯示:
目前已設定的 agents:
1. main — 我的 Agent 🤖 (TELEGRAM_BOT_TOKEN_MAIN)
一步一步說明(每步等使用者確認):
@BotFather → 開始對話/newbotbot 結尾)/setprivacy → 選你的 bot → Disableassistant、helper),不可與現有 ID 重複TELEGRAM_BOT_TOKEN_<ID大寫>),使用者可改config/openclaw.json讀取現有 config,新增:
channels.telegram.accounts 加 entry:
"<id>_bot": {
"botToken": "${<TOKEN_ENV_VAR>}",
"name": "<agent 名稱>"
}
bindings 加 match rule:
{
"agentId": "<id>",
"match": {
"channel": "telegram",
"accountId": "<id>_bot"
}
}
agents.list 加 agent 定義:
{
"id": "<id>",
"identity": {
"name": "<agent 名稱>",
"emoji": "<emoji>"
},
"workspace": "${OPENCLAW_PATH}/workspace-<workspaceDir>"
}
驗證所有 token 欄位仍為 ${VAR} 格式。
secrets/openclaw.env.template加入新的 placeholder:
<TOKEN_ENV_VAR>=<你的 Telegram Bot Token>
setup.json在 agents 陣列加入新 entry:
{
"id": "<id>",
"name": "<agent 名稱>",
"emoji": "<emoji>",
"tokenEnvVar": "<TOKEN_ENV_VAR>",
"workspaceDir": "<workspaceDir>"
}
在 workspaces/<workspaceDir>/ 建立基本結構:
USER.md、AGENTS.md、TOOLS.md、rules/behavior.md、docs/ROLECARD_SYSTEM.md、docs/EVOLUTION.md)SOUL.md、IDENTITY.md(讓使用者之後填寫)rolecards/ 目錄告訴使用者需要在遠端加入新的 token:
ssh ${SSH_ALIAS} 'echo "<TOKEN_ENV_VAR>=<使用者貼上的 token>" >> ${OPENCLAW_PATH}/secrets/openclaw.env'
注意: token 只經過 SSH 傳到遠端,不存在本地。
詢問使用者是否要立刻部署新 config:
/oc-deploy 的流程/oc-deploy 部署列出所有已完成的動作和接下來可以做的事:
workspaces/<workspaceDir>/rolecards/)workspaces/<workspaceDir>/SOUL.md、IDENTITY.md)/oc-add-agent