ashlr-spawn

A command for starting predefined groups of sub-agents, where each group follows a named delegation pattern.

In plain words
What is it for?
Use it to triage issues, explain part of a codebase, refactor selected files, review all changed files in a pull request, or fix test failures across multiple files.
Why use it?
It removes the need to manually divide repeated work among several agents and describe the same workflow each time.

Command

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 commands/ashlrai/ashlr-plugin/ashlr-spawn
Clone the repo
git clone --depth 1 https://github.com/ashlrai/ashlr-plugin
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 803 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00027 $0.00803
Opus 5 $0.00014 $0.00402
Sonnet 5 $0.00005 $0.00161
Haiku 4.5 $0.00003 $0.00080

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

Security

Grade A, and why

ashlr-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.

commands/ashlr-spawn.md · 62 lines

How it starts

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

Spawn a named delegation pattern using _spawn-patterns.json.

Patterns available

  • triage-issues — classify open issues by severity / label / age (haiku, batch)
  • refactor-files — apply a described refactor across a file list (sonnet, parallel-per-file)
  • codebase-explain — explain a codebase area with key files + flow (haiku, tiered)
  • pr-review-sweep — review all changed files in a PR (sonnet, parallel-per-file-changed)
  • parallel-test-fix — fix failing tests across multiple files (sonnet, parallel-per-file)

Argument convention

/ashlr-spawn <pattern> [args...]
  • First positional token after /ashlr-spawn is the pattern name.
  • Everything after the pattern name is the args string, passed verbatim to the prompt template as {{args}}.
  • For file-fanout patterns (refactor-files, parallel-test-fix), additional tokens that look like file paths (contain / or .) are collected into {{files}}; the remaining tokens form {{args}}.

Examples:

/ashlr-spawn triage-issues
/ashlr-spawn codebase-explain the genome pipeline
/ashlr-spawn refactor-files extract pure functions src/utils.ts src/helpers.ts
/ashlr-spawn pr-review-sweep 123
/ashlr-spawn parallel-test-fix __tests__/savings-math.test.ts __tests__/stats-sqlite.test.ts

Steps

  1. Parse $ARGUMENTS:

    • Extract the pattern name (first token).
    • Collect remaining tokens: file-path-like tokens → {{files}}; everything else → {{args}}.
  2. Read commands/_spawn-patterns.json (path: ${CLAUDE_PLUGIN_ROOT}/commands/_spawn-patterns.json). If the file is missing, error: "_spawn-patterns.json not found — run from the plugin root."

  3. Look up the pattern. If not found, print: "Unknown pattern <name>. Available: triage-issues, refactor-files, codebase-explain, pr-review-sweep, parallel-test-fix" and stop.

  4. Render the prompt_template by substituting {{args}} and {{files}} with the parsed values (empty string if not provided).

  5. Apply fanout_strategy:

    • batch — spawn one Agent with subagent_type from the pattern, passing the rendered prompt.
    • parallel-per-file — spawn one Agent per file in {{files}}, each with the same rendered prompt focused on that single file. Collect results.
    • parallel-per-file-changed — use git diff --name-only origin/main...HEAD to get the changed file list, then spawn one Agent per file.
    • tiered — spawn Phase 1 ashlr:ashlr:explore agent, then pass its output to Phase 2 ashlr:ashlr:code agent for deeper analysis.

Read the full file on GitHub · 62 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. 2d ago First seen · 62 lines · 27 tokens per session scan A 15d5d10ffe35

Subscribe to this mod's changes

ashlr-spawn is a command published in the GitHub repository ashlrai/ashlr-plugin (3 stars, last pushed 2d ago), licensed MIT. It adds 27 tokens to every session and 803 once invoked, about $0.0001 per session on Opus 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-08-31.

Related

Other commands, from other repositories

review-synthesize

Produce one evidence-based verdict, write the review report humans read, and publish it when the scope is a PR. You are read-only: never modify project files or commit; your only write outside the artifacts directory is the PR comment below. Read-only extends past the repository: a falsifying command creates its own…

coleam00/Archon · 0 tokens

triage

Confirm whether the work item still names real current work, choose the kind of reasoning owed next, and stop. Write the decisive evidence and handoff to $ARTIFACTSDIR/triage.md. You assess and route only: the repository must be exactly as you found it when you finish. No one watches the run; the report and your…

coleam00/Archon · 0 tokens

upgrade-webkit

Upgrade Bun's WebKit fork to the latest upstream version of WebKit.

oven-sh/bun · 14 tokens

create-workflow

Generate an n8n workflow JSON from a natural language description of the automation.

aegntic/cldcde · 0 tokens

feature

End-to-end feature/bug-sweep workflow for ui-debugger-mcp — understand, reproduce against a real target, explore in parallel, split into path-disjoint slices, build with a hive of agents in this ONE checkout (never worktrees), gate green, PR, merge, release to npm. Tracks in GitHub issues. Reads intent from the prompt.

developerz-ai/ui-debugger-mcp · 73 tokens

scriptwriter-draw

Draw a random chaos card from the 13-card deck — a plot-twist prompt the user can use as a scene seed, a basistext for an RRR cascade, or a riff for a room contribution.

cambridgetcg/agenttool · 43 tokens