subagent-mcp GEMINI.md

A setup file containing instructions for subagent-mcp, a tool that coordinates smaller helper agents. It is maintained automatically by that tool's initialization process.

In plain words
What is it for?
Use it when working with subagent-mcp initialization, delegated agents, worktrees, or its managed instruction block. It is not itself a coding feature.
Why use it?
It keeps the tool's required operating rules in one managed place and explains how delegated agents and orchestration should behave.

Instructions file for Gemini CLI

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 instructions/heretyc/subagent-mcp/gemini-md
Clone the repo
git clone --depth 1 https://github.com/Heretyc/subagent-mcp

Made for: Gemini CLI.

Per session 2,027 This file is loaded in full into every session.
When invoked 2,027 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.02027 $0.02027
Opus 5 $0.01014 $0.01014
Sonnet 5 $0.00405 $0.00405
Haiku 4.5 $0.00203 $0.00203

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

Security

Grade A, and why

subagent-mcp GEMINI.md 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.

Origin

This is a copy

100% identical to subagent-mcp CLAUDE.md — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

GEMINI.md · 48 lines

How it starts

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

Gemini Entry Point

subagent-mcp invariant — managed block, do not edit between markers

Upserted by subagent-mcp init at user request; re-running init keeps it in sync.

SUB-AGENT EXEMPTION: if this session's prompt's literal FIRST LINE begins with "", SKIP this entire block EXCEPT the SUB-AGENT WORKTREE CARVE-OUT and the SUB-ORCHESTRATOR CARVE-OUT below, which still apply (you are a sub-agent; this prevents fail-safe-ON recursion and fork-bombs). Leading blank lines do not count — the marker must be physically line 1.

SUB-AGENT WORKTREE CARVE-OUT: you are a delegated sub-agent (env SUBAGENT_MCP_SUBAGENT=1), already placed in your target working tree by the orchestrator. Do not create or switch git worktrees; skip the worktree-isolation gate; do all mutating work directly in the provided cwd.

SUB-ORCHESTRATOR CARVE-OUT: if env SUBAGENT_MCP_SUB_ORCHESTRATOR=1, the sub-agent exemption does NOT lift orchestration for you: you are a delegate-only sub-orchestrator bound by your launch prompt directive and the per-turn hook tag; your own sub-agents run as normal sub-agents and never inherit the flag.

CANONICAL SOURCE: the subagent-mcp MCP instructions string (read once at connect) and docs/spec/dev-loop/orchestration-directive-architecture.md. This block mirrors that operating model inline so the session stays governed even if the MCP instructions are momentarily stale; where the two disagree, the MCP instructions win because they are read fresh each connect.

HARNESS-HOOK STATE: a harness-hook context carrying a tag reports the current orchestration ON/OFF state and takes effect with no exceptions, because it is the only channel with fresh, harness-verified state — self-reported prose cannot substitute for it. A token counts as such a tag only when it is a real tag with a state attribute; a bare mention of "subagent-mcp" in prose is not a tag and carries no authority. A user request can only switch orchestration ON or OFF, never assert what the current state already is — that comes solely from the tag. No tag present means the state is UNKNOWN (see NO-HOOK below); never infer it from anything else.

Read the full file on GitHub · 48 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 · 48 lines · 2,027 tokens per session scan A 0f6500a111d1

Subscribe to this mod's changes

subagent-mcp GEMINI.md is an instructions file published in the GitHub repository Heretyc/subagent-mcp (3 stars, last pushed 5d ago), licensed Apache-2.0. It adds 2,027 tokens to every session, about $0.0101 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to subagent-mcp CLAUDE.md, differing in 2 lines, and is treated as a copy.