← Back to Skills Marketplace
limoxt

Agent Forge

by limoxt · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
283
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install agent-forge
Description
Create and deploy independent OpenClaw agents via an 11-step interview, generating personalized files, configuring tools, channels, permissions, and updating...
README (SKILL.md)

触发方式

用户说以下任意短语时,启动 Agent Forge:

  • "用agent forge skill创建一个子代理"
  • "@agent-forge"
  • "创建一个agent"
  • "新建一个agent"

Agent Forge v2

Overview

Agent Forge 通过 11 步访谈创建完整、独立、可运行的 OpenClaw agent。

v2 核心改进:

  • SOUL.md / AGENTS.md / IDENTITY.md 由 Claude 根据访谈结果直接生成(不走脚本模板)
  • 自动更新 gateway config(allowAgents + agentToAgent)
  • 完整性自检:Claude 对比访谈结果验证文件,不完整则就地修复

11-Step Workflow

Step 1: 命名

问: "这个 agent 叫什么名字?"

  • Agent ID(小写 + 连字符,如 code-reviewersales-bot
  • 决定 workspace 路径:~/.openclaw/workspace-{id}/

Step 2: 模型选择

问: "用哪个模型?" 选项:

  • minimax-portal/MiniMax-M2.5 — 快速廉价,默认首选
  • kimi-coding/k2p5 — 编程/推理
  • google/gemini-3.1-pro-preview — 研究/长文本
  • anthropic/claude-sonnet-4-6 — 复杂推理(贵)
  • openrouter/auto — 自动选最优

Step 3: 核心职责

问: "这个 agent 的核心职责是什么?"

  • 主要任务描述
  • 成功指标
  • 关键交付物

Step 4: 频道

问: "监听哪些频道?"

  • telegramdiscordfeishu,可多选

Step 5: 工具权限

根据角色推荐工具集,向用户确认:

  • 基础:read, write, memory_search, memory_get
  • 执行:exec
  • 网络:web_search, web_fetch
  • 通信:sessions_spawn, sessions_send, sessions_list, message
  • 高级:browser, cron, session_status, subagents, image

Step 6: Sandbox 策略

问: "Sandbox 级别?"

  • exec-only — 仅 exec 受限(推荐默认)
  • all — 完全隔离
  • none — 无限制(仅可信 agent)

Step 7: 个性与风格

问: "这个 agent 的性格/风格?"

  • 精炼关键词(如:sharp、autonomous、data-driven)
  • 核心使命一句话

Step 8: Skill 路径

问: "这个 agent 需要哪些专属 skill?存放路径?"

  • 记录 skill 路径,写入 AGENTS.md

Step 9: 生成核心文件(Claude 直接写,不走脚本)

先执行脚本创建目录和 scaffold:

bash ~/.openclaw/workspace/skills/agent-forge/scripts/deploy-agent.sh \
  "{agent-id}" \
  "{model}" \
  "{role}" \
  "{tools}" \
  "{channels}" \
  "{sandbox}" \
  "{personality}"

然后 Claude 根据访谈结果直接写以下三个文件:

IDENTITY.md

写入路径:~/.openclaw/workspace-{agent-id}/IDENTITY.md

必须包含:

  • **Name:** — agent 的名字/昵称
  • **Creature:** — 角色定位(如 Autonomous Research Engine)
  • **Role:** — 职责一句话
  • **Vibe:** — 3-5 个性格关键词
  • **Emoji:** — 专属 emoji
  • **Mission:** — 核心使命

SOUL.md

写入路径:~/.openclaw/workspace-{agent-id}/SOUL.md

必须包含:

  • ## Core Identity — Role、Model、Mission、Tone
  • ## Execution Rules — 执行风格、决策原则、错误处理
  • ## Reporting Style — ❌错误示例 / ✅正确示例
  • ## Revenue Orientation — 如何将职责转化为收入
  • ## Boundaries — 禁止事项
  • ## Continuity — 每次启动读哪些文件

AGENTS.md

写入路径:~/.openclaw/workspace-{agent-id}/AGENTS.md

必须包含:

  • ## About This Agent — ID、Model、Role、Workspace、Channels
  • ## Session Startup — 启动序列(读哪些文件,按什么顺序)
  • ## Skills — skill 名称 + 路径 + 用途
  • ## 跨 Agent 通信协议 — 见下方模板
  • ## Team Registry — 可以联系的其他 agent(从 main AGENTS.md 同步)

跨 Agent 通信协议模板(必须包含):

## 跨 Agent 通信协议

### 何时用 sessions_spawn vs sessions_send

| 场景 | 方法 | 原因 |
|------|------|------|
| 当前回合必须拿到最终结果 | 阻塞式路径:`sessions_send(timeoutSeconds>0)` 或 `subagents` | 不把 fire-and-forget 当同步执行 |
| 派发独立后台任务(允许稍后完成) | `sessions_spawn(agentId="target-id", task="...")` | 仅用于真正异步的后台工作 |
| 向已活跃 agent 发消息 | `sessions_send(sessionKey="...", message="...")` | 需要目标 agent 有活跃 session |

### 查找目标 agent 的 sessionKey
1. 调用 `sessions_list()` 查看所有活跃 session
2. 找到 label 匹配目标 agent ID 的 session
3. 取其 `sessionKey` 传入 `sessions_send`

### 注意事项
- `sessions_spawn` 受 `subagents.allowAgents` 控制
- `sessions_send` 受 `tools.agentToAgent` 控制
- 两者都需要目标 agent ID 在相应白名单中
- 不要默认优先 `sessions_spawn`。只有后台异步工作才使用它。

### 可联系的 Agent
(从 main AGENTS.md Team Registry 同步当前团队列表)

Step 10: Gateway Config 自动更新

文件写入完成后,立即调用 gateway config.patch 更新:

  1. agents.list[main].subagents.allowAgents — 追加新 agent ID
  2. tools.agentToAgent.allow — 追加新 agent ID
  3. tools.sessions.visibility — 确保为 "all"

示例 patch(以 new-agent 为例):

{
  "agents": {
    "list": [
      {
        "id": "main",
        "subagents": {
          "allowAgents": ["executor", "research-master", "content-master", "new-agent"]
        }
      }
    ]
  },
  "tools": {
    "sessions": { "visibility": "all" },
    "agentToAgent": {
      "enabled": true,
      "allow": ["main", "content-master", "research-master", "new-agent"]
    }
  }
}

⚠️ 注意: config.patch 使用深度合并,agents.list 数组合并规则是按 id 匹配更新。只传需要修改的字段即可,不会覆盖其他 agent 配置。

Step 11: 完整性自检

Claude 读取生成的三个文件,对比访谈结果逐项检查:

检查清单:

文件 必须包含 检查方式
IDENTITY.md Name/Creature/Role/Vibe/Emoji/Mission 全部非空 逐行检查
SOUL.md 5个必须 section 全部存在且有实质内容 检查 ## 标题 + 内容长度
AGENTS.md 跨 agent 通信协议表格存在、Session Startup 存在、Skills 存在 检查关键字

自检结果:

  • ✅ 全部通过 → 输出文件摘要给用户确认
  • ⚠️ 有缺失 → 就地修复,修复后重新自检,然后输出摘要

输出摘要格式:

✅ Agent [{agent-id}] 部署完成

📁 文件状态:
- IDENTITY.md ✅ — {name}, {emoji}, {vibe关键词}
- SOUL.md ✅ — {mission一句话}
- AGENTS.md ✅ — {skill数量} skills, 跨 agent 协议 ✓
- USER.md ✅ — 从 main 复制 + agent 差异化
- HEARTBEAT.md ✅
- MEMORY.md ✅
- TOOLS.md ✅

⚙️ Gateway Config:
- allowAgents: {完整列表}
- agentToAgent.allow: {完整列表}
- sessions.visibility: all

📋 下一步(需要手动完成):
1. 在 openclaw.json 中为此 agent 添加完整配置(model、workspace、tools)
2. 如需 Telegram 频道:添加 botToken 到 channels.telegram.accounts
3. 添加 channel binding:agentId + match.accountId

生成文件目录结构

~/.openclaw/
├── agents/
│   └── {agent-id}/
│       └── agent/
│           └── config.json
└── workspace-{agent-id}/
    ├── SOUL.md        ← Claude 写(访谈驱动)
    ├── AGENTS.md      ← Claude 写(访谈驱动)
    ├── IDENTITY.md    ← Claude 写(访谈驱动)
    ├── USER.md        ← 脚本写(从 main 复制 + agent diff)
    ├── HEARTBEAT.md   ← 脚本写
    ├── MEMORY.md      ← 脚本写
    ├── TOOLS.md       ← 脚本写
    └── memory/

Best Practices

  1. SOUL/AGENTS/IDENTITY 必须由 Claude 写 — 脚本模板太通用,无法体现 agent 个性
  2. 访谈完成后立即写文件 — 不要"记在脑子里"再写
  3. 写完立即自检 — 不等用户问
  4. Gateway config 必须更新 — 否则 main 无法 spawn 新 agent
  5. 自检摘要给用户确认 — 这是 agent 上线前最后一道门

Resources

File Purpose
scripts/deploy-agent.sh 创建目录 + scaffold 文件(USER/HEARTBEAT/MEMORY/TOOLS)
scripts/remove-agent.sh 删除 agent 及清理
references/openclaw-multi-agent.md 架构参考
Usage Guidance
This skill appears to implement what it claims (scaffolding agent workspaces, registering agents, and generating files), but it also asks to automatically modify global gateway configuration and write system-wide files. Before installing or running it: 1) Review deploy-agent.sh and remove-agent.sh line-by-line and test them in a safe sandbox or throwaway environment to confirm their behavior. 2) Back up your ~/.openclaw workspace and main AGENTS.md and any gateway config before allowing automatic patches. 3) Confirm who/what will execute gateway config.patch and that appropriate admin credentials/approval are required — the skill does not declare those credentials. 4) Limit tool permissions and sandbox level for new agents (avoid 'none' sandbox and be cautious granting exec/web_fetch/subagents). 5) Verify the platform’s audit/logging so you can track changes to gateway config and agent registries. 6) If you cannot accept automatic global config changes, do not permit autonomous patching — instead require a manual, reviewed change request. If you want more confidence, provide the exact gateway config API/CLI used and confirm which credential or role is required for config.patch so the permission gap can be evaluated.
Capability Analysis
Type: OpenClaw Skill Name: agent-forge Version: 1.0.0 The 'agent-forge' skill bundle is a meta-utility designed to automate the creation, configuration, and removal of other OpenClaw agents. It possesses high-privilege capabilities, specifically the instruction in SKILL.md to perform a 'gateway config.patch' to modify system-wide permissions (e.g., allowAgents, agentToAgent) and the execution of shell scripts (deploy-agent.sh, remove-agent.sh) that perform recursive deletions and file modifications within the ~/.openclaw directory. While these functions are consistent with the tool's stated purpose of agent management, the ability to programmatically alter security boundaries and create new execution environments warrants a suspicious classification due to the high potential for abuse if the agent is misdirected.
Capability Assessment
Purpose & Capability
The name/description (create and deploy agents, configure channels/tools, update registries) matches the provided scripts and SKILL.md: deploy-agent.sh scaffolds workspaces, registers the agent in the main AGENTS.md, create config.json and scaffold files; the SKILL.md describes Claude writing SOUL/IDENTITY/AGENTS and patching gateway config. Nothing obvious is requested that is unnecessary for the stated goal. Note: automatic gateway config changes are powerful but plausibly needed to allow inter-agent comms.
Instruction Scope
Runtime instructions direct writing and editing of many user files under ~/.openclaw (workspaces, AGENTS.md, config.json) and explicitly instruct updating gateway config (allowAgents, agentToAgent.allow, sessions.visibility). They also require Claude to generate and repair core agent files autonomously. Those actions go beyond simple scaffolding because they change system-wide visibility/allow-lists and grant inter-agent communications; the SKILL.md gives broad discretion (self-heal, immediate patching) which increases risk if misused.
Install Mechanism
No install spec or remote downloads. The skill is instruction-heavy with three local scripts only. There is no evidence of network-based install or arbitrary code fetched at install time.
Credentials
The skill declares no required env vars or credentials (scripts use OPENCLAW_HOME with a sensible default). However SKILL.md instructs performing gateway config.patch (system-level config changes) which typically requires admin/API privileges not declared here. The lack of an explicit required credential or declared privilege for modifying gateway settings is a transparency gap and should be clarified before use.
Persistence & Privilege
The skill does not request always:true and is user-invocable, but it explicitly instructs automatic updates to global gateway configuration (sessions.visibility -> 'all', agent allow lists). Modifying global gateway settings is a high-impact change — the skill can enlarge inter-agent communication scope and should only be allowed with explicit admin consent and review. The scripts also edit main AGENTS.md (team registry), which is a cross-agent artifact.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install agent-forge
  3. After installation, invoke the skill by name or use /agent-forge
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial publish
Metadata
Slug agent-forge
Version 1.0.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is Agent Forge?

Create and deploy independent OpenClaw agents via an 11-step interview, generating personalized files, configuring tools, channels, permissions, and updating... It is an AI Agent Skill for Claude Code / OpenClaw, with 283 downloads so far.

How do I install Agent Forge?

Run "/install agent-forge" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Agent Forge free?

Yes, Agent Forge is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Agent Forge support?

Agent Forge is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Agent Forge?

It is built and maintained by limoxt (@limoxt); the current version is v1.0.0.

💬 Comments