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.
npx agentmods add agents/nexgensystemsmx/scopegate/02-protocolgit clone --depth 1 https://github.com/NexgenSystemsMX/scopegateWrote 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.
[](https://agentmods.dev/agents/nexgensystemsmx/scopegate/02-protocol)<a href="https://agentmods.dev/agents/nexgensystemsmx/scopegate/02-protocol"><img src="https://agentmods.dev/badge/agents/nexgensystemsmx/scopegate/02-protocol.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.03158 |
| Opus 5 | $0.00000 | $0.01579 |
| Sonnet 5 | $0.00000 | $0.00632 |
| Haiku 4.5 | $0.00000 | $0.00316 |
Grade A, and why
02-protocol 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 247 lines — stays where its author put it; the contents beside it link to each section on GitHub.
02 — The Agent Protocol: Operating Behind the Gateway
This guide defines how you (an autonomous coding agent) work with ScopeGate's ephemeral capabilities. It is the operational contract: follow it exactly and privileged work flows; deviate and the gateway fails closed against you.
Prerequisites: ScopeGate is installed and you can call its MCP tools
(scopegate_request_capability, scopegate_list_capabilities, …). If not,
see the setup guide first. Tool argument schemas live in
03 — Tools Reference; this document covers the
protocol, not every field.
1. Mental model
A capability is not a credential. You never see, hold, or transmit a
secret value. Secrets live in the encrypted vault; the gateway injects them
into upstream requests inside the proxy, outside your context. What you hold
is a capability: a permission string of the form
<upstream>:<action>:<resource>, e.g. github:write:myorg/myrepo,
aws:deploy:staging, huly:read:*. Proxied tool calls map to
<upstream>:call:<toolName> when no finer scope applies.
A grant is a time-boxed, audited materialization of a capability. When
policy allows your request, the engine issues a persistent grant (UUID,
expiresAt, issuing rule). Every grant has a TTL and dies on its own — the
default ceiling is 15 minutes unless the matched rule says otherwise.
Why a leaked token is worth ~zero. Any token a minter produces for a call
is clamped to the remaining TTL of the covering grant
(token_ttl = min(provider ceiling, grant TTL)). It is scoped to one
capability, expires with the grant, and every use is attributed in the
Ed25519-chained audit log. Meanwhile the long-lived secret never left the
vault, and honeytoken decoys (canary:* refs) turn any exfiltration attempt
into a high-precision alarm (see §5). Stealing what you can touch buys an
attacker minutes of narrow, fully-logged access.
2. Lifecycle of a privileged action
- Ask before you act. Call
scopegate_request_capabilitywith the minimum capability and a one-linereason(required — it goes to the audit log). Optionally passttl(strict format:30s,5m,1h). - The engine evaluates, in this order: rate limit → honeytoken mention →
existing covering grant (idempotent re-request: returned as-is, never
duplicated) → hard-limit
denyglobs (fail-closed, beat every rule) → policy rules in order (require: human_approval→ escalation;auto_approve→ grant). TTL is alwaysmin(requested, rule/default ceiling, limits.max_ttl)— you can shorten, never extend. - Read the verdict. Three shapes come back:
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.
- 4d ago First seen · 247 lines · 0 tokens per session scan A 631ae1f9b0a0
02-protocol is an agent published in the GitHub repository NexgenSystemsMX/scopegate (0 stars, last pushed 17d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 3,158 tokens. 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.
Other agents, from other repositories
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
analyzer
Analyze blind comparison results to understand WHY the winner won and generate improvement suggestions.
grader
Evaluate expectations against an execution transcript and outputs.
comparator
Compare two outputs WITHOUT knowing which skill produced them.
agentic-workflows
GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing.