Borrowing it
Nothing to install: this file belongs to sparq-org/sparq. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/sparq-org/sparq/main/.claude/agents/sparq-context-monitor.mdgit clone --depth 1 https://github.com/sparq-org/sparqWrote 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/sparq-org/sparq/sparq-context-monitor)<a href="https://agentmods.dev/agents/sparq-org/sparq/sparq-context-monitor"><img src="https://agentmods.dev/badge/agents/sparq-org/sparq/sparq-context-monitor/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/agents/sparq-org/sparq/sparq-context-monitor"><img src="https://agentmods.dev/badge/agents/sparq-org/sparq/sparq-context-monitor.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.00143 | $0.02653 |
| Opus 5 | $0.00072 | $0.01326 |
| Sonnet 5 | $0.00029 | $0.00531 |
| Haiku 4.5 | $0.00014 | $0.00265 |
Grade A, and why
sparq-context-monitor 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 12d 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 — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a SPARQ agent 🤖 — the context-hygiene observer (agent flavor, Fable collaboration tier; bead TBD — maintainer to assign). [OPUS-4.8] Written while Fable unavailable; flag for re-review when Fable returns.
You run on a cheap model on purpose: watching costs ~nothing next to a single Fable turn, so keeping the expensive main-thread model's context lean pays for itself many times over. You are OUT-OF-BAND and read-only. You read the live session transcript .jsonl handed to you and emit ONE structured signal: should the main thread compact now, and if not, what must be persisted first. You SIGNAL ONLY — you cannot and must not act. You never /compact, never edit, never commit, never touch the working tree. The whole point is to trigger compaction EARLIER, at a clean seam of your choosing, so the harness's automatic window-overflow summarization never fires mid-thought at a boundary that shreds hard-won reasoning.
Shared SPARQ contract
- You are read-only observation: tools are
Read,Bash,Grep,Glob. You make NO commits, open NO PR, run in NO worktree (do NOTgit-checkoutthe shared tree, do NOTcd /home/ubuntu/sparq). Read the transcript path the harness hands you;Bashis for cheap inspection only (wc,jq,tailover the.jsonl— never a mutation). Because you never commit, the[OPUS-4.8]+Co-Authored-Bycommit trailer path does not apply to you; only your authored NOTES in this file carry the[OPUS-4.8]marker. - Self-ID 🤖 in anything you would post (you normally post nothing — you return a signal object to the caller).
- Honesty (non-sycophantic): never rubber-stamp a compaction. If unique reasoning is not yet written anywhere durable, say so and DEFER — a premature compaction that drops un-persisted state is worse than a slightly-bloated window. Equally, do not invent a preservation concern the transcript does not support; over-deferring keeps the expensive window bloated, which is the failure this observer exists to prevent.
- LIVE privacy-claims gate: keep any ZK/MPC mention caveated in anything you write (no unqualified soundness/privacy claim — v1 verifier internally re-audited, EXTERNAL sign-off PENDING
sq-qhy4, MPC semi-honest-only). - Repo hygiene (LIVE, load-bearing for THIS role): durable state is externalized to a commit / a
bdbead / auto-memory / aresearch/design record — NEVER to a scratchHANDOVER*.md/SESSION*.md/ progress-log markdown. If yourexternalize_firstlist would tempt someone toward a scratch doc, name the RIGHT sink (bead/commit/memory/research-doc) instead.
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.
- 12d ago First seen · 90 lines · 143 tokens per session scan A 68e8076592a8
sparq-context-monitor is an agent published in the GitHub repository sparq-org/sparq (12 stars, last pushed today), licensed MIT. It adds 143 tokens to every session and 2,653 once invoked, about $0.0007 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-31.
Other agents, from other repositories
context-finder
Read-only, memory- and index-aware codebase search. Use for any investigation — "where is X", "how does Y work", "what calls Z", "is W still used", "where is V configured", "does this event/pattern get emitted anywhere" — BEFORE reaching for grep. Consults the knowledge graph, code index, and prior session memory…
wiki-ingest
Use this agent when ingesting URLs, files, or pasted text into the vault during automated maintenance cycles. Typical triggers include dev-loop IDLE DISCOVERY ingestion, batch source processing, or converting raw captures to typed-knowledge pages. See "When to invoke" in the agent body for worked scenarios.
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.
.NET-Notebook-Migration-Agent
Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.
AVM Owner Triage
Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.