spawn/skills/opencode/AGENTS.md
Ahmed Abushagur 17817533a4
feat: skill injection — teach agents how to use spawn on recursive VMs (#2989)
When `--beta recursive` is active, a new "Spawn CLI" setup step injects
agent-native instruction files teaching each agent how to use the `spawn`
CLI to create child VMs. Skill files live in `skills/` at the repo root
and use each agent's native format (YAML frontmatter for Claude/Codex/
OpenClaw, plain markdown for others, append mode for Hermes).

- Add `skills/` directory with 8 agent-specific skill files
- Add `spawn-skill.ts` module with path mapping, file reading, and injection
- Register "spawn" as a conditional setup step gated by `--beta recursive`
- Wire `injectSpawnSkill()` into orchestrate.ts postInstall flow
- Add 52 tests covering path mapping, append mode, file existence, injection
- Bump CLI version to 0.26.0 (minor: new feature)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 15:32:20 -07:00

876 B

Spawn — Create Child VMs

You have the spawn CLI installed. Use it to provision cloud VMs with AI agents.

Usage

spawn <agent> <cloud> --headless --output json --prompt "task description"

Agents: claude, codex, openclaw, zeroclaw, opencode, kilocode, hermes, junie

Clouds: hetzner, digitalocean, aws, gcp, sprite

Example

spawn claude hetzner --headless --output json --prompt "Implement the auth module"

Returns JSON: {"status":"success","ip_address":"...","ssh_user":"root","server_id":"..."}

Managing Children

  • spawn list --json — see running children
  • spawn delete — tear down a child VM
  • spawn tree — see the full spawn tree

Context

  • You are running inside a spawned VM (SPAWN_DEPTH is set)
  • Cloud credentials are pre-configured — no auth prompts
  • OpenRouter billing is shared with the parent