Token导航 LogoToken导航

Agent Skill · 效率

recursive-spawn(递归生成)

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

recursive-spawn 是效率类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为接触敏感数据;许可证为 MIT-0,第三方扫描已通过,按安装量在效率类的 21,003 个 Skill 里排第 11,240。

总安装 4,703周安装 194GitHub Stars 公开资料未说明下载 1,536核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install recursive-spawn

这个 Skill 是做什么的

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

用于补充效率相关能力,适合处理复杂并行任务。可使 OpenClaw 代理生成子代理实例分解大任务。当任务太大或太复杂时启用此技能。recursive-spawn 属于效率类 Skill,可作为该场景下的辅助能力补充。通过 clawhub 安装,建议确认权限范围和维护状态。需注意是否会触发联网、命令执行或文件读写操作。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

recursive-spawn 怎么安装?

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

recursive-spawn 支持哪些 AI 工具?

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

recursive-spawn 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

recursive-spawn 是免费的吗?

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

recursive-spawn 用的人多吗?

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

recursive-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有提醒
recursive-spawn

递归生成 · 本页

4,703—接触敏感数据MIT-0通过

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

SKILL.md 原文

name
openclaw-spawner
description
>
env
>
security
>
CREDENTIAL
Set the provider-specific API key env var for your chosen model. Never embed keys in payloads or snapshots.
FILESYSTEM
Passing file-access tools to children grants them read/write access to arbitrary paths — only pass tools you trust.
TOOLS
Tools must be in OpenAI function-call format — LiteLLM translates them per provider automatically.

Openclaw Spawner

Allows an Openclaw agent to spawn child Openclaw agents, passing them exactly the context they need to carry out their piece of work and report results back.

Helper script: scripts/spawn_openclaw.py — copy this into your project and import from it. It contains spawn_openclaw(), spawn_openclaw_async(), is_error(), and read_result().

Multi-provider: Uses LiteLLM — pass any supported model string via the model= argument. Default is "anthropic/claude-opus-4-6".

Requires: litellm Python package (pip install litellm) and the API key env var for your chosen provider (e.g. ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY).

Tool format: OpenAI function-call format. LiteLLM translates to each provider's native format automatically.


Security Notes

Credential: spawn_openclaw.py uses LiteLLM to call your chosen provider. Set the matching API key env var (e.g. ANTHROPIC_API_KEY, OPENAI_API_KEY). Never put keys in a payload or snapshot.
Tool format: Tools must be in OpenAI function-call format. LiteLLM translates them to each provider's native format automatically.
Filesystem access: Passing tools= to a child agent grants that child whatever capabilities those tools carry. File-access tools allow children to read and write arbitrary paths. Only supply tools you would trust the parent to use directly. When in doubt, omit tools= — the child will return results in its summary text.
Snapshot sanitization: progress_so_far is sent to the Anthropic API and injected into the child's context. Before spawning, review snapshots and strip any secrets, credentials, personal data, or other sensitive information.

When to Spawn

Spawn a child agent when any of these are true:

  • The remaining task has a clearly separable sub-task that can run independently.
  • Two or more subtasks can proceed in parallel, saving wall-clock time.
  • The current agent's context window is approaching its limit and a fresh context would help.
  • A sub-task requires different tools, permissions, or specialization.
  • The user explicitly asks to spawn / delegate / parallelize.

Do not spawn for trivial one-step tasks; keep it in the current agent.


Spawn Depth Limit

MAX_DEPTH = 3 (configurable in scripts/spawn_openclaw.py).

