spawn-instance
FreeNo executable scriptsNot checkedClone this Aeon agent into a new GitHub repo - fork, configure skills, validate, and register in the fleet
by aeonfun★ 801 GitHub starsAbout this skill
${var} — Name and purpose of the new instance. Format
name: purpose, e.g.crypto-tracker: monitor DeFi protocols and token movements. If empty, notify the owner and stop with exitSPAWN_INVALID_VAR.
Today is ${today}. Create a new Aeon instance by forking this repo, configuring it for a specific purpose, validating the configuration, and registering it in the fleet.
Read memory/MEMORY.md at the start for context.
Security Model
This skill creates the repo and configuration but does NOT propagate secrets.
The new instance is inert until the owner manually sets secrets (ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN, plus notification secrets).
Each instance has its own API keys for billing isolation and blast-radius containment.
Exit Taxonomy
Every run ends with one of these status codes, written to the log and (where relevant) included in the notification:
| Code | Meaning |
|---|---|
SPAWN_OK |
Fork created, configured, pushed, Actions enabled, registered. |
SPAWN_FORK_EXISTS_RECOVERED |
Fork already existed but wasn't registered → configured + registered now. |
SPAWN_FORK_EXISTS_REGISTERED |
Fork exists AND is already registered and not archived — refused, no change. |
SPAWN_INVALID_VAR |
var was empty or couldn't be parsed into name: purpose. |
SPAWN_NO_SKILLS |
After validation, the skill plan was empty — refused. |
SPAWN_FORK_FAILED |
gh repo fork and the fallback forks API both failed. |
SPAWN_PUSH_FAILED |
Fork created but push failed — fork left in place, recovery instructions emitted. |
SPAWN_ACTIONS_FAILED |
Configuration pushed but enabling Actions failed — recovery instructions emitted. |
SPAWN_API_ERROR |
Any other GitHub API failure not covered above. |
Steps
1. Parse and validate the var
- If
${var}is empty, logSPAWN_INVALID_VAR: empty vartomemory/logs/${today}.md, notify:spawn-instance: empty var — re-run with "name: purpose", and stop. - Split on the first
:— left isNAME_RAW, right isPURPOSE(trim whitespace). If either is empty, exitSPAWN_INVALID_VAR. - Derive
NAME: lowercaseNAME_RAW, replace non-alphanumeric runs with-, strip leading/trailing-, truncate to 40 chars. If empty after sanitization, exitSPAWN_INVALID_VAR. - Set
REPO_NAME="aeon-${NAME}".
2. Pre-flight checks
Shell shape. Each Bash call is one allowed command (pipes are fine). The run refuses a call that sets a variable (OWNER=$(gh api ...), TMPDIR=$(mktemp -d)), uses if / for / while or a [ ... ] test, joins commands with ;, && or || (including || { echo ...; exit 1; }), or starts with cd DIR, and find, rm, awk, basename, mktemp, seq and sleep are not allowed commands; each refusal costs a model turn. So run each gh / git command as its own call, read what it prints and write that value into later commands literally (the <OWNER>, <REPO_NAME> style placeholders in the snippets); turn each || exit into the prose check after the call; run git in the clone with git -C <dir>; write files with Write/Edit; and do the memory reset deletes inside one python3 -c call.
Run each as its own call:
gh auth status
If it fails, log SPAWN_API_ERROR: gh not authenticated and stop.
gh api user --jq '.login'
It prints OWNER. If it fails, log SPAWN_API_ERROR: cannot read user and stop.
gh repo view --json nameWithOwner -q .nameWithOwner
It prints PARENT_REPO. If the current repo is itself a fork, use the upstream as the parent; this prints PARENT_UPSTREAM:
gh api repos/<PARENT_REPO> --jq '.parent.full_name // .full_name'
Check rate limit:
gh api rate_limit --jq '.resources.core.remaining'
It prints REMAINING. If it is below 50 (or empty, which counts as 0), log SPAWN_API_ERROR: rate limit too low (<REMAINING>) and stop.
3. Check the fleet registry
Read memory/instances.json. If it doesn't exist, create it with {"instances": []}.
{
"instances": [
{
"name": "crypto-tracker",
"repo": "OWNER/aeon-crypto-tracker",
"purpose": "monitor DeFi protocols and token movements",
"created": "2026-04-20",
"status": "pending_secrets",
"skills_enabled": ["token-movers", "defi-overview", "heartbeat"],
"parent": "OWNER/aeon"
}
]
}
- If an entry with
name == NAMEexists andstatus != "archived", exitSPAWN_FORK_EXISTS_REGISTERED, notify, and stop. - If an entry exists and is archived, remove it — the new run replaces it.
4. Build the skill plan from the live catalog
Do not use a hardcoded skill list. The catalog in earlier revisions contained broken names (wallet-digest, trending-coins, tweet-digest, hn-digest — none of which exist in skills/
Install spawn-instance in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the spawn-instance skill do?
Clone this Aeon agent into a new GitHub repo - fork, configure skills, validate, and register in the fleet
How do I install the spawn-instance skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the spawn-instance skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
by Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
by Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropic