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 wan-huiyan/agent-traffic-control --skill shared-mutable-index-rmw-race-use-marker-blob-per-itemgit clone --depth 1 https://github.com/wan-huiyan/agent-traffic-controlWrote 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/wan-huiyan/agent-traffic-control/shared-mutable-index-rmw-race-use-marker-blob-per-item)<a href="https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/shared-mutable-index-rmw-race-use-marker-blob-per-item"><img src="https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/shared-mutable-index-rmw-race-use-marker-blob-per-item/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/wan-huiyan/agent-traffic-control/shared-mutable-index-rmw-race-use-marker-blob-per-item"><img src="https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/shared-mutable-index-rmw-race-use-marker-blob-per-item.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.00048 | $0.02308 |
| Opus 5 | $0.00024 | $0.01154 |
| Sonnet 5 | $0.00010 | $0.00462 |
| Haiku 4.5 | $0.00005 | $0.00231 |
Grade A, and why
shared-mutable-index-rmw-race-use-marker-blob-per-item 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 7d 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 — 152 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Shared mutable index → use a marker blob/row per item (not a read-modify-written list)
Problem
You are building a feature where multiple producers concurrently register items into a shared collection, and a reader periodically prunes dead entries — e.g. a "see everyone's in-flight runs / active sessions / recent uploads" list shown on a home/dashboard page, shared across a team / workspace / user.
The tempting design is one shared mutable container that you read-modify-write:
# register (producer) # render + prune (reader)
ids = read(index) ids = read(index)
ids = [new_id] + dedupe(ids) live = [i for i in ids if still_alive(i)]
write(index, ids[:CAP]) write(index, live) # prune
This has a read-modify-write race. Interleave two callers:
- Reader reads
[A]. - Producer reads
[A], computes[X, A], writes[X, A]. - Reader writes its pruned copy
[A](computed in step 1, before X existed).
X is now permanently gone from the index. It is never re-added — registration fires once, at create time. So the very item the feature promises to surface silently never appears for anyone. It is not self-correcting (a common false assumption). The window is small, but it is exactly the "two people working at once" moment the feature exists to serve, and a janitor/prune reader widens it.
Context / Trigger Conditions
- You're DESIGNING (or reviewing) a shared "active items / recent items / running now / activity feed" index with concurrent writers and a pruning reader.
- The backing store is a single read-modify-written container: a JSON array in one GCS/S3/object-store blob, a DB array/JSON column, a shared cookie list, one file.
- Symptom in the wild: an item a colleague just created never shows up in the shared list; intermittent "missing entries" that no single user can reproduce; a code reviewer flags a race on the index write-back.
- Adjacent (the durable-pointer / reconstruction half of these features):
see also
in-memory-job-registry-orphans-cloud-result-on-restartandreconstruction-from-durable-store-must-replicate-completion-gate.
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.
- 7d ago First seen · 152 lines · 48 tokens per session scan A 2d81f643dca7
shared-mutable-index-rmw-race-use-marker-blob-per-item is a skill published in the GitHub repository wan-huiyan/agent-traffic-control (3 stars, last pushed yesterday), licensed MIT. It adds 48 tokens to every session and 2,308 once invoked, about $0.0002 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-09-05.
Other skills, from other repositories
cloudflare-hyperdrive
Cloudflare Hyperdrive for Workers-to-database connections with pooling and caching. Use for PostgreSQL/MySQL, Drizzle/Prisma, or encountering pool errors, TLS issues, connection refused.
phoenix-contexts
Phoenix context design — creating/splitting contexts, Scope (1.8+), Ecto.Multi, PubSub, routers, plugs, controllers. Use when editing contexts, routers, or designing boundaries.
better-auth
Skill for integrating Better Auth - comprehensive TypeScript authentication framework for Cloudflare D1, Next.js, Nuxt, and 15+ frameworks. Use when adding auth, encountering D1 adapter errors, or implementing OAuth/2FA/RBAC features.
cloudflare-durable-objects
Cloudflare Durable Objects for stateful coordination and real-time apps. Use for chat, multiplayer games, WebSocket hibernation, or encountering class export, migration, alarm errors.
cloudflare-d1
Cloudflare D1 serverless SQLite on edge. Use for databases, migrations, bindings, or encountering D1ERROR, statement too long, too many requests queued errors.
cloudflare-images
This skill should be used when the user asks to "upload images to Cloudflare", "implement direct creator upload", "configure image transformations", "optimize WebP/AVIF", "create image variants", "generate signed URLs", "add image watermarks", "integrate with Next.js/Remix", "configure webhooks", "debug CORS errors"…