Token导航 LogoToken导航

Agent Skill · 效率

safe-subagent-spawn(安全子 Agent 生成)

safe-subagent-spawn 用于补充效率相关能力,适合在 OpenClaw 中需要让 Agent 承接效率相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

safe-subagent-spawn 是效率类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为执行命令;许可证为 MIT-0,第三方扫描已通过,按安装量在效率类的 21,003 个 Skill 里排第 13,581。

总安装 3,672周安装 153GitHub Stars 1下载 1,224核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
1.0.0

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install safe-subagent-spawn

这个 Skill 是做什么的

效率类 Skill 把重复的整理、汇总、转换工作交给助手完成,减少手工复制粘贴。

safe-subagent-spawn 安全创建和管理子代理,避免直接调用 session_spawn。它适用于需要独立助手的复杂任务分解场景。安装后可在 OpenClaw 中调用,需定义子代理权限。使用前应验证包装器逻辑,防止权限逃逸。

safe-subagent-spawn 属于效率类 Skill,可作为该场景下的辅助能力补充。建议限制子代理资源使用以避免性能问题。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install safe-subagent-spawn;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

safe-subagent-spawn 怎么安装?

在终端执行 openclaw skills install safe-subagent-spawn。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

safe-subagent-spawn 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

safe-subagent-spawn 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 openclaw skills install safe-subagent-spawn 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

safe-subagent-spawn 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

safe-subagent-spawn 用的人多吗?

公开数据是累计安装 3,672 次,近一周安装 153 次,下载 1,224 次,GitHub 1 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

safe-subagent-spawn 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理效率类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

效率类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
github

GitHub 代码协作 · OpenClaw

7,632,918545需要联网MIT-0通过
nano-pdf

Nano PDF 文档 · OpenClaw

4,249,476231需要联网MIT-0通过
auto-updater

自动更新程序 · OpenClaw

2,964,063386操作浏览器MIT-0通过
video-frames

视频帧 · OpenClaw

2,621,304112需要联网MIT-0通过
gemini

Gemini 助手 · OpenClaw

2,547,39648需要联网MIT-0有提醒
safe-subagent-spawn

安全子 Agent 生成 · 本页

3,6721执行命令MIT-0通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
safe-subagent-spawn
description
|

Safe Subagent Spawn

Use this skill whenever you need to create a subagent. Do not call sessions_spawn directly.

Hard Rules

  1. Never call sessions_spawn directly. Always use scripts/safe_subagent_spawn.py to generate the payload.
  2. Enforced invariants (built into the script):

- runtime: "subagent" - mode: "run" - thread: false - cleanup: "keep" (preserve sessions to expose subagent issues) - streamTo: never included

  1. NEVER confuse agentId with model. agentId must be a real agent id from agents.list[].id — never a model alias or provider/model string.

- agentId is optional and rarely needed. Omit it unless the user explicitly names a target agent that exists in agents.list[].id. - To select a model, use the model field. - ✗ agentId: "google/gemini-2.5-pro" — WRONG!! this is a model string - ✓ agentId: "main" — correct, a real agent id - ✓ omit agentId entirely — correct default

  1. The parent agent must never read a context file after creating it. Use scripts/append_to_context.py for all appends. The parent tracks each context file by its task slug (visible in the file's Metadata section and filename) and file path.
  2. No summary mechanism. Every child output is preserved verbatim.
  3. Context files are permanent and must not be deleted.
  4. Multi-round tasks are strictly sequential. The parent must wait for the child to return (Step 4) before appending a new directive and spawning the next round (Step 5). Never spawn round N+1 before receiving round N's output, unless the wait times out.
  5. No automatic retry on timeout. If a subagent times out, the parent must stop the task and report the timeout to the user. Do not silently retry or spawn a replacement subagent.
  6. Task slugs must use only a-z, 0-9, and - (lowercase ASCII letters, digits, and hyphens). Must start and end with an alphanumeric character. Maximum 48 characters. The script validates this and rejects invalid names — no silent transformation.

Scripts

ScriptPurpose
scripts/create_context.pyCreate a new context file (initial metadata + background + first directive)
scripts/safe_subagent_spawn.pyGenerate a spawn payload from an existing context file
scripts/append_to_context.pyAppend a directive, child output, or external message to a context file
All scripts/ paths are relative to this skill's installation directory.

Context File Reuse — Same Task vs New Task

When spawning a subagent, the parent must decide whether to reuse an existing context file or create a new one.

Reuse the existing context file when:

  • The new subagent is a continuation of the same logical task.
  • The new subagent needs the output of a prior subagent to proceed.
  • The user's request is a follow-up or iteration on a previous delegation.

Create a new context file when:

  • The task is unrelated to any prior subagent delegation.
  • The task requires a clean context with no prior history.
  • A different user request introduces a separate objective.

When in doubt, create a new file. Unnecessary context is worse than missing context.

Workflow

1. New task — create context file

scripts/create_context.py \
  --task "descriptive-task-slug" \
  --background "the user's original request or relevant background" \
  --directive "clear instructions for the child agent"

--directive is optional. Omit it to create a context file with only metadata and background — useful when you need to collect information (via External Messages) before formulating the first directive. A context file without a directive cannot be spawned until a directive is appended (the spawn script enforces this).

Output (stdout): the absolute path to the newly created context file.

1b. (Optional) Deferred directive — collect information first

If the context file was created without --directive, append External Messages to supply information before defining the task:

scripts/append_to_context.py \
  --context-file "<context_path>" \
  --role external-message \
  --content "information gathered from an external source"

When ready, append the first directive:

scripts/append_to_context.py \
  --context-file "<context_path>" \
  --role directive \
  --content "instructions for the child agent, informed by the external messages above"

Then proceed to Step 2 to generate the spawn payload.

2. Generate spawn payload

The context file must contain at least one Directive section. The script validates this and rejects files that have no directive.

scripts/safe_subagent_spawn.py \
  --context-file "<context_path>" \
  --timeout-seconds 300

Optional parameters:

  • --child-model "provider/model-name" — Override the child agent's model. Maps to the model field (string, optional) of sessions_spawn, overriding the parent's default model.
  • --agent-id "agent-name" — Target a specific agent id (must come from agents.list[].id). Rarely needed — omit unless the user explicitly names an existing agent.

--timeout-seconds should be determined by the parent agent based on task complexity. Default is 300 seconds. Use a shorter value for simple tasks and a longer value for complex ones.

Output (JSON): the spawn payload. Use it directly when calling sessions_spawn. Do not modify or add fields.

3. Spawn the subagent

Pass the JSON output from Step 2 directly to sessions_spawn as the complete argument:

sessions_spawn(<complete JSON payload from Step 2>)

Do not manually decompose or reassemble fields. The script output is the ready-to-use payload.

4. After child returns — record output

Append the child's full verbatim output to the context file:

scripts/append_to_context.py \
  --context-file "<context_path>" \
  --role child-output <<'CHILD_EOF'
<full verbatim child output>
CHILD_EOF

For very long output, use a temp file instead:

# Write output to temp file first, then append
scripts/append_to_context.py \
  --context-file "<context_path>" \
  --role child-output \
  --content-file /tmp/child_output.txt

5. (Optional) Append external messages

External messages can be appended in two positions:

  • Before the first directive — when the context file was created without --directive, to supply information before formulating the first task (see Step 1b).
  • Between a Child Output and the next Directive — to feed incremental information into subsequent rounds.

If the parent has incrementally obtained information (e.g., streaming results, user replies, external API responses), append it as external messages before appending the next directive:

scripts/append_to_context.py \
  --context-file "<context_path>" \
  --role external-message \
  --content "first piece of information"

scripts/append_to_context.py \
  --context-file "<context_path>" \
  --role external-message \
  --content "second piece of information, appended to the same section"

External messages have no round numbers and no timestamps. Multiple consecutive appends are merged into a single ## External Message section — no new header is created until the next directive starts a new round.

External messages can only appear (1) after Background and before the first Directive, or (2) between a Child Output and the next Directive. The script enforces this ordering.

6. Continue task — append directive and spawn next child

If the task requires another round, append a new directive and spawn:

# Append new directive
scripts/append_to_context.py \
  --context-file "<context_path>" \
  --role directive \
  --content "new instructions for the next round"

# Generate spawn payload (same as Step 2)
scripts/safe_subagent_spawn.py \
  --context-file "<context_path>" \
  --timeout-seconds 300

Then spawn using the output payload (same as Step 3).

The next child reads the entire context file — including all prior directives and child outputs — and executes the latest directive.

Append Format

scripts/append_to_context.py auto-detects round numbers and appends structured entries:

---

## Directive — Round 2 — 2026-04-02T12:00:00+00:00

<parent's instructions for this round>

---

## Child Output — Round 2 — 2026-04-02T12:05:00+00:00

<full verbatim output from child agent>

For external messages (no round number, no timestamp; consecutive appends merge into one section):

---

## External Message

<first piece of information>

<second piece of information, appended without a new header>

Content can be provided via:

  • --content "inline text" — for short directives
  • --content-file /path/to/file — for long content stored in a file
  • stdin (heredoc) — for piping content directly

Deduplication: If the content being appended is identical to the latest existing entry of the same role, the script silently discards the duplicate and exits successfully (exit code 0).

Context File Format

All context files are stored by default under sub-agents/ in default workspace folder, named {timestamp}-{task-slug}.md.

When --directive is omitted during creation, the file initially contains only Metadata, Standing Instructions, and Background. External Messages and the first Directive are appended later via append_to_context.py.

# Subagent Context: {task-slug}

## Metadata
- Created: {ISO-8601 timestamp}
- Task: {task-slug}
- Context File: {absolute path}

## Standing Instructions
- Do not self-append or modify this file. It is read-only context provided by the parent.
- Do not spawn additional subagents inside this subagent. All delegation must come from the parent.

## Background
{user's original request or relevant background information}

---

## Directive — Round 1 — {ISO-8601 timestamp}

{clear instructions for the child agent}

---

## Child Output — Round 1 — {ISO-8601 timestamp}

{full verbatim output from child agent}

---

## Directive — Round 2 — {ISO-8601 timestamp}

{new instructions for the next round}

---

## Child Output — Round 2 — {ISO-8601 timestamp}

{full verbatim output from child agent}

---

## External Message

{incrementally appended information from parent, before next directive}

---

## Directive — Round 3 — {ISO-8601 timestamp}

{instructions that can reference the external messages above}

When the context file is created without a directive (deferred directive pattern), the initial portion looks like:

# Subagent Context: {task-slug}

## Metadata
- Created: {ISO-8601 timestamp}
- Task: {task-slug}
- Context File: {absolute path}

## Standing Instructions
- Do not self-append or modify this file. It is read-only context provided by the parent.
- Do not spawn additional subagents inside this subagent. All delegation must come from the parent.

## Background
{user's original request or relevant background information}

---

## External Message

{information collected before the first directive}

---

## Directive — Round 1 — {ISO-8601 timestamp}

{instructions informed by the external messages above}

Design Principles

  • Full-text append, no summaries. Every child output is preserved verbatim. The parent never compresses or summarizes. Subsequent children read the complete history.
  • Parent never reads back. The parent writes the initial file and appends entries via helper scripts. It never reads the file into its own context window. Helper scripts may read the file internally (e.g., to auto-detect round numbers), but this is transparent to the parent.
  • One file per logical task. Multi-round tasks share a single context file. Unrelated tasks get separate files.
  • Permanent retention. Context files are never deleted. They serve as a permanent audit trail.
  • Session compaction is safe. Because context files are the persistent store for all subagent interactions, the parent's session can be compacted using the platform's default rules without losing information. Context files ensure continuity across compacted sessions.

Error Handling

If any step in the workflow fails — script error, subagent timeout, or wrapper unavailable:

  1. Stop immediately. Do not retry, work around, or guess at a fix.
  2. Report to the user in detail: include the failed command, exit code, and full error output.
  3. Do not fall back to calling sessions_spawn directly.

平台分布

OpenClaw

92.99%
按下载量换算1,138

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 openclaw skills install safe-subagent-spawn 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills