m07-concurrency — Claude Code skill for Rust concurrency
Guides Rust concurrency and async decisions, from Send/Sync errors to locks and channels. Use it when spawned tasks, shared state, or deadlocks need design review.
npx skills add actionbook/rust-skills --skill m07-concurrency -a claude-codeWhat m07-concurrency does
This skill guides Rust concurrency and async work by separating CPU-bound work from I/O-bound work, then checking how data is shared. It points CPU parallelism toward std::thread or rayon, while I/O concurrency uses async/await with tokio or async-std.
It helps select Arc<T> for immutable sharing, Arc<Mutex<T>> or Arc<RwLock<T>> for mutable state, channels for message passing, and atomic types for simple operations. It also covers E0277, a future is not Send, lock ordering, and a MutexGuard that remains alive across await.
The skill asks whether a type should cross thread boundaries before adding Send or wrapping it in a lock. Holding a lock across await can hold up other tasks, so that is a reason to tighten the guard's scope.
What it helps with
- diagnose an
E0277SendorSyncerror - choose threads or
async/awaitfor Rust work - share state across threads with channels
- keep
MutexGuardout of anawaitscope - trace a deadlock to lock ordering
Example prompts for the agent
- Analyse this
E0277error: my type cannot be sent between threads. - I need parallel CPU work in Rust. Should this use
std::threadorrayon? - Check why this
future is not Sendafterawaitintokio::spawn.
How to install m07-concurrency
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill m07-concurrency -a claude-code2Manually: put the files in place
~/.claude/skills/m07-concurrency/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/m07-concurrency/
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill m07-concurrency -a codex2Manually: put the files in place
.agents/skills/m07-concurrency/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill m07-concurrency -a cursor2Manually: put the files in place
.cursor/skills/m07-concurrency/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install actionbook/rust-skills m07-concurrency2Manually: put the files in place
.github/skills/m07-concurrency/SKILL.md1Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill m07-concurrency -a gemini-cli2Platform CLI
gemini skills install https://github.com/actionbook/rust-skills --path skills/m07-concurrencyManually: put the files in place
.devin/skills/m07-concurrency/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add actionbook/rust-skills --skill m07-concurrency -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about m07-concurrency
How do I install m07-concurrency in Claude Code?
Run npx skills add actionbook/rust-skills --skill m07-concurrency -a claude-code, then run npx skills add actionbook/rust-skills --skill m07-concurrency -a claude-code again. The skill file is at ~/.claude/skills/m07-concurrency/SKILL.md.
What does m07-concurrency do?
It guides design choices for concurrent and async Rust code, including threads, Send, Sync, futures, locks, and channels. It also helps investigate common compiler and runtime issues around shared state.
How does it choose between Mutex, RwLock, and channels?
For mutable shared state, it considers Mutex or RwLock; RwLock is suited to read-heavy shared access. When state does not need to be shared, it points to message passing through channels.