Agent 生成器
- 作者仓库星标 1,996
- 作者更新于 实时读取
- 作者仓库 openclaw-master-skills
- 领域
- AI 智能
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @LeoYeAI · 未声明 license
- Token 消耗评级
- 中等消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: agent-team-builder
description: > Build a custom multi-agent collaboration team on OpenClaw — step by step, with correct archite…
category: AI 智能
runtime: 无特殊运行时
---
# agent-team-builder 输出预览
## PART A: 任务判断
- 适用问题:提示词、Agent 工作流、模型评估或自动化推理。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“How This Skill Works / Phase 1: Team Design / Goal”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于提示词、Agent 工作流、模型评估或自动化推理,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“How This Skill Works / Phase 1: Team Design / Goal”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“How This Skill Works / Phase 1: Team Design / Goal”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: agent-team-builder
description: > Build a custom multi-agent collaboration team on OpenClaw — step by step, with correct archite…
category: AI 智能
source: LeoYeAI/openclaw-master-skills
---
# agent-team-builder
## 什么时候使用
- 把 AI / Agent方向的常用动作沉淀成 Agent 可调用的技能 适合处理AI Agent、提示词、模型评估与自动化推理,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查…
- 面向提示词、Agent 工作流、模型评估或自动化推理,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「How This Skill Works / Phase 1: Team Design / Goal」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "agent-team-builder" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> How This Skill Works / Phase 1: Team Design / Goal
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件、执行终端命令 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Agent Team Builder for OpenClaw
Build a custom multi-agent collaboration team on OpenClaw — step by step, with correct architecture, workspace files, routing config, and collaboration rules.
Important: This skill is based on verified OpenClaw documentation (docs.openclaw.ai) and the official GitHub repo (github.com/openclaw/openclaw). All configuration patterns, file names, and architecture decisions reflect the actual OpenClaw system as of early 2026.
How This Skill Works
This is an interactive, guided workflow. You walk the user through 8 phases:
- Team Design — Define roles, responsibilities, and collaboration model
- Architecture Planning — Single Gateway + multi-agent + channel strategy
- Agent & Workspace Setup — Create agents, workspace files, identity
- Routing & Bindings — Wire messages to the right agent
- Collaboration Rules — Group chat strategy, mention gates, ping-pong limits
- Agent-to-Agent Communication — sessions_send, sessions_spawn, allowlists
- Team Shared Memory — Cross-agent knowledge sharing mechanism
- Memory, Operations & Delivery — Per-agent memory, heartbeat, cost control, final config
At each phase, ask the user questions, validate their choices, then generate the corresponding configuration and workspace files.
Phase 1: Team Design
Goal
Help the user define their agent team composition.
Questions to Ask
What is your primary use case?
- Personal productivity (schedule, research, writing)
- Software development (code, review, deploy)
- Content creation (writing, editing, publishing)
- Business operations (strategy, analysis, execution)
- Custom / mixed
How many agents do you want? (recommend 2–5 to start; more adds complexity)
For each agent, define:
id: short lowercase identifier (e.g.,planner,coder,writer)name: display name (e.g., "🧠 Planner")role: one-sentence description of what this agent doesmode: Does it lead (orchestrator) or follow (specialist)?
Do you want an orchestrator agent?
- An orchestrator monitors all group messages and dispatches to specialists
- Specialists only respond when explicitly @-mentioned
- This is the recommended pattern for 3+ agents
Guidance
Recommended team templates (user can customize):
Dev Team (4 agents):
planner— Task decomposition, prioritization, project trackingcoder— Code implementation, debugging, technical executionreviewer— Code review, quality assurance, testingwriter— Documentation, commit messages, technical writing
Content Team (3 agents):
strategist— Content strategy, audience analysis, topic planningcreator— Writing, editing, creative outputcritic— Quality review, fact-checking, style consistency
Business Team (4 agents):
chief— Overall coordination, decision synthesisanalyst— Data analysis, market research, risk assessmentbuilder— Technical implementation, automationcommunicator— External communication, reports, presentations
Solo+ (2 agents):
main— General-purpose assistant (default agent)research— Deep research, analysis, background tasks
Phase 2: Architecture Planning
Key Architecture Facts (from official docs)
Explain these to the user clearly:
Single Gateway, Multiple Agents
- One
openclaw gatewayprocess hosts ALL agents - Each agent has its own workspace, session store, and memory index
- Agents are defined in
agents.list[]in~/.openclaw/openclaw.json - No need to run multiple Gateway processes
- One
Isolation is real
- Each agent gets: workspace directory,
agentDirfor auth/state, session transcripts under~/.openclaw/agents/<agentId>/sessions/, memory index database - Never reuse
agentDiracross agents — causes auth/session collisions
- Each agent gets: workspace directory,
Channel Strategy Ask the user which channels they want to use:
- Discord: Best for visible multi-agent group collaboration. Each agent needs its own bot account (Discord Developer Portal → one bot per agent). Enable Message Content Intent for each bot.
- Telegram: Each agent needs its own bot via BotFather. Good for controlled/private channels.
- WhatsApp: Each agent maps to a phone number/account. Good for personal use.
- Slack, Signal, iMessage, etc.: All supported. See channel guides in docs.
Discord is recommended for group collaboration because:
- Each bot has a visible identity in the server
- @mention mechanics work naturally
- Conversation threading is visible
- Multiple bots can coexist in one guild/server
Questions to Ask
- Which channel(s) will you use? (can be multiple)
- For group collaboration, which channel will be the "main stage"?
- Do you want the same agents on multiple channels, or different agents per channel?
Phase 3: Agent & Workspace Setup
Creating Agents
For each agent, the user should run:
openclaw agents add <agent-id>
Or define them in ~/.openclaw/openclaw.json:
{
agents: {
list: [
{ id: "planner", workspace: "~/.openclaw/workspace-planner" },
{ id: "coder", workspace: "~/.openclaw/workspace-coder" },
{ id: "reviewer", workspace: "~/.openclaw/workspace-reviewer" },
],
},
}
Workspace Files
Each agent's workspace follows this standard structure (per official docs):
| File | Purpose | Loaded When |
|---|---|---|
AGENTS.md |
Operating instructions, memory rules, behavior priorities | Every session |
SOUL.md |
Persona, tone, boundaries | Every session |
USER.md |
Who the user is, how to address them | Every session |
IDENTITY.md |
Agent name, vibe, emoji (created during bootstrap) | Every session |
TOOLS.md |
Notes about local tools/conventions (guidance only, does NOT control tool access) | Every session |
HEARTBEAT.md |
Optional tiny checklist for heartbeat runs | Heartbeat only |
BOOT.md |
Optional startup checklist on gateway restart | Gateway start |
BOOTSTRAP.md |
One-time first-run ritual, deleted after completion | First run only |
memory/YYYY-MM-DD*.md |
Daily memory logs (append-only) | On demand |
MEMORY.md |
Curated long-term memory | Private sessions only |
Critical correction: The official workspace does NOT include files named
ROLE-COLLAB-RULES.md,TEAM-RULEBOOK.md,TEAM-DIRECTORY.md, orGROUP_MEMORY.mdas standard OpenClaw files. These are custom additions. If the user wants collaboration rules, they should be embedded inAGENTS.mdandSOUL.md, which are the files OpenClaw actually loads every session.
Generate Workspace Files
For each agent, generate these files based on the user's team design.
SOUL.md template — Customize per agent:
# Soul of [Agent Name]
## Identity
- Name: [Display Name]
- Role: [One-line role description]
- Emoji: [Emoji identifier]
## Personality
[2-3 sentences describing tone, communication style]
## Responsibilities
[Bullet list of what this agent owns]
## Boundaries
- [What this agent should NOT do]
- [When to defer to other agents]
## Private Chat Mode
[How to behave in 1:1 conversations — act as full-service expert]
## Group Chat Mode
[How to behave in group — follow team protocol, incremental contributions only]
AGENTS.md template — Customize per agent:
# Operating Manual for [Agent Name]
## Core Behavior
- Always read IDENTITY.md and USER.md at session start
- In group chats, only respond when @-mentioned (unless you are the orchestrator)
- Write important decisions to memory/YYYY-MM-DD.md
## Memory Protocol
- Read today's and yesterday's daily log at session start
- Use memory_search for semantic recall before answering complex questions
- Write durable facts to MEMORY.md only in private sessions
- Never load MEMORY.md in group contexts
## Collaboration Protocol
- When your task is done, summarize your output clearly
- If a task is outside your role, say so and suggest which agent to @
- Never engage in back-and-forth with other agents without user involvement
## Quality Standards
[Role-specific quality requirements]
IDENTITY.md template:
# [Agent Name]
- id: [agent-id]
- name: [Display Name]
- emoji: [Emoji]
- role: [Role description]
- capabilities: [What this agent can do]
Phase 4: Routing & Bindings
How Bindings Work
Bindings route inbound messages to agents. They are evaluated in order — first match wins. More specific bindings should come before general ones.
Each binding matches on: channel, accountId, chatType, peer, guild/team IDs.
Discord Configuration
Each Discord bot = one accountId. Bind each to an agent:
{
bindings: [
{ agentId: "planner", match: { channel: "discord", accountId: "planner-bot" } },
{ agentId: "coder", match: { channel: "discord", accountId: "coder-bot" } },
{ agentId: "reviewer", match: { channel: "discord", accountId: "reviewer-bot" } },
],
channels: {
discord: {
accounts: {
"planner-bot": {
token: "${DISCORD_TOKEN_PLANNER}",
guilds: {
"<guild-id>": {
channels: {
"<collab-channel-id>": { allow: true },
},
},
},
},
"coder-bot": {
token: "${DISCORD_TOKEN_CODER}",
// ... similar guild/channel config
},
// ... other bots
},
},
},
}
Telegram Configuration
Each Telegram bot = one accountId:
{
bindings: [
{ agentId: "planner", match: { channel: "telegram", accountId: "default" } },
{ agentId: "coder", match: { channel: "telegram", accountId: "coder" } },
],
channels: {
telegram: {
accounts: {
default: { botToken: "${TELEGRAM_TOKEN_PLANNER}" },
coder: { botToken: "${TELEGRAM_TOKEN_CODER}" },
},
},
},
}
Questions to Ask
- For Discord: Have you created bot accounts in the Discord Developer Portal?
- Do you want all agents in the same guild channel, or separate channels?
- For each agent, what's their account identifier?
Phase 5: Collaboration Rules
Group Chat Strategy
The recommended pattern for multi-agent group collaboration:
Orchestrator agent: requireMention: false (sees all messages)
- Monitors all group messages
- Decides when to dispatch tasks
- Does NOT respond to everything — stays silent by default, intervenes when needed
Specialist agents: requireMention: true (only responds when @-mentioned)
- Each specialist has
mentionPatternsfor reliable triggering - Only acts when explicitly called upon
// In the orchestrator's account config:
guilds: {
"<guild-id>": {
channels: {
"<channel-id>": { allow: true, requireMention: false },
},
},
},
// In specialist accounts:
guilds: {
"<guild-id>": {
channels: {
"<channel-id>": { allow: true, requireMention: true },
},
},
},
Mention Patterns
Configure per-agent mention patterns so users can reliably summon agents:
// Per agent in agents.list[]:
{
id: "coder",
groupChat: {
mentionPatterns: ["@coder", "@engineer", "@Coder Bot"],
},
}
Agent-to-Agent Ping-Pong Limit (Group Chat Safety)
In group chat, you also want to prevent agents from endlessly replying to each other.
This is controlled by session.agentToAgent.maxPingPongTurns (range 0–5).
For group chat safety, set to 0 or 1. Full agent communication setup is in Phase 6.
{
session: {
agentToAgent: {
maxPingPongTurns: 1, // 0 = no reply-back, 1 = one exchange max
},
},
}
Group Policy
// Per channel:
channels: {
discord: {
groupPolicy: "allowlist", // recommended: explicit control
// or "open" for more permissive setups
},
},
Phase 6: Agent-to-Agent Communication
OpenClaw provides two primitives for inter-agent communication, both disabled by default.
Read references/agent-communication.md for full configuration details and patterns.
Quick Summary
1. Enable the master switch (global, not per-agent):
{ tools: { agentToAgent: { enabled: true, allow: ["planner", "coder", "reviewer", "writer"] } } }
2. Two communication primitives:
| Primitive | Use Case | Behavior |
|---|---|---|
sessions_send |
Direct agent-to-agent conversation | Synchronous, supports ping-pong (0–5 turns) |
sessions_spawn |
Delegate task to another agent | Async, isolated session, announces result back |
3. Per-agent allowlists for sessions_spawn:
{ id: "planner", subagents: { allowAgents: ["coder", "reviewer", "writer"] } }
4. Session visibility — orchestrator needs "all", specialists use default "tree":
{ tools: { sessions: { visibility: "all" } } } // For orchestrator only
5. Loop detection — always enable as safety net:
{ tools: { loopDetection: { enabled: true, detectors: { pingPong: true, genericRepeat: true } } } }
Questions to Ask
- Which agents need to talk to each other? (Draw the communication graph)
- Synchronous exchanges (
sessions_send) or async delegation (sessions_spawn)? - Should the orchestrator spawn tasks to ALL other agents?
- Max ping-pong turns? (0 = safest, 2 = practical, 5 = max)
Phase 7: Team Shared Memory
Each agent has its own isolated workspace and memory. There is no built-in
cross-agent shared memory. Read references/team-shared-memory.md for full
implementation details, setup scripts, and file templates.
The Design
Create a shared directory symlinked into every agent's workspace:
~/.openclaw/team-shared/ ← Single source of truth
├── TEAM-KNOWLEDGE.md ← Durable facts, preferences, quality standards
├── TEAM-DECISIONS.md ← Decision log with date/context/rationale
├── TEAM-STATUS.md ← Current priorities, active tasks, blockers
├── TEAM-DIRECTORY.md ← Agent IDs, session keys, mention patterns
└── projects/
├── INDEX.md ← Registry of all active projects
└── <project-name>.md ← Per-project context doc
~/.openclaw/workspace-planner/team-shared → symlink to above
~/.openclaw/workspace-coder/team-shared → symlink to above
~/.openclaw/workspace-reviewer/team-shared → symlink to above
Quick Setup
mkdir -p ~/.openclaw/team-shared/projects
# Create shared files (see references/team-shared-memory.md for templates)
# Then symlink into each workspace:
for agent in planner coder reviewer writer; do
ln -s ~/.openclaw/team-shared ~/.openclaw/workspace-$agent/team-shared
done
Why This Pattern
- All agents read/write via
memory_getand file tools — no special API needed - Changes by one agent are immediately visible to others on next turn
- Not auto-loaded into bootstrap — avoids prompt cache invalidation on every update
- Agents read on demand per AGENTS.md instructions, keeping token costs low
AGENTS.md Rules (Add to Every Agent)
## Team Shared Memory Protocol
- Before significant tasks: read team-shared/TEAM-STATUS.md
- After completing tasks: update TEAM-STATUS.md with outcome
- For team decisions: append to TEAM-DECISIONS.md with date + rationale
- For project work: read/update team-shared/projects/<project>.md
- NEVER write private user information to team-shared files
Memory Search Limitation
memory_search only indexes the current agent's workspace. Symlinked dirs may not
be indexed. Use memory_get (targeted file read) for shared files — it always works.
Phase 8: Memory, Operations & Delivery
Memory Architecture
OpenClaw's memory is file-based Markdown with semantic search.
Two standard layers (per official docs):
- Daily logs (
memory/YYYY-MM-DD.md) — append-only, day-to-day decisions and context - Long-term memory (
MEMORY.md) — curated durable facts, only loaded in private sessions
Memory tools available to agents:
memory_search— semantic recall over indexed snippets (hybrid BM25 + vector search)memory_get— targeted read of a specific file/line range
Critical correction: The article mentions
GROUP_MEMORY.mdas a standard file. This is NOT a standard OpenClaw workspace file. The official approach is:
MEMORY.mdloads only in private/main sessions (never in groups)- Group chats have their own isolated session state
- For cross-session context sharing, use a
projects/directory pattern with self-contained docs readable from any session
Memory Configuration
{
agents: {
defaults: {
compaction: {
reserveTokensFloor: 20000,
memoryFlush: {
enabled: true,
softThresholdTokens: 4000,
},
},
memorySearch: {
enabled: true,
// Auto-selects: local → OpenAI → Gemini → BM25 fallback
},
},
},
}
Cost Control Tips
- Model tiering: Use expensive models (Opus) for the orchestrator, cheaper models (Sonnet/Haiku) for specialists
- Heartbeat budget: Keep HEARTBEAT.md short to avoid token burn
- Bootstrap file limits: Default
bootstrapMaxChars: 20000per file,bootstrapTotalMaxChars: 150000total - Memory flush: Enable auto-flush before compaction to preserve context
{
agents: {
list: [
{
id: "planner",
model: { primary: "anthropic/claude-sonnet-4-20250514" },
},
{
id: "coder",
model: { primary: "anthropic/claude-sonnet-4-20250514" },
},
],
},
}
Per-Agent Tool Policies
Each agent can have its own tool allow/deny list:
{
id: "coder",
tools: {
allow: ["exec", "read", "write", "edit", "apply_patch", "browser"],
deny: ["cron"],
},
sandbox: {
mode: "all",
scope: "agent",
},
}
Phase 9: Generate & Deliver
After collecting all information, generate:
openclaw.json— Complete configuration (seereferences/openclaw-team-example.json5for full template)- Workspace files — SOUL.md, AGENTS.md, IDENTITY.md, USER.md, TOOLS.md for each agent
- Team shared directory — TEAM-KNOWLEDGE.md, TEAM-DECISIONS.md, TEAM-STATUS.md, TEAM-DIRECTORY.md
- Symlink setup script — Creates
team-shared/symlinks in every workspace - Setup script — Shell commands to create agents, wire channels, verify
- Quick-start guide — How to test the team
Verification Commands
# List all agents and their bindings
openclaw agents list --bindings
# Check channel connectivity
openclaw channels status --probe
# Validate configuration
openclaw doctor
# Restart gateway to apply changes
openclaw gateway restart
Common Corrections & Pitfalls
When guiding users, proactively correct these common misconceptions:
Architecture Misconceptions
"Each agent needs its own Gateway process" → Wrong. One Gateway hosts all agents. Multiple agents share the same server process and config file.
"Workspaces are sandboxed by default" → Wrong. Agents can access other host locations via absolute paths unless
sandboxis explicitly enabled per-agent."TOOLS.md controls tool access" → Wrong. TOOLS.md is guidance text only. Actual tool access is controlled by
agents.list[].tools.allow/denyin config.
File Name Misconceptions
Custom files like
ROLE-COLLAB-RULES.md,TEAM-RULEBOOK.md,GROUP_MEMORY.md→ These are NOT standard OpenClaw files. Put collaboration rules inAGENTS.mdandSOUL.mdwhich are loaded every session. Custom files won't auto-load."MEMORY.md loads everywhere" → Wrong. MEMORY.md only loads in private/main sessions, never in group contexts. This is a privacy protection.
Routing Misconceptions
"bindings map
channel + accountId → agentId" → Partially correct but oversimplified. Bindings can match on channel, accountId, chatType, peer (kind + id), and guild/team IDs. They are evaluated in order, first match wins."You need N×M bindings for N agents × M channels" → Not necessarily. You can use channel-wide defaults and only add specific bindings for exceptions.
Collaboration Misconceptions
"agentToAgent ping-pong set to 0 means agents can't communicate" → It means agents can't do reply-back ping-pong via
sessions_send. They can still usesessions_spawnfor sub-agent tasks, and the orchestrator can still @-mention others in group chats."Discord is the only platform for multi-agent collaboration" → Any channel works. Discord is convenient because each bot has visible identity and @mention is natural. Feishu, Slack, and others support similar patterns.
Reference: Official Workspace File List
From docs.openclaw.ai/concepts/agent-workspace:
AGENTS.md— Operating instructions (loaded every session)SOUL.md— Persona, tone, boundaries (loaded every session)USER.md— User profile (loaded every session)IDENTITY.md— Agent name/emoji (created during bootstrap)TOOLS.md— Tool notes, guidance only (loaded every session)HEARTBEAT.md— Heartbeat checklist (optional)BOOT.md— Startup checklist (optional)BOOTSTRAP.md— First-run ritual (deleted after completion)memory/YYYY-MM-DD*.md— Daily memory logsMEMORY.md— Long-term memory (private sessions only)skills/— Workspace-specific skills
For the complete multi-agent reference, read:
references/architecture-corrections.md— Common misconceptions and correctionsreferences/openclaw-team-example.json5— Full example configuration file
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核