Claude Marketplaces
SkillsMCP serversMarketplacesDigestTools
Submit

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP servers by category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control
Claude Marketplaces

An independent directory of skills, plugins and MCP servers for Claude Code. Not affiliated with Anthropic.

Browse

  • Skills
  • MCP servers
  • Marketplaces
  • Weekly digest
  • Skill index
  • MCP index
  • Marketplace index

Site

  • About
  • Tools
  • Submit
  • Feedback
  • Privacy
  • llms.txt
  • Plugins reference

Maker

  • Snug
  • Agent Caffeine
  • knobs
  • Wax
  • Vectoys
  • mertduzgun.com
Crafted at
Skills/Debugging
wshobson avatar

Rust Async Patterns

wshobson/agents

A comprehensive guide to async Rust that goes beyond the basics. Covers production patterns like JoinSet for concurrent tasks, proper channel selection between mpsc/broadcast/oneshot, graceful shutdown with CancellationToken, and async trait implementations. The error handling section shows both anyhow and thiserror approaches with concrete examples. What I like here is the emphasis on real patterns you actually need in production, not just hello world async examples. The concurrency limiting with buffer_unordered and timeout wrappers address common pain points. Good reference when you're past the "add .await everywhere" stage and need to build robust async systems.

installs
20.8K
GitHub stars
41.8K
last updated
Aug 21, 2026
View on GitHubSave

Install

$ npx -y skills add wshobson/agents --skill rust-async-patterns --agent claude-code

Installs into .claude/skills of the current project.

Files

Rust Async Patterns

Production patterns for async Rust programming with Tokio runtime, including tasks, channels, streams, and error handling.

When to Use This Skill

  • Building async Rust applications
  • Implementing concurrent network services
  • Using Tokio for async I/O
  • Handling async errors properly
  • Debugging async code issues
  • Optimizing async performance

Core Concepts

1. Async Execution Model

Future (lazy) → poll() → Ready(value) | Pending
                ↑           ↓
              Waker ← Runtime schedules

2. Key Abstractions

ConceptPurpose
FutureLazy computation that may complete later
async fnFunction returning impl Future
awaitSuspend until future completes
TaskSpawned future running concurrently
RuntimeExecutor that polls futures

Quick Start

# Cargo.toml
[dependencies]
tokio = { version = "1", features = ["full"] }
futures = "0.3"
async-trait = "0.1"
anyhow = "1.0"
tracing = "0.1"
tracing-subscriber = "0.3"
use tokio::time::{sleep, Duration};
use anyhow::Result;

#[tokio::main]
async fn main() -> Result<()> {
    // Initialize tracing
    tracing_subscriber::fmt::init();

    // Async operations
    let result = fetch_data("https://api.example.com").await?;
    println!("Got: {}", result);

    Ok(())
}

async fn fetch_data(url: &str) -> Result<String> {
    // Simulated async operation
    sleep(Duration::from_millis(100)).await;
    Ok(format!("Data from {}", url))
}

Detailed patterns and worked examples

Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.

Best Practices

Do's

  • Use tokio::select! - For racing futures
  • Prefer channels - Over shared state when possible
  • Use JoinSet - For managing multiple tasks
  • Instrument with tracing - For debugging async code
  • Handle cancellation - Check CancellationToken

Don'ts

  • Don't block - Never use std::thread::sleep in async
  • Don't hold locks across awaits - Causes deadlocks
  • Don't spawn unboundedly - Use semaphores for limits
  • Don't ignore errors - Propagate with ? or log
  • Don't forget Send bounds - For spawned futures
SKILL.md on GitHub

Sponsors

SnugThe clipboard manager you and your agent can use, safelyAgent CaffeineClose your lid, come back to finished workWaxBlock anything with supervision, without erasing your iPhoneOpen StepsSponsoredFree and open-source skills that make AI coding agents easier to understand, verify, and control.

Details

Repository
github.com/wshobson/agents
Categories
Debugging, Rust

More from wshobson/agents

All 174
  • Javascript Testing Patterns20.6K
  • Sql Optimization Patterns19.9K
  • Threat Mitigation Mapping19.9K
  • Auth Implementation Patterns19.7K
  • Git Advanced Workflows19.5K
  • Dotnet Backend Patterns19.2K
  • Async Python Patterns18.2K
  • Attack Tree Construction17.7K
  • Database Migration17.6K
  • Github Actions Templates17.6K
  • Godot Gdscript Patterns17.6K
  • Data Storytelling17K
  • Backtesting Frameworks16.9K
  • Python Code Style16.6K
  • Openapi Spec Generation16.5K
  • Kpi Dashboard Design16.3K
  • Interaction Design16.3K
  • Design System Patterns16.1K
  • Terraform Module Library15.7K
  • React Native Design15.6K
  • Solidity Security15.5K
  • React State Management15.4K
  • Uv Package Manager15.3K
  • React Native Architecture15.2K

Recommended

More Debugging
1wshobson avatarsql-optimization-patternswshobson/agentsMaster SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries. Use when debug19.9Kinstalls
2jeffallan avatargolang-projeffallan/claude-skillsImplements concurrent Go patterns using goroutines and channels, designs and builds microservices with gRPC or REST, optimizes Go application performance with p19Kinstalls
3vercel avatarnext-cache-components-optimizervercel/next.jsDrive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navig18.9Kinstalls
4madteacher avatarflutter-animationsmadteacher/mad-agents-skillsAdd, fix, refactor, debug, test, or explain Flutter animations and motion effects. Use when working with implicit animations such as AnimatedContainer, Animated15.4Kinstalls
5github avatarchrome-devtoolsgithub/awesome-copilotExpert-level browser automation, debugging, and performance analysis using Chrome DevTools MCP. Use for interacting with web pages, capturing screenshots, analy15.3Kinstalls
6jeffallan avatarkubernetes-specialistjeffallan/claude-skillsUse when deploying or managing Kubernetes workloads. Invoke to create deployment manifests, configure pod security policies, set up service accounts, define net14.1Kinstalls