spawn

spawn is a command for Claude Code from Marcel-Bich/marcel-bich-claude-marketplace. It costs 11 tokens per session (819 once invoked), scanned A, original, MIT.

A command that starts an agent in an existing Git worktree and gives it a prompt. A worktree is a separate directory containing its own checked-out branch.

In plain words
What is it for?
Use it to assign a specific implementation or review task to an agent working in a named worktree.
Why use it?
It lets an agent work in an isolated branch directory, reducing clashes with changes being made elsewhere.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument.

Part of the hydra plugin — 9 commands shipped together

Good fit Use it to assign a specific implementation or review task to an agent working in a named worktree.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/marcel-bich/marcel-bich-claude-marketplace/spawn
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.

Clone the repo
git clone --depth 1 https://github.com/Marcel-Bich/marcel-bich-claude-marketplace

Made for: Claude Code.

Or install hydra, the plugin that ships this one along with the rest of its 9 commands.

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 spawn

README.md
[![agentmods](https://agentmods.dev/badge/commands/marcel-bich/marcel-bich-claude-marketplace/spawn/github.svg)](https://agentmods.dev/commands/marcel-bich/marcel-bich-claude-marketplace/spawn)
Your own site
<a href="https://agentmods.dev/commands/marcel-bich/marcel-bich-claude-marketplace/spawn"><img src="https://agentmods.dev/badge/commands/marcel-bich/marcel-bich-claude-marketplace/spawn/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 spawn

Your own site · 80×15
<a href="https://agentmods.dev/commands/marcel-bich/marcel-bich-claude-marketplace/spawn"><img src="https://agentmods.dev/badge/commands/marcel-bich/marcel-bich-claude-marketplace/spawn.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 819 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.00011 $0.00819
Opus 5.5 $0.00004 $0.00328
Sonnet 5.5 $0.00002 $0.00164
Haiku 4.5 $0.00001 $0.00082

Measured 16d ago against content hash 885b808ced18, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 16d 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.

plugins/hydra/commands/spawn.md · 139 lines

How it starts

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

Worktree Spawn

You are executing the /hydra:spawn command. Start an agent in an existing worktree.

Arguments

$ARGUMENTS is parsed as:

  • First word: Worktree name
  • Rest: Prompt for the agent

Example: feature-a Implement the new feature

  • worktree: feature-a
  • prompt: Implement the new feature

Process

1. Parse Arguments

# First word = Worktree
WORKTREE_NAME=$(echo "$ARGUMENTS" | awk '{print $1}')

# Rest = Prompt
AGENT_PROMPT=$(echo "$ARGUMENTS" | cut -d' ' -f2-)

If either is missing, show help:

Usage: /hydra:spawn {worktree} {prompt}

Example:
  /hydra:spawn feature-a "Implement login form"

2. Check if Worktree Exists

git worktree list | grep -E "$WORKTREE_NAME|hydra/$WORKTREE_NAME"

If not found:

Worktree '{name}' not found.

Options:
1. Create it first: /hydra:create {name}
2. Show available: /hydra:list

3. Determine Absolute Path

WORKTREE_PATH=$(git worktree list --porcelain | grep -B1 "$WORKTREE_NAME" | grep "worktree " | head -1 | cut -d' ' -f2-)

# Convert to absolute path
WORKTREE_PATH=$(cd "$WORKTREE_PATH" && pwd)

# Main checkout (first entry of the worktree list)
MAIN_CHECKOUT=$(git worktree list --porcelain | sed -n '1s/^worktree //p')

4. Start Agent with Task Tool

Use the Task tool with these parameters:

subagent_type: general-purpose
run_in_background: true (optional, depending on task)
prompt: [see below]

Construct agent prompt:

You are working in an isolated Git worktree.

IMPORTANT - Your working directory:
  {WORKTREE_PATH}

All file operations must be relative to this directory.
Use absolute paths or ensure you are in the correct directory.

Main checkout (READ-ONLY for you):
  {MAIN_CHECKOUT}

If something important is missing in your worktree (neither checked out, linked
nor copied - e.g. a rule file or local config), look it up read-only in the main
checkout. Never write, commit or run state-changing git commands there. Mention in
your report anything that should be added to the worktree files list.

Your task:
{AGENT_PROMPT}

When finished:
1. Commit your changes on the worktree branch (never push, never merge - the main agent does that)
2. Show git status and git log -3

Read the full file on GitHub · 139 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. 16d ago Changed · +11 lines 885b808ced18
  2. 1mo ago First seen · 128 lines · 11 tokens per session scan A baa5ac158401

Subscribe to this mod's changes

spawn is a command published in the GitHub repository Marcel-Bich/marcel-bich-claude-marketplace (12 stars, last pushed 2d ago), licensed MIT. It adds 11 tokens to every session and 819 once invoked, about $0.0000 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-03.