agentsclimarketplace

Concurrency invariants

Skill yakoshiq/skills/skills/concurrency-invariants

Design, fix, or review concurrent and asynchronous code so atomicity, ordering, retries, idempotency, cancellation, timeouts, ownership, and partial success are explicit. Use for queues, workers, transactions, event handlers, parallel tasks, scheduled jobs, WebSocket/SSE, repeated delivery, concurrent requests, and race-condition fixes.From its SKILL.md

Install
npx -y skills add yakoshiq/skills --skill concurrency-invariants

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 22 days oldThe repository was created 22 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

3.1 KB, 544 tokens by cl100k_base, as published. Nobody here has run it

Concurrency Invariants

Name the guarantee before choosing a mutex, retry, transaction, lease, or idempotency key. Match the repo's architecture; do not force a framework or clarity-first redesign.

Choose scope

  • Review: findings only. Give a possible interleaving and observable impact, not there may be a race.
  • Fix / design: enforce every live part of the contract below. Preserve APIs and local shape unless the guarantee requires a new seam; disclose it.

Build the contract before editing

Answer only what is live, but inspect every line:

  1. Guarantee: What must be impossible or remain true?
  2. Ownership: Which component owns each state and effect? Is coordination process-local, shared, or remote?
  3. Commit points: What changes atomically? Which effects cannot share that boundary?
  4. Replay: What can run again? What stable identity follows one logical operation to the owner that deduplicates it?
  5. Scheduling: What may overlap or reorder? What needs per-key serialization or fencing?
  6. Interruption: At each timeout, cancellation, or failure boundary, what may already have happened? What is pending, and who resumes or compensates?

A timeout or lost response is an unknown outcome unless the API proves the effect was not applied. Name only guarantees the mechanisms really provide.

Enforce every boundary

  • Inside one owned store, use its transaction, compare-and-set, or uniqueness primitive when needed.
  • A process-local lock protects one process. Shared leases need owner tokens or fencing so stale owners cannot commit after takeover.
  • A local lock or transaction does not own a remote effect. Give replayable effects stable identity at the owner and reconcile unknown outcomes with that same identity.
  • If one effect commits before another can happen, persist the pending work or compensation with the commit. Expose partial success instead of reporting that nothing happened.
  • Retry only replay-safe, classified transient failures. Propagate cancellation to owned work; releasing local ownership does not determine a remote outcome.

One mechanism cannot satisfy guarantees across different owners. Do not stop after fixing the first race.

Completion gate

Before shipping, challenge the result with duplicate delivery, concurrent attempts, allowed reordering, timeout/cancellation around every commit point, failure between effects, and stale-owner completion. If a requested guarantee still depends on timing luck or an undocumented recovery path, the fix is incomplete.

Use deterministic barriers, controlled futures, or fake clocks, not real sleeps. Assert visible state and effect counts. Ship the fix or findings, focused checks, and any guarantee the existing seam cannot provide - no checklist dump.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,750. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.