loom-concurrency

loom-concurrency is a skill for Claude Code, Codex from cosmix/loom. It costs 17 tokens per session (4,819 once invoked), scanned A, original, MIT.

A reference for safely running work concurrently in Rust, Python, TypeScript, and Go. Concurrency means doing multiple tasks in overlapping or parallel execution, including asynchronous tasks and threads.

In plain words
What is it for?
Use it when implementing async code, worker pools, parallel processing, shared-state or message-passing systems, and when debugging race conditions or deadlocks.
Why use it?
It helps identify problems such as data races, deadlocks, unbounded queues, cancellation errors, and incorrect memory ordering. It also compares suitable execution models for input/output and CPU-heavy work.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when implementing async code, worker pools, parallel processing, shared-state or message-passing systems, and when debugging race conditions or deadlocks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cosmix/loom/loom-concurrency
View source ↗ cosmix/loom
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 cosmix/loom --skill loom-concurrency
Clone the repo
git clone --depth 1 https://github.com/cosmix/loom

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/cosmix/loom/loom-concurrency/github.svg)](https://agentmods.dev/skills/cosmix/loom/loom-concurrency)
Your own site
<a href="https://agentmods.dev/skills/cosmix/loom/loom-concurrency"><img src="https://agentmods.dev/badge/skills/cosmix/loom/loom-concurrency/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 loom-concurrency

Your own site · 80×15
<a href="https://agentmods.dev/skills/cosmix/loom/loom-concurrency"><img src="https://agentmods.dev/badge/skills/cosmix/loom/loom-concurrency.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,819 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00017 $0.04819
Opus 5.5 $0.00007 $0.01928
Sonnet 5.5 $0.00003 $0.00964
Haiku 4.5 $0.00002 $0.00482

Measured 11d ago against content hash cd792050357d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

loom-concurrency scanned grade A with 1 finding 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 11d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

tg.create_task(fetch(a))
skills/loom-concurrency/SKILL.md · 298 lines

How it starts

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

Concurrency

Overview

Cross-language concurrency reference organized by concept, not by language. Each concept lists the shared principle plus per-language gotcha callouts for Rust (tokio), Python (asyncio), TypeScript (event loop), and Go. The hard part is never the happy-path API; it's the failure modes — data races, deadlocks, latent OOM from unbounded queues, futures dropped mid-flight by cancellation, and memory-ordering bugs that only surface under load on weakly-ordered CPUs.

Agent Delegation

  • loom-senior-software-engineer (Opus) — DEFAULT. Threading models, shared-state vs message-passing, race/TOCTOU analysis, lock ordering, memory ordering, distributed concurrency/consistency, saga patterns.
  • loom-software-engineer (Sonnet) — ONLY boilerplate async handlers or unit tests following an established pattern.

Mental Model: Pick the Right Executor

Workload Rust Python TS/JS Go
I/O-bound tokio tasks asyncio async/Promises goroutines
CPU-bound rayon / spawn_blocking ProcessPoolExecutor Worker threads goroutines (real parallelism)
Blocking call in async spawn_blocking run_in_executor/to_thread Worker fine (goroutines block cheaply)

Runtime model determines everything:

  • Rust/tokio, Go — genuinely multi-threaded; tasks run on a thread pool → shared mutable state needs real synchronization.
  • Python asyncio — single OS thread; the GIL means asyncio gives you concurrency, not parallelism. Great for I/O, useless for CPU (one core). CPU work → ProcessPoolExecutor. A blocking call (sync DB driver, time.sleep, heavy compute) freezes the entire event loop.
  • JS/TS — single-threaded event loop. Same rule: a long synchronous loop blocks all timers, I/O callbacks, and rendering. CPU work → Web/Worker threads. There are no data races on shared JS objects (no preemption between awaits within a microtask), but state can change across an await.

Read the full file on GitHub · 298 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. 11d ago Changed · +2 lines cd792050357d
  2. 2mo ago Changed · -42 tokens per session 6954531d93a5
  3. 3mo ago First seen · 296 lines · 59 tokens per session scan A 152b10f57270

Subscribe to this mod's changes

loom-concurrency is a skill published in the GitHub repository cosmix/loom (66 stars, last pushed yesterday), licensed MIT. It adds 17 tokens to every session and 4,819 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

loom-concurrency compared with skills from other repositories

loom-concurrency next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
loom-concurrencycosmix/loomSkill66yesterdayMITA17Claude Code, Codex
idiomatic-goTypeFox/agent-skillsSkill51mo agoMITA137Claude Code
eclipse-license-checkTypeFox/agent-skillsSkill51mo agoMITA110Claude Code
go-documentationTypeFox/agent-skillsSkill51mo agoMITA98Claude Code
publish-vscode-extensionTypeFox/agent-skillsSkill51mo agoMITA107Claude Code
domainmodel-dslTypeFox/agent-skillsSkill51mo agoMITA68Claude Code
statemachine-dslTypeFox/agent-skillsSkill51mo agoMITA63Claude Code