LaunchKit · 2026
Back to Skills

subagent-spawn-command-builder

Build sessions_spawn command payloads from JSON profiles.

0
664 downloads
by @nextaltair

Setup & Installation

openclaw skills install @nextaltair/subagent-spawn-command-builder

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install subagent-spawn-command-builder

Version History

v0.1.2Feb 14, 2026 - Version note by skill developer:

- Switched builder script from Python to Node.js: replaced build_spawn_payload.py with build_spawn_payload.mjs - Updated documentation and usage instructions to reference the new .mjs script - Removed Python references from setup and payload generation examples - Clarified that the builder is now Node.js-based in the CLI options section

What This Skill Does

Builds sessions_spawn payload JSON from reusable profile configs without executing the spawn. Profiles define model, thinking, timeout, cleanup, agentId, and label. A Node.js script merges CLI options, profile values, and defaults into ready-to-use command JSON.

Separating payload generation from execution lets you inspect and version spawn configs before any agent is actually started.

When to use it

  • Preparing a subagent spawn payload for review before execution
  • Reusing a named profile across multiple agent tasks
  • Overriding a profile's model at the CLI for a one-off run
  • Logging generated payloads to a JSONL file for auditing
  • Templating subagent configs for a team workflow

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: build a spawn payload using the 'heartbeat' profile for a context summary task

AGENT
  1. 1Reads spawn-profiles.json to load the 'heartbeat' profile
  2. 2Resolves model, thinking, timeout, and cleanup from profile and defaults
  3. 3Accepts --task and --label from CLI options
  4. 4Merges all values following CLI > profile > defaults priority
  5. 5Prints the final sessions_spawn-ready JSON to stdout
OUTPUT

{"task":"Analyze recent context and return a compact summary","label":"heartbeat-test","model":"...","thinking":"...","runTimeoutSeconds":...,"cleanup":"..."}