rust-async-concurrency

rust-async-concurrency is a skill for Claude Code, Codex from fusengine/agents. It costs 57 tokens per session (1,345 once invoked), scanned A, original, MIT.

A guide to asynchronous Rust, where tasks can make progress while waiting for slow work such as network or file operations. It covers task coordination, shared state, channels, locks, and constraints on work sent between threads.

In plain words
What is it for?
Use it when spawning Rust tasks, coordinating concurrent work, sharing state, selecting channels or locks, or resolving Send-related errors in asynchronous traits.
Why use it?
It helps explain concurrency errors and choose safe ways for tasks to communicate or share data.

Skill for Claude CodeCodex

Part of the fuse-rust plugin — 7 skills, 1 agent 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/fusengine/agents/rust-async-concurrency
Any agent
npx skills add fusengine/agents --skill rust-async-concurrency
Clone the repo
git clone --depth 1 https://github.com/fusengine/agents

Made for: Claude Code, Codex.

Or install fuse-rust, the plugin that ships this one along with the rest of its 7 skills, 1 agent.

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 rust-async-concurrency

README.md
[![agentmods](https://agentmods.dev/badge/skills/fusengine/agents/rust-async-concurrency.svg)](https://agentmods.dev/skills/fusengine/agents/rust-async-concurrency)
Your own site
<a href="https://agentmods.dev/skills/fusengine/agents/rust-async-concurrency"><img src="https://agentmods.dev/badge/skills/fusengine/agents/rust-async-concurrency.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,345 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.1 $0.00057 $0.01345
Opus 5 $0.00028 $0.00673
Sonnet 5 $0.00011 $0.00269
Haiku 4.5 $0.00006 $0.00135

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

Security

Grade A, and why

rust-async-concurrency 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 2d 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/rust-expert/skills/rust-async-concurrency/SKILL.md · 128 lines

How it starts

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

It also covers the async-fn-in-traits Send problem — why async fn in traits does not give Send futures by default and how to work around it.

Out of scope: HTTP service structure (routing, extractors, middleware) is owned by rust-web-backend; sync-only ownership and borrowing questions belong to rust-core-language.

Rust Async & Concurrency

Agent Workflow (MANDATORY)

Before writing async code, spawn in parallel:

  1. fuse-ai-pilot:explore-codebase — find the existing runtime, channel, and lock patterns already in use
  2. fuse-ai-pilot:research-expert — verify current tokio/crate APIs via Context7/Exa (async APIs churn)
  3. mcp__context7__query-docs — pull exact signatures for the primitives you touch

After writing, run fuse-ai-pilot:sniper.


Runtime Landscape

Runtime Reality
tokio The de-facto standard. Almost every async crate (axum, sqlx, reqwest, tonic) targets it. Default choice.
async-std Niche, effectively in maintenance mode. Do not pick for new work.
smol Niche, small/embeddable. Only for constrained or embedded contexts.

Default to tokio unless a hard constraint says otherwise.


Critical Rules

  1. std::sync::Mutex first — it is faster. Reach for tokio::sync::Mutex ONLY when the guard must be held across an .await. Otherwise scope the guard so its destructor runs before the await.
  2. Arc<Mutex<T>> is not the default — analyze contention first. Read-dominated → RwLock; a simple counter → atomics; work that is itself async → a task + message passing.
  3. Never drop a JoinHandle you care about — a dropped tokio::spawn handle silently swallows the task's panic/error. .await it, or use JoinSet/tracing to surface failures.
  4. spawn_blocking for heavy sync work — CPU-bound loops or blocking I/O (std file, blocking DB driver) starve the runtime if run on an async worker. Offload them.
  5. Send across .await — everything held across an await point must be Send for tokio::spawn. A std::sync::MutexGuard is NOT Send; holding one across an await is a compile error (and async-mutex guards that are Send deadlock instead).

Read the full file on GitHub · 128 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 128 lines · 57 tokens per session scan A e24f8b84d9fa

Subscribe to this mod's changes

rust-async-concurrency is a skill published in the GitHub repository fusengine/agents (25 stars, last pushed today), licensed MIT. It adds 57 tokens to every session and 1,345 once invoked, about $0.0003 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-03.

Related

Other skills, from other repositories

pinocchio-development

Comprehensive guide for building high-performance Solana programs using Pinocchio - the zero-dependency, zero-copy framework. Covers account validation, CPI patterns, optimization techniques, and migration from Anchor.

sendaifun/skills · 44 tokens

building-telegram-bots

Writes correct, version-aware Telegram bot code. Use when writing, extending, or debugging a Telegram bot in python-telegram-bot, aiogram, grammY, or Telegraf. Not for Telegram client API (TDLib), languages other than Python and Node.js, or non-Telegram platforms.

isvlasov/rageatc-oss · 68 tokens

phx-deps-update

Bump outdated Hex deps — inventory, snapshot changelogs, update, fix breaks, split reviewable PRs (patches bundled, majors solo). Use to upgrade/bump Elixir dependencies or when versions fall behind. NOT for deps.get failures (phx-investigate).

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

phx-document

Generate @moduledoc/@doc for tested Elixir features; may update their README section or ADR. Not for docs lookup, documentation audits/reviews, or capturing standalone decisions.

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

craftcms

Craft CMS 5 plugin and module development — extending Craft with PHP. Covers elements, element queries, services, models, records, controllers, migrations, queue jobs, console commands, field types, native fields, events, behaviors, Twig extensions, widgets, filesystems, permissions, project config, GraphQL, testing…

michtio/craftcms-claude-skills · 327 tokens

craft-php-guidelines

Craft CMS 5 PHP coding standards and conventions. ALWAYS load when writing, editing, reviewing, or discussing any PHP in a Craft plugin or module — even small edits. Also when running ECS, PHPStan, or scaffolding with ddev craft make. Covers: PHPDoc blocks (@author, @since, @throws chains), section headers…

michtio/craftcms-claude-skills · 336 tokens