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>
This commit is contained in:
Ahmed Abushagur 2026-03-25 15:32:20 -07:00 committed by GitHub
parent 7194058c64
commit 17817533a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 750 additions and 7 deletions

32
skills/opencode/AGENTS.md Normal file
View file

@ -0,0 +1,32 @@
# Spawn — Create Child VMs
You have the `spawn` CLI installed. Use it to provision cloud VMs with AI agents.
## Usage
```bash
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
```bash
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