m07-concurrency

Diagnose Rust concurrency errors and guide async or multithreaded design decisions.

Updated Feb 12, 2026
One-click install
npx skills add https://github.com/jmduea/emotiv-cortex-rs --skill m07-concurrency-jmduea
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: m07-concurrency
Source: https://github.com/jmduea/emotiv-cortex-rs/tree/main/.github/skills/m07-concurrency
Command: npx skills add https://github.com/jmduea/emotiv-cortex-rs --skill m07-concurrency-jmduea

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps developers resolve compile‑time Send/Sync errors, avoid deadlocks, and choose the right threading or async primitives for Rust projects.

Core Features & Use Cases

  • Error Diagnosis: Translates Rust concurrency errors into concrete design questions.
  • Decision Flow: Provides a step‑by‑step flowchart to select threads, async tasks, channels, or lock types based on workload and sharing model.
  • Domain Tracing: Links errors to domain‑specific constraints (e.g., web APIs, CLI tools) for tailored solutions.
  • Pattern Library: Offers ready‑to‑use async, channel, and thread patterns with best‑practice recommendations.
  • Anti‑Patterns & Fixes: Highlights common pitfalls such as holding mutex guards across awaits or misusing Rc in multithreaded contexts.

Quick Start

Ask the skill to analyze a Rust function and receive a concise recommendation of the appropriate concurrency strategy.

Frequently Asked Questions about m07-concurrency

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix Rust Send and Sync compile errors in async code?

Fixing Rust Send and Sync compile errors requires adjusting types to safely cross thread boundaries. This skill diagnoses such errors by translating them into concrete design questions about your sharing model and guiding selection of appropriate async primitives.

What is the best way to choose between threads and async tasks in Rust?

Choosing between threads and async tasks in Rust requires evaluating workload and sharing models. This skill provides a step-by-step decision flowchart to select threads, async tasks, channels, or lock types based on specific domain constraints.

How do I avoid deadlocks and holding mutex guards across awaits in Rust?

Avoiding deadlocks and holding mutex guards across awaits in Rust requires restructuring lock strategies and task boundaries. This skill highlights common anti-patterns and provides ready-to-use patterns with best-practice recommendations to ensure thread safety.

Why does using Rc in multithreaded Rust contexts cause concurrency issues?

Using Rc in multithreaded Rust contexts causes concurrency issues because it is not thread-safe and fails Send and Sync checks. This skill identifies such anti-patterns and recommends appropriate thread-safe alternatives for your concurrency design.

Can I get a concurrency strategy recommendation for a specific Rust function?

You can get a concurrency strategy recommendation for a specific Rust function by asking this skill to analyze it. It diagnoses errors and provides concise recommendations for appropriate threading, async primitives, and lock strategies.