Token导航 LogoToken导航TokenDH.com
研究检索执行命令clawhub未标认证来源可访问clear审计提醒

spawn-subagent生成子 Agent

Agent Skill

spawn-subagent 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

3,599

周安装

147

GitHub Stars

公开资料未说明

下载量

1,152
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install spawn-subagent

简介

生成独立子代理处理长时间任务,避免阻塞主会话。

  • 适合执行超过30秒的复杂或阻塞性操作。spawn-subagent 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 通过关键词触发,自动创建隔离运行环境。
  • 安装需确认权限范围及是否涉及联网或文件读写。
  • 建议结合原始文档核验具体使用限制和稳定性。

SKILL.md

name
spawn-subagent
description
Spawn isolated subagents to handle long-running, complex, or blocking tasks without stalling the main session. Use when: a task will take more than 30 seconds, involves multiple sequential steps, requires heavy file processing, could block the main session, or when parallelism would speed things up. Prevents the main agent from getting stuck on slow operations.

Spawn Subagent Skill

Minimum Model

Any model. Task delegation doesn't require complex reasoning.


When to Spawn vs. Stay in Main Session

Spawn a subagent when:

  • Task takes >30 seconds.
  • Task has many sequential steps (research → draft → send → log).
  • Task could fail and block the main session.
  • Multiple independent tasks can run in parallel.
  • Owner wants results "when ready," not now.

Stay in main session when:

  • Task takes <10 seconds.
  • Task needs back-and-forth with the owner.
  • Task needs the current conversation context.

How to Spawn

Basic Spawn

sessions_spawn(
    task="[Detailed task description here]",
    mode="run",             # "run" = one-shot task
    runtime="subagent",
    runTimeoutSeconds=300   # Kill after 5 min if still running
)

With Custom Model (for expensive reasoning tasks)

sessions_spawn(
    task="[Complex analysis task]",
    mode="run",
    runtime="subagent",
    runTimeoutSeconds=300,
    # Use a capable model only when the task needs it
    model="your-provider/your-capable-model"
    # Examples: "anthropic/claude-opus-4-6", "openai/gpt-4o", "google/gemini-1.5-pro"
)

Writing Good Task Descriptions

A good task description has 4 parts:

  1. What to do — specific actions
  2. Where inputs are — file paths, env vars, API endpoints
  3. What to output — exact format and save location
  4. What "done" looks like — clear completion signal

Good Example

Read all .md files in /tmp/reports/
Summarize each in 2–3 sentences
Save all summaries to /tmp/reports/summary.md — one section per file
Print "DONE: X files summarized" when finished
Do not modify the original files

Bad Example

Summarize the reports

*Too vague — subagent won't know where files are or what to do with results.*


Common Patterns

Batch Processing

# Spawn one subagent to process all items — not one per item
sessions_spawn(
    task="""
    Process each item in /tmp/items.json:
    1. Read the file
    2. For each item: [describe action]
    3. Save results to /tmp/results/ as one file per item (item_ID.json)
    4. Print "DONE: X items processed"
    """,
    mode="run",
    runtime="subagent",
    runTimeoutSeconds=300
)

Research + Draft

sessions_spawn(
    task="""
    1. Search the web for: [topic]
    2. Summarize the top 5 results in bullet points
    3. Draft a 3-paragraph briefing in plain language
    4. Save the draft to /tmp/briefing.md
    5. Print "DONE" when finished
    """,
    mode="run",
    runtime="subagent",
    runTimeoutSeconds=180
)

Parallel Independent Tasks

# Both spawn at the same time — runs faster than sequential
sessions_spawn(
    task="Fetch latest emails. Save to /tmp/emails.json. Print DONE.",
    mode="run", runtime="subagent", runTimeoutSeconds=60
)
sessions_spawn(
    task="Get today's calendar events. Save to /tmp/calendar.json. Print DONE.",
    mode="run", runtime="subagent", runTimeoutSeconds=60
)
# Wait for both completion events, then read both files

PA Daily Briefing (Non-Blocking)

sessions_spawn(
    task="""
    Generate the daily morning briefing:
    1. Get calendar: GOG_ACCOUNT=owner@company.com gog calendar events primary --from TODAY --to TOMORROW
    2. Get emails: GOG_ACCOUNT=owner@company.com gog gmail search 'is:unread newer_than:1d' --max 5
    3. Format as plain text (use CAPS for section titles, no markdown headers)
    4. Save to /tmp/morning-briefing.txt
    5. Print DONE
    """,
    mode="run",
    runtime="subagent",
    runTimeoutSeconds=120
)
# Main session stays free. Read /tmp/morning-briefing.txt when done, then send it.

Handling Completion

Do not poll. Wait for the push-based completion event.

When the completion event arrives:

  1. Read the output file the subagent created.
  2. Use the results in the main session.
  3. Reply with NO_REPLY if the owner doesn't need a response.

Failure Handling

If a subagent times out or fails:

  1. Log the failure: append to .learnings/ERRORS.md.
  2. Notify owner if the task was time-sensitive.
  3. Retry with a simpler, more explicit task description.
  4. If still failing → run in the main session as a fallback.

Anti-Patterns

❌ Don't✅ Do Instead
Poll with sessions_list in a loopWait for push-based completion events
Spawn for a 5-second taskRun quick tasks in main session
Use vague task descriptionsBe explicit about inputs, outputs, file paths
Spawn without a timeoutAlways set runTimeoutSeconds
Ignore subagent failuresCheck for error events and handle them
Spawn a subagent from inside a subagentKeep delegation to one level

Cost Tips

  • Cheaper: Use small models for batch/shell operations — spawn with model="provider/small-model".
  • Larger models only for: Complex reasoning, code generation, analysis.
  • Avoid: Do not spawn many subagents simultaneously — they compete for resources.
  • Batch: One subagent processing 100 items is cheaper than 100 subagents with 1 item each.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

82.11%
按下载量换算946

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

通过

权限和风险

执行命令

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills