spawn

A command-line tool for creating cloud virtual machines with an AI coding agent already installed. It can start machines on providers such as AWS, Google Cloud, Hetzner, DigitalOcean, or Sprite.

In plain words
What is it for?
Use it to provision a remote machine for a coding task, then connect over SSH to run Claude Code or Codex with a prompt.
Why use it?
It avoids manually creating a server, installing an agent, and finding the right connection details before delegating coding work.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/openrouterlabs/spawn/codex
Any agent
npx skills add OpenRouterLabs/spawn --skill codex
Clone the repo
git clone --depth 1 https://github.com/OpenRouterLabs/spawn

Made for: Claude Code, Codex.

Per session 15 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 513 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00015 $0.00513
Opus 5 $0.00008 $0.00257
Sonnet 5 $0.00003 $0.00103
Haiku 4.5 $0.00002 $0.00051

Measured 2d ago against content hash c210319fd066, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

spawn scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to spawn — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/codex/SKILL.md · 52 lines

What it actually says

Spawn — Create Child VMs

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

Provision a Child VM

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

Agents: claude, codex, cursor, openclaw, opencode, kilocode, hermes, junie Clouds: hetzner, digitalocean, aws, gcp, sprite

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

Running Prompts on Child VMs

--headless only provisions — to run work on the child, SSH in with bash -lc:

# Claude Code (use -p, NOT --print or --headless)
ssh -o StrictHostKeyChecking=accept-new root@<ip> "bash -lc 'claude -p --dangerously-skip-permissions \"your prompt\"'"

# Codex CLI
ssh -o StrictHostKeyChecking=accept-new root@<ip> "bash -lc 'codex --quiet \"your prompt\"'"

IMPORTANT — do NOT waste tokens rediscovering these:

  • Always use bash -lc — agent binaries are in ~/.local/bin/ which is only on PATH in login shells
  • Claude uses -p for non-interactive output (NOT --print, NOT --headless)
  • Add --dangerously-skip-permissions to skip approval prompts on child VMs
  • Never try which claude or find to locate binaries — they are always at ~/.local/bin/<agent>
  • Never create non-root users to work around permission issues — just use -p

Managing Children

  • spawn list --json — see running children
  • spawn delete --name <name> --yes — tear down a child VM (headless)
  • 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
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 52 lines · 15 tokens per session scan A c210319fd066

Subscribe to this mod's changes

spawn is a skill published in the GitHub repository OpenRouterLabs/spawn (233 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 15 tokens to every session and 513 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to spawn, differing in 0 lines, and is treated as a copy.