rust-async-conventions

Installation
SKILL.md

Rust Async Conventions

Apply these conventions in async Rust projects. These rules are written for any coding agent, including Claude Code, Codex, Cursor, and Copilot.

Async Fundamentals

  • An async fn returns a Future; it does nothing until awaited or driven by an executor.
  • Do not call an async function without awaiting or spawning it.
  • Use .await, not block_on, inside async contexts.
  • Use async move blocks when a future must own captured values and outlive the current scope.

Lifetimes in Async

  • A future returned by an async fn borrows its non-'static arguments.
  • Await such futures while their borrowed arguments remain valid.
  • When lifetime issues arise, move owned arguments into an async block.
  • Futures passed to tokio::spawn or similar APIs must be 'static; move owned data in or use Arc.

Send and Sync

Installs
32
Repository
avbel/ai-skills
GitHub Stars
2
First Seen
May 16, 2026