agent-spawning

agent-spawning is a cursor rule for Cursor from onesimplecode/agent-engineering-standards. It costs 85 tokens per session (1,496 once invoked), scanned A, original, MIT.

A set of rules for defining clear contracts for each step in an agent workflow. Each step states what it accepts, what it returns, when it stops, and how many resources it may use; steps exposed as MCP tools also describe their side effects.

In plain words
What is it for?
Use it when designing agent pipelines or exposing pipeline steps as MCP tools. It helps specify schemas, exit conditions, budgets, and whether an operation can change data, be retried safely, or access outside information.
Why use it?
It prevents agent steps from having unclear behavior or misleading safety claims. Clear contracts make failures, retries, routing, and resource use easier to reason about.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when designing agent pipelines or exposing pipeline steps as MCP tools. It helps specify schemas, exit conditions, budgets, and whether an operation can change data, be retried safely, or access outside information.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/onesimplecode/agent-engineering-standards/agent-spawning
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/onesimplecode/agent-engineering-standards

Made for: Cursor.

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 agent-spawning

README.md
[![agentmods](https://agentmods.dev/badge/rules/onesimplecode/agent-engineering-standards/agent-spawning/github.svg)](https://agentmods.dev/rules/onesimplecode/agent-engineering-standards/agent-spawning)
Your own site
<a href="https://agentmods.dev/rules/onesimplecode/agent-engineering-standards/agent-spawning"><img src="https://agentmods.dev/badge/rules/onesimplecode/agent-engineering-standards/agent-spawning/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 agent-spawning

Your own site · 80×15
<a href="https://agentmods.dev/rules/onesimplecode/agent-engineering-standards/agent-spawning"><img src="https://agentmods.dev/badge/rules/onesimplecode/agent-engineering-standards/agent-spawning.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,496 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.01496
Opus 5.5 $0.00034 $0.00598
Sonnet 5.5 $0.00017 $0.00299
Haiku 4.5 $0.00009 $0.00150

Measured 1mo ago against content hash 47abcc3aa08d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

agent-spawning 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 1mo 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.

examples/cursor-rules/.cursor/rules/agent-spawning.mdc · 53 lines

How it starts

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

Agent Spawning

TR-AGT-003 — Agentic node loop contracts

Every agent pipeline node declares input schema, output schema, exit condition, and resource budget before implementation. Nodes exposed as MCP tools additionally declare four tool annotation hints (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) describing blast radius — required only for MCP-exposed nodes. Annotations must be earned, not merely asserted: each hint names a property the implementation actually has, and the test suite must demonstrate it (e.g. idempotentHint requires a real no-op path). Declaring a hint without the property is a protocol violation — callers that retry on a false idempotentHint will amplify damage. A triage or gate node's output schema may additionally include a disposition field drawn from a closed vocabulary (e.g. query / think / report) naming what happens to its output next, derived from the node's own verdict — never set independently of it, so the two cannot disagree. Optional: only nodes whose output routes to more than one next step need to declare it.

TR-AGT-002 — Deterministic operations use scripts not agents

Operations that require repeatable results should be implemented in scripts, code, queries, tests, or validators. Agents may call those deterministic tools, but should not replace them.

TR-AGT-004 — Agent trigger type classified at design time

Each agent invocation is classified as event-driven, scheduled, or user-initiated. Undocumented triggers are non-compliant unmanaged side effects.

TR-AGT-005 — Behavioral mode declaration

A behavioral mode is a named, trigger-activated instruction set that changes how an agent approaches a task, orthogonal to process-intensity gate strictness. Each mode declares a trigger, activated behavior, exit condition, and precedence (safety and process-intensity rules always win on conflict).

Read the full file on GitHub · 53 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. 1mo ago Changed · +4 lines · +7 tokens per session 47abcc3aa08d
  2. 1mo ago First seen · 49 lines · 78 tokens per session scan A 8ae790d6b6cc

Subscribe to this mod's changes

agent-spawning is a cursor rule published in the GitHub repository onesimplecode/agent-engineering-standards (3 stars, last pushed 1mo ago), licensed MIT. It adds 85 tokens to every session and 1,496 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-08-31.