shared-mutable-index-rmw-race-use-marker-blob-per-item

shared-mutable-index-rmw-race-use-marker-blob-per-item is a skill for Claude Code from wan-huiyan/agent-traffic-control. It costs 48 tokens per session (2,308 once invoked), scanned A, original, MIT.

A design rule for a shared list of active or recent items written by several producers at the same time. It stores one marker per item instead of repeatedly rewriting one shared list.

In plain words
What is it for?
Use it when building a shared index of active sessions, in-flight jobs, uploads, or other items that multiple processes register and a reader later prunes.
Why use it?
Several writers or a cleanup process can read and then overwrite the same list, silently losing another writer's entry. Separate markers avoid that read-then-rewrite race and make individual entries easier to remove.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Claude Code.

Part of the agent-traffic-control plugin — 107 skills shipped together

Good fit Use it when building a shared index of active sessions, in-flight jobs, uploads, or other items that multiple processes register and a reader later prunes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wan-huiyan/agent-traffic-control/shared-mutable-index-rmw-race-use-marker-blob-per-item
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.

Any agent
npx skills add wan-huiyan/agent-traffic-control --skill shared-mutable-index-rmw-race-use-marker-blob-per-item
Clone the repo
git clone --depth 1 https://github.com/wan-huiyan/agent-traffic-control

Made for: Claude Code.

Or install agent-traffic-control, the plugin that ships this one along with the rest of its 107 skills.

Wrote 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.

agentmods badge for shared-mutable-index-rmw-race-use-marker-blob-per-item

README.md
[![agentmods](https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/shared-mutable-index-rmw-race-use-marker-blob-per-item/github.svg)](https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/shared-mutable-index-rmw-race-use-marker-blob-per-item)
Your own site
<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.

agentmods 80×15 button for shared-mutable-index-rmw-race-use-marker-blob-per-item

Your own site · 80×15
<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>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,308 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found 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.1 $0.00048 $0.02308
Opus 5 $0.00024 $0.01154
Sonnet 5 $0.00010 $0.00462
Haiku 4.5 $0.00005 $0.00231

Measured 7d ago against content hash 2d81f643dca7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

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.

plugins/agent-traffic-control/skills/shared-mutable-index-rmw-race-use-marker-blob-per-item/SKILL.md · 152 lines

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:

  1. Reader reads [A].
  2. Producer reads [A], computes [X, A], writes [X, A].
  3. 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-restart and reconstruction-from-durable-store-must-replicate-completion-gate.

Read the full file on GitHub · 152 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. 7d ago First seen · 152 lines · 48 tokens per session scan A 2d81f643dca7

Subscribe to this mod's changes

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.

Related

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.

secondsky/claude-skills · 45 tokens

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.

oliver-kriska/claude-elixir-phoenix · 46 tokens

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.

secondsky/claude-skills · 53 tokens

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.

secondsky/claude-skills · 43 tokens

cloudflare-d1

Cloudflare D1 serverless SQLite on edge. Use for databases, migrations, bindings, or encountering D1ERROR, statement too long, too many requests queued errors.

secondsky/claude-skills · 39 tokens

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"…

secondsky/claude-skills · 104 tokens