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 skills add sanity-io/agent-toolkit --skill sanity-studio-listenersgit clone --depth 1 https://github.com/sanity-io/agent-toolkitWrote 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/skills/sanity-io/agent-toolkit/sanity-studio-listeners)<a href="https://agentmods.dev/skills/sanity-io/agent-toolkit/sanity-studio-listeners"><img src="https://agentmods.dev/badge/skills/sanity-io/agent-toolkit/sanity-studio-listeners/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.
<a href="https://agentmods.dev/skills/sanity-io/agent-toolkit/sanity-studio-listeners"><img src="https://agentmods.dev/badge/skills/sanity-io/agent-toolkit/sanity-studio-listeners.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00153 | $0.01956 |
| Opus 5.5 | $0.00061 | $0.00782 |
| Sonnet 5.5 | $0.00031 | $0.00391 |
| Haiku 4.5 | $0.00015 | $0.00196 |
Grade A, and why
sanity-studio-listeners 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 6d 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 — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Studio listeners
Studio keeps data live with listeners: long-lived requests that stream changes from the Sanity API. A browser runs at most 100 requests at a time on its connection to the API, and every Studio tab shares that connection (on HTTP/1.1, browsers open only 6 connections per host). A listener holds its slot for as long as it is open, and a Studio tab normally has 6 to 12 open.
Code that opens a listener for every item it renders multiplies by items, then by tabs. Once the slots run out, every request in every tab waits: the newest tab hangs on its spinner, documents and previews stop loading, and a tab that does load can show missing validation errors. The goal is that your code adds a constant number of listeners, never one per item.
Studio already keeps one listener open that follows every document in the dataset. Read documents, validation and permissions through it, and open a listener of your own only when it can't serve the query.
Workflow
-
Find listeners opened per item. Look in components rendered once per card, row, list item, search result or preview for:
useValidationStatus(oruseDocumentPairPermissions(withoutlistener: 'global'. By default they load the document the way the editor does, which opens a listener for it.documentStore.listenQuery(,listenQuery(,client.listen(,client.observable.listen(. Every call opens its own listener, even for a query another component already runs.useListeningQuery(fromsanity-plugin-utils, and plugins built on it. Each call opens a listener. As of 2.0.23, when the listener fails, its error handler throws "You provided an invalid object where a stream was expected" and the hook stops updating.
Also look for the same query run by several components (a settings document read by the structure, a tool and a badge).
-
Check the Studio version.
{listener: 'global'}needssanity6.24.0 or later. On an older version, propose the upgrade first (see thesanity-studio-upgradeskill). -
Replace each one by what the item needs:
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 6d ago First seen · 127 lines · 153 tokens per session scan A 7bc68091bc06
sanity-studio-listeners is a skill published in the GitHub repository sanity-io/agent-toolkit (203 stars, last pushed today), licensed MIT. It adds 153 tokens to every session and 1,956 once invoked, about $0.0006 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-11-24.
sanity-studio-listeners compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| sanity-studio-listenerssanity-io/agent-toolkit | Skill | 203 | today | MIT | A | 153 | Claude Code |
| opik-diagnosecomet-ml/opik-claude-code-plugin | Skill | 9 | 5d ago | Apache-2.0 | A | 187 | Claude Code |
| doctorkalinbogatzevski/captain-memo | Skill | 5 | 6d ago | Apache-2.0 | A | 52 | Claude Code |
| errorsayrshare/ayrshare-social-media-api-claude-plugin | Skill | 21 | 4d ago | none | A | 209 | Claude Code |
| inventoryggemba/squad-mcp | Skill | 4 | 4mo ago | Apache-2.0 | A | 0 | Claude Code |
| debugggemba/squad-mcp | Skill | 4 | 4mo ago | Apache-2.0 | A | 0 | Claude Code |
| opik-explaincomet-ml/opik-claude-code-plugin | Skill | 9 | 5d ago | Apache-2.0 | A | 113 | Claude Code |