concurrency-correctness

concurrency-correctness is a skill for Claude Code, Codex from thejefflarson/soundcheck. It costs 116 tokens per session (1,002 once invoked), scanned A, original, MIT.

A security check for concurrency mistakes in multi-threaded or asynchronous code. It examines lock usage, deadlock risks, atomic memory ordering, and double-checked locking.

In plain words
What is it for?
It is for reviewing code that uses multiple locks, blocking operations, mutexes, atomic variables, channels, or shared initialization.
Why use it?
It helps find bugs such as deadlocks, data races, and stale or incorrectly visible shared data that may appear only under load.

Skill for Claude CodeCodex

Part of the soundcheck plugin — 50 skills, 7 agents, 2 hooks shipped together

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.

agentmods
npx agentmods add skills/thejefflarson/soundcheck/concurrency-correctness
Any agent
npx skills add thejefflarson/soundcheck --skill concurrency-correctness
Clone the repo
git clone --depth 1 https://github.com/thejefflarson/soundcheck

Made for: Claude Code, Codex.

Or install soundcheck, the plugin that ships this one along with the rest of its 50 skills, 7 agents, 2 hooks.

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 concurrency-correctness

README.md
[![agentmods](https://agentmods.dev/badge/skills/thejefflarson/soundcheck/concurrency-correctness.svg)](https://agentmods.dev/skills/thejefflarson/soundcheck/concurrency-correctness)
Your own site
<a href="https://agentmods.dev/skills/thejefflarson/soundcheck/concurrency-correctness"><img src="https://agentmods.dev/badge/skills/thejefflarson/soundcheck/concurrency-correctness.svg" alt="Measured on agentmods" height="20"></a>
Per session 116 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,002 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00116 $0.01002
Opus 5 $0.00058 $0.00501
Sonnet 5 $0.00023 $0.00200
Haiku 4.5 $0.00012 $0.00100

Measured 4d ago against content hash d819c3892c67, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

concurrency-correctness 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 4d 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.

.claude/skills/concurrency-correctness/SKILL.md · 56 lines

How it starts

The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Concurrency Correctness (CWE-833, CWE-820, CWE-667)

What this checks

Concurrency bugs that read clean in isolation but produce deadlocks, lost wakeups, or data races in production. Race detectors catch triggered races but not structural mistakes. Flags local patterns: lock-around-blocking-call, lock-order in nested acquires, atomic memory order, double-checked locking. Not a replacement for whole-program ownership analysis (borrow checker, lockdep, model checking).

Vulnerable patterns

  • Lock held across a blocking operation — await, sleep, blocking I/O, or a blocking channel send — so every other waiter blocks on the slow thing
  • Inconsistent lock order across call sites — one path acquires (L1, L2), another acquires (L2, L1), producing classic AB-BA deadlock
  • Recursive acquisition of a non-recursive mutex on the same thread
  • Atomic flag published with relaxed ordering where acquire/release is required — the reader can observe the flag set before the writer's payload writes are visible
  • Double-checked locking where the outer read of the published pointer or flag uses no acquire barrier
  • Acquiring a lock and then sending on an unbuffered channel whose receiver needs the same lock to make progress
  • Async cancellation that interrupts a critical section without restoring invariants

Fix immediately

Flag the vulnerable code, explain the risk, and suggest a fix establishing these properties. Translate to the concurrency primitives of the audited file — use that language's documented lock, atomic, once-cell, and channel APIs; do not import a recipe from a different language.

  1. No blocking operation inside a held lock. Snapshot whatever state is needed under the lock, release the lock, then perform the I/O, await, or sleep on the snapshot. The critical section stays bounded by CPU work only.
  2. Lock order is canonical and total. Every code path that acquires two or more locks acquires them in the same sequence — sorted by address, by name, or via a scoped/multi-lock primitive that handles ordering. Document the ordering rule near the lock declarations.
  3. Memory ordering on atomics matches the synchronization need. Use acquire on the read and release on the write whenever an atomic publishes a pointer, flag, or sequence that the reader will then dereference. Relaxed ordering is reserved for counters and statistics where no other state depends on the value.
  4. Lazy initialization uses a primitive that is correct by construction — a one-shot init helper, a function-local static where the language guarantees thread-safe initialization, or an atomic with explicit acquire/release on both the outer and inner reads. Hand-rolled double-checked locking without a barrier is not acceptable.
  5. Non-recursive mutexes are never re-entered on the same thread. When a recursive call site genuinely needs to take the lock again, use the recursive variant explicitly.

Read the full file on GitHub · 56 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. 4d ago First seen · 56 lines · 116 tokens per session scan A d819c3892c67

Subscribe to this mod's changes

concurrency-correctness is a skill published in the GitHub repository thejefflarson/soundcheck (20 stars, last pushed 1mo ago), licensed MIT. It adds 116 tokens to every session and 1,002 once invoked, about $0.0006 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-30.

Related

Other skills, from other repositories

make-skill

Use this skill when sedimenting a session into a reusable workspace skill. Triggers when the user wants to turn the current conversation, workflow, or troubleshooting path into a SKILL.md. Phrases like 'turn this into a skill', 'remember how I did X', 'save this workflow', 'make a skill from this', and any /make-skill…

agentscope-ai/QwenPaw · 85 tokens

make-skill

用于把当前会话沉淀为可复用的 workspace skill。当用户希望把当前对话、工作流或排错路径写成 SKILL.md 时触发。触发表达包括「把这个变成 skill」「记住我是怎么做 X 的」「保存这个工作流」「make a skill from this」以及任何 /make-skill 调用。.

agentscope-ai/QwenPaw · 84 tokens

multi_agent_collaboration

当需要其他 agent 的专长、上下文或协作支持,或用户明确要求调用其他 agent 时,使用本 skill。先查询可用 agents,再用 qwenpaw agents chat 进行双向沟通。.

agentscope-ai/QwenPaw · 52 tokens

dingtalk_channel_connect

Use a headed browser to automatically complete DingTalk channel integration for QwenPaw. Applicable when the user mentions DingTalk, developer console, Client ID, Client Secret, bot, Stream mode, binding or configuring a channel. Supports pausing when a login page is detected and resuming after the user logs in.

agentscope-ai/QwenPaw · 69 tokens

pdf

当用户需要对PDF文件进行任何操作时,请使用此技能。包括从 PDF 中读取或提取文本/表格、合并多个 PDF、拆分 PDF、旋转页面、添加水印、创建新PDF、填写PDF表单、加密/解密 PDF、提取图片,以及对扫描版 PDF 进行 OCR 使其可搜索。如果用户提到 .pdf 文件或要求生成 PDF,请使用此技能。.

agentscope-ai/QwenPaw · 95 tokens

pptx

当涉及到 .pptx 文件的任何操作时使用此技能——无论是作为输入、输出还是两者兼有。包括:创建幻灯片、演示文稿或路演材料;读取、解析或提取任何 .pptx 文件中的文本(即使提取的内容将用于其他地方,如邮件或摘要);编辑、修改或更新现有演示文稿;合并或拆分幻灯片文件;处理模板、布局、演讲者备注或批注。当用户提到“演示文稿”、”幻灯片“、”PPT“或引用 .pptx 文件名时触发,无论他们之后打算如何使用内容。如果需要打开、创建或操作 .pptx 文件,就使用此技能。.

agentscope-ai/QwenPaw · 165 tokens