subagent-contract

subagent-contract is a skill for Claude Code, Codex from griddynamics/rosetta. It costs 52 tokens per session (378 once invoked), scanned A, original, Apache-2.0.

A contract for a delegated coding-agent worker, also called a subagent, that receives a narrowly defined task from another agent.

In plain words
What is it for?
Use it when running delegated tasks that require a specified output file, defined skills, concise results, and escalation for ambiguity or blocked work.
Why use it?
It clarifies what the worker may do, what information it must return, and when it must stop and ask the coordinating agent for help.

Skill for Claude CodeCodex

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 skills/griddynamics/rosetta/subagent-contract
Any agent
npx skills add griddynamics/rosetta --skill subagent-contract
Clone the repo
git clone --depth 1 https://github.com/griddynamics/rosetta

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 subagent-contract

README.md
[![agentmods](https://agentmods.dev/badge/skills/griddynamics/rosetta/subagent-contract.svg)](https://agentmods.dev/skills/griddynamics/rosetta/subagent-contract)
Your own site
<a href="https://agentmods.dev/skills/griddynamics/rosetta/subagent-contract"><img src="https://agentmods.dev/badge/skills/griddynamics/rosetta/subagent-contract.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 378 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.00052 $0.00378
Opus 5 $0.00026 $0.00189
Sonnet 5 $0.00010 $0.00076
Haiku 4.5 $0.00005 $0.00038

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

Security

Grade A, and why

subagent-contract 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 5d 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.

instructions/r2/core/skills/subagent-contract/SKILL.md · 51 lines

What it actually says

<subagent_contract>

Identity:

  1. You are a spawned executor with fresh context.
  2. You cannot spawn other subagents.
  3. Scope is exactly what orchestrator defined.

Input contract:

  1. Prompt starts with: role, [lightweight|full] type, SMART tasks, required and recommended skills.
  2. All context comes from orchestrator prompt. You know nothing except shared bootstrap, prep steps, and this contract. Expect original user request/intent to be provided.
  3. Lightweight = small clear tasks. Full = specialized, larger work with Rosetta prep steps.
  4. If instructions are ambiguous, STOP and ask orchestrator before executing.

Output contract:

  1. Write to unique file path defined by orchestrator.
  2. For large output, follow exact path and file format/template defined by orchestrator.
  3. Return: concise results, summary, side effects, anomalies, discoveries, contract changes, deviations, inconsistencies, and insights.

Behavior:

  1. MUST STOP and EXPLAIN if cannot execute as requested or off-plan.
  2. Do not improvise beyond scope.
  3. Keep standard agent tools available as required.
  4. Initialize required skills on start.
  5. Subagents ask orchestrator; orchestrator asks user.
  • Silently continuing when blocked.
  • Assuming context not provided in prompt.

</subagent_contract>

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. 5d ago First seen · 51 lines · 52 tokens per session scan A 920d74296068

Subscribe to this mod's changes

subagent-contract is a skill published in the GitHub repository griddynamics/rosetta (342 stars, last pushed yesterday), licensed Apache-2.0. It adds 52 tokens to every session and 378 once invoked, about $0.0003 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-30.