DepthRole
0Root / parent agent
1Direct child (default spawn)
2Grandchild (only if child's sub_task explicitly permits spawning)
3+Blocked — raises ValueError

Always pass depth=<current_depth + 1> when calling spawn_openclaw() from inside a child.


Spawn Payload Schema

Every spawn call must include these three fields:

{
  "main_task_title": "<short human-readable title of the overall parent task>",
  "progress_so_far": "<markdown summary of what has already been done, decisions made, artefacts produced, and anything the sub-agent must know to avoid redoing work>",
  "sub_task": "<clear, self-contained description of exactly what this child agent must do, including expected output format and where/how to return results>"
}

Field Guidelines

FieldRules
main_task_title≤ 10 words. Stable across all children of the same parent.
progress_so_farInclude: steps completed, key decisions, files written, variables/state the child needs. Exclude: raw data the child doesn't need. Keep it dense but readable.
sub_taskMust be self-contained. Assume the child has zero memory of the parent conversation. Include: what to do, inputs, expected output format, where to put results (file path, return value, etc.).

Step-by-Step Spawning Protocol

1 — Decide to Spawn

Confirm the sub-task is genuinely separable. If in doubt, handle it yourself.

2 — Freeze Parent State

Before spawning, write a progress snapshot. This becomes progress_so_far for the child and serves as the parent's own checkpoint in case it needs to resume.

Sanitize before spawning. progress_so_far is sent to the Anthropic API and injected into the child's context. Remove any secrets, API keys, passwords, tokens, or personal data before including them in the snapshot.
## Progress Snapshot — <main_task_title>
**Completed:**
- <step 1>
- <step 2>

**Artifacts produced:**
- <file or output name>: <one-line description>

**Decisions made:**
- <decision>: <rationale>

**Pending (what the child will handle):**
- <sub-task description>

3 — Build the Spawn Payload

Fill in the three required fields from the snapshot above.

4 — Spawn the Openclaw Sub-Instance

Import from scripts/spawn_openclaw.py:

Important: Without tools=, the child is a pure language model — it can reason and produce text but cannot read or write files. If the sub_task requires file I/O, pass the appropriate tool definitions (e.g. Anthropic computer-use tools, custom file tools). When tools are omitted, collect the child's result from the summary string directly rather than calling read_result().
from spawn_openclaw import spawn_openclaw, is_error, read_result

# my_tools = [...]  # OpenAI function-call format tools if the child needs file I/O

payload = {
    "main_task_title": "Refactor authentication module",
    "progress_so_far": (
        "## Progress Snapshot\
"
        "**Completed:**\
- Audited existing auth flow\
- Identified 3 outdated JWT helpers\
\
"
        "**Artifacts produced:**\
- `/tmp/audit_report.md`: full list of issues\
\
"
        "**Decisions made:**\
- Use PyJWT 2.x API; drop legacy HS256 fallback\
\
"
        "**Pending (child handles):**\
- Rewrite auth/jwt_helpers.py per audit report"
    ),
    "sub_task": (
        "Rewrite `/src/auth/jwt_helpers.py` using PyJWT 2.x. "
        "Read `/tmp/audit_report.md` for issues to fix. "
        "Write the rewritten file to `/tmp/jwt_helpers_new.py` and a "
        "one-paragraph summary to `/tmp/jwt_helpers_changes.md`."
    ),
}

try:
    # Swap model= to use any LiteLLM-supported provider:
    # "openai/gpt-4o", "gemini/gemini-2.0-flash", "groq/llama-3.3-70b-versatile", etc.
    summary = spawn_openclaw(payload, depth=1, model="anthropic/claude-opus-4-6", tools=my_tools)
except (ValueError, FileNotFoundError) as exc:
    raise  # bad depth, missing payload key, or SKILL.md not found — fix the call

if is_error(summary):
    print("Child failed:", summary)
else:
    result = read_result("/tmp/jwt_helpers_changes.md")
    if result is None:
        print("WARNING: child did not write expected result file.")

If SKILL.md is not adjacent to spawn_openclaw.py, pass the path explicitly:

import pathlib
summary = spawn_openclaw(payload, depth=1, skill_path=pathlib.Path("/your/path/to/SKILL.md"))

5 — Await and Integrate Results

  1. Check is_error(summary) — handle failures before reading files.
  2. Use read_result(path) to safely read child output; treat None as child failure.
  3. Merge into parent progress snapshot.
  4. Continue with the next step of the parent task — or spawn another child if needed.

Spawning Strategies

StrategyWhen to useParent blocks?
SequentialChild output is needed for next parent stepYes, until child done
Parallel-gatherMultiple independent children; parent needs all before continuingYes, until all done
Fire-and-forgetChild works on a separable track; parent has its own work nowNo — merge later

Strategy A — Sequential

Use spawn_openclaw(payload, depth=1) as shown in Step 4. Read result, check for errors, continue.


Strategy B — Parallel Gather

import asyncio
from spawn_openclaw import spawn_openclaw_async, is_error, read_result

async def main():
    payloads = [
        {
            "main_task_title": "Generate market research report",
            "progress_so_far": "Outline approved. Three sections assigned in parallel.",
            "sub_task": "Write 'Competitive Landscape' (600 words). Save to /tmp/section_competitive.md."
        },
        {
            "main_task_title": "Generate market research report",
            "progress_so_far": "Outline approved. Three sections assigned in parallel.",
            "sub_task": "Write 'Customer Segments' (600 words). Save to /tmp/section_customers.md."
        },
        {
            "main_task_title": "Generate market research report",
            "progress_so_far": "Outline approved. Three sections assigned in parallel.",
            "sub_task": "Write 'Market Trends' (600 words). Save to /tmp/section_trends.md."
        },
    ]

    summaries = await asyncio.gather(
        *[spawn_openclaw_async(p, depth=1, model="openai/gpt-4o", tools=my_tools) for p in payloads],
        return_exceptions=True,
    )

    result_paths = [
        "/tmp/section_competitive.md",
        "/tmp/section_customers.md",
        "/tmp/section_trends.md",
    ]

    for summary, path in zip(summaries, result_paths):
        if isinstance(summary, BaseException):
            print(f"Child raised exception for {path}: {summary}")
            continue
        if is_error(summary):
            print(f"Child failed for {path}:", summary)
            continue
        content = read_result(path)
        if content is None:
            print(f"WARNING: no result file at {path}")
        else:
            print(f"Merging {path} ({len(content)} chars)")
            # merge content into parent output ...

Strategy C — Fire-and-Forget

The parent delegates a sub-task and immediately continues its own work. The child writes results to a known file path. The parent checks at a planned merge point.

Parent:  ──[spawn child]──────────────────────────[merge point]──▶ continue
Child:            └──[work independently]──[write result file]──▶ done
import asyncio
from spawn_openclaw import spawn_openclaw_async, is_error, read_result

async def main():
    child_result_path = "/tmp/child_analysis.md"
    payload = {
        "main_task_title": "Refactor authentication module",
        "progress_so_far": (
            "Audit complete. Parent is now rewriting core auth logic. "
            "Child is assigned to analyse test coverage gaps in parallel."
        ),
        "sub_task": (
            f"Read `/tmp/audit_report.md`. Identify which functions lack test coverage. "
            f"Write a markdown report of gaps to `{child_result_path}`. "
            f"Include function name, file, and suggested test cases for each gap."
        ),
    }

    # Spawn — returns immediately, child runs in background
    child_task = asyncio.create_task(
        spawn_openclaw_async(payload, depth=1, model="anthropic/claude-opus-4-6", tools=my_tools)
    )

    # Parent does its OWN work right now
    await do_parent_work()

    # Merge point — collect child
    try:
        summary = await child_task
    except (ValueError, FileNotFoundError) as exc:
        print("Child raised configuration error:", exc)
        return
    if is_error(summary):
        print("Child failed:", summary)
    else:
        content = read_result(child_result_path)
        if content is None:
            print("WARNING: child did not write expected result file.")
        else:
            await integrate_child_output(content)


async def do_parent_work():
    pass  # replace with actual parent steps

async def integrate_child_output(text: str):
    print(f"Merging {len(text)} chars from child...")
Rules for fire-and-forget
  1. Always specify result_path in sub_task — it is the only rendezvous.
  2. Plan your merge point before spawning — know exactly when the parent will need the child's output.
  3. Use read_result() — returns None safely on any filesystem error (missing file, permission denied, etc.).
  4. One result file per child — if a child produces multiple artefacts, have it write a manifest JSON listing them all.
  5. Don't fire-and-forget if parent needs the result immediately — use Sequential instead.

Error Handling

What raises vs. what returns an error string:

SituationBehaviour
Anthropic API error (network, rate limit, etc.)Returns JSON error string — never raises
Empty or non-text API responseReturns JSON error string — never raises
depth >= MAX_DEPTHRaises ValueError — programmer error, fix your call
Missing required payload key (main_task_title, progress_so_far, sub_task)Raises ValueError — fix your payload
Non-JSON-serializable value in payloadRaises ValueError — fix your payload
SKILL.md not foundRaises FileNotFoundError — fix your path config

Always check with is_error() after a successful call. Wrap the call itself in try/except if you need to handle the two programmer-error exceptions gracefully:

try:
    summary = spawn_openclaw(payload, depth=1)
except (ValueError, FileNotFoundError) as exc:
    print("Configuration error:", exc)
    raise  # or handle

if is_error(summary):
    import json
    err = json.loads(summary)
    print("Runtime error:", err["error"])
    print("Partial results at:", err.get("partial_results"))  # may be None
    # decide: retry, fallback, abort parent
else:
    # success — read result files
    result = read_result("/tmp/some_output.md")
    if result is not None:
        # merge result ...
        pass
    else:
        print("WARNING: child did not write expected result file.")

Anti-Patterns to Avoid

Anti-PatternWhy It's BadFix
Sending the full conversation history as progress_so_farWastes tokens; child gets confusedSummarize: only what the child needs
Including secrets in progress_so_farSnapshot is sent to Anthropic API and visible to childStrip API keys, passwords, tokens, and personal data before spawning
Passing overly-permissive tools to childrenChildren gain filesystem or network access beyond what their sub_task needsScope tools to minimum required capability; omit tools= if the task only needs text output
Vague sub_task like "handle the rest"Child doesn't know what to doBe explicit: inputs, steps, output location
Spawning for a 2-line taskOverhead > benefitDo it in the parent
Not writing a progress snapshot before spawningParent loses state if it crashesAlways freeze state first
Omitting tools= when sub_task requires file I/OChild is a pure LM — it cannot read or write files; read_result() always returns NonePass tool definitions or collect results from the summary string instead
Ignoring is_error() on child summarySilent failures; parent merges nothingAlways check before reading result files
Fire-and-forget with no result fileNo rendezvous; parent can't collect outputAlways specify result_path in sub_task
Awaiting fire-and-forget child immediately after spawnDefeats the purposePut await child_task at the merge point
Omitting depth= when spawning from inside a childDepth check never triggers; runaway treesAlways pass depth=current_depth + 1
Child spawning further children without explicit permissionRunaway tree; hard to debugOnly spawn if sub_task explicitly says so

Quick Reference Card

SPAWN CHECKLIST
───────────────────────────────────────────
[ ] Sub-task is genuinely separable?
[ ] depth= will stay within MAX_DEPTH (default 3)?
[ ] Progress snapshot written (parent state frozen)?
[ ] main_task_title: ≤ 10 words, stable
[ ] progress_so_far: dense summary, no raw dumps
[ ] sub_task: self-contained, explicit result_path

STRATEGY SELECTION
[ ] Parent needs result before next step?        → Sequential (A)
[ ] Multiple children, all needed before merge?  → Parallel-gather (B)
[ ] Parent has its own work to do right now?     → Fire-and-forget (C)

AFTER EVERY SPAWN
[ ] is_error(summary) checked?
[ ] read_result(path) used (handles missing files safely)?
[ ] None result handled — don't merge silently?

FIRE-AND-FORGET EXTRAS
[ ] result_path agreed before spawning?
[ ] merge point placed after parent's own work?

平台分布

OpenClaw

77.56%
按下载量换算1,191

安全审计

VirusTotal

未展示

ClawScan

通过

Static analysis

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

继续浏览同类 Skills