ap-spawn-agent

ap-spawn-agent is a skill for Claude Code, Codex from agentproto/ts. It costs 85 tokens per session (1,013 once invoked), scanned A, original, Apache-2.0.

A tool for starting independent coding-agent sessions with a chosen model, working directory, instructions, and optional tool access.

In plain words
What is it for?
Use it to delegate implementation tasks, start background workers, choose an adapter or model, and check whether a similar session is already running.
Why use it?
It moves bounded work into separate workers so tasks can run independently or in the background without mixing their context.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to delegate implementation tasks, start background workers, choose an adapter or model, and check whether a similar session is already running.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agentproto/ts/ap-spawn-agent
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.

Any agent
npx skills add agentproto/ts --skill ap-spawn-agent
Clone the repo
git clone --depth 1 https://github.com/agentproto/ts

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ap-spawn-agent

README.md
[![agentmods](https://agentmods.dev/badge/skills/agentproto/ts/ap-spawn-agent/github.svg)](https://agentmods.dev/skills/agentproto/ts/ap-spawn-agent)
Your own site
<a href="https://agentmods.dev/skills/agentproto/ts/ap-spawn-agent"><img src="https://agentmods.dev/badge/skills/agentproto/ts/ap-spawn-agent/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ap-spawn-agent

Your own site · 80×15
<a href="https://agentmods.dev/skills/agentproto/ts/ap-spawn-agent"><img src="https://agentmods.dev/badge/skills/agentproto/ts/ap-spawn-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,013 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found 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.1 $0.00085 $0.01013
Opus 5.5 $0.00034 $0.00405
Sonnet 5.5 $0.00017 $0.00203
Haiku 4.5 $0.00009 $0.00101

Measured today against content hash 2ac6e583b26d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ap-spawn-agent 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 today.

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.

packages/skill-pack-agentproto/src/skills/ap-spawn-agent/SKILL.md · 101 lines

How it starts

The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Spawn an Agent

When to use

The user wants a new, independent agent session doing bounded work in a directory — a worker to delegate to, a background task runner, or a fresh session for a subtask. Check agent_sessions_list first if there's any chance a matching session is already running; spawning a second one on the same cwd/task wastes a process.

MCP tool: agent_start

{
  "tool": "agent_start",
  "args": {
    "adapter": "claude-code",
    "model": "claude-sonnet-5",
    "cwd": "/path/to/project",
    "prompt": "Add input validation to the signup form in apps/acme/web/src/app/signup — reject empty email and password < 8 chars, add a unit test.",
    "label": "signup-validation",
    "mcpServers": [
      { "name": "agentproto", "transport": "http", "ref": "http://127.0.0.1:18790/mcp" }
    ],
    "access": { "profileRef": "default" },
    "orchestrator": false,
    "mode": "background",
    "effort": "medium",
    "permissionHold": false,
    "worktree": false,
    "wait": false,
    "idempotencyKey": "signup-validation-2026-09-01",
    "dedupe": true
  }
}

Only adapter, cwd, and prompt are typically required; the rest are tuning knobs. Use agent_sessions_list to see what's already running before you spawn:

{ "tool": "agent_sessions_list", "args": {} }

CLI

agentproto sessions start claude-code \
  --cwd /path/to/project \
  --model claude-sonnet-5 \
  --prompt "Add input validation to the signup form..." \
  --label signup-validation \
  --attach false \
  --orchestrator false \
  --mcp-servers-json '[{"name":"agentproto","transport":"http","ref":"http://127.0.0.1:18790/mcp"}]' \
  --options-json '{"effort":"medium"}' \
  --access-profile default

HTTP

None. Spawning a session is MCP-tool/CLI-only — there is no daemon HTTP route for agent_start.

Gotchas

  • hermes has no built-in file/shell tools. Unlike claude-code or claude-sdk, hermes ships with nothing but chat. If the task needs to read/write files or run commands, you MUST pass mcpServers:[{name:'agentproto',transport:'http',ref:'http://127.0.0.1:18790/mcp'}] at spawn time, or the agent can only talk, not act.
  • cwd must be an absolute host path — a relative path fails the spawn outright.
  • Give children authentic, bounded tasks. Sentinel prompts like "just repeat this token back to me" get refused by capable models as prompt injection — write a real task with a real goal and scope.
  • Always set a distinct label so the session is identifiable later in agent_sessions_list / session_list — unlabeled sessions are hard to tell apart once several are running. When you list them back, narrow server-side (session_list {q:'<label>', excludeNoise:true, limit:10}) instead of reading every session on the daemon.
  • dedupe + idempotencyKey: calling agent_start again with the same key + adapter + cwd within ~10 minutes returns the same session (deduped:true) instead of forking a second process — safe to retry a spawn call without fear of duplicates.

Read the full file on GitHub · 101 lines

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. today Changed 2ac6e583b26d
  2. 7d ago Changed 385c58651079
  3. 1mo ago Changed · +2 lines bae1b56a6b18
  4. 2mo ago First seen · 99 lines · 85 tokens per session scan A 949d421e4e9c

Subscribe to this mod's changes

ap-spawn-agent is a skill published in the GitHub repository agentproto/ts (11 stars, last pushed today), licensed Apache-2.0. It adds 85 tokens to every session and 1,013 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.

Related

ap-spawn-agent compared with skills from other repositories

ap-spawn-agent next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ap-spawn-agentagentproto/tsSkill11todayApache-2.0A85Claude Code, Codex
skill-creator-primersammcj/agentic-codingSkill1744d agoApache-2.0A74Claude Code
llm-wikisammcj/agentic-codingSkill1744d agoApache-2.0A82Claude Code
extract-wisdomsammcj/agentic-codingSkill1744d agoApache-2.0A43Claude Code
apply-mantel-stylessammcj/agentic-codingSkill1744d agoApache-2.0A37Claude Code, Codex
home-assistantsammcj/agentic-codingSkill1744d agoApache-2.0A57Claude Code
deepevalsammcj/agentic-codingSkill1744d agoApache-2.0A19Claude Code, Codex