rust

Provide production-quality Rust guidance for writing, reviewing, refactoring, and debugging code.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/LudwigAJ/swell --skill rust-ludwigaj
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust
Source: https://github.com/LudwigAJ/swell/tree/main/.claude/skills/rust
Command: npx skills add https://github.com/LudwigAJ/swell --skill rust-ludwigaj

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you write, review, refactor, and debug Rust code without getting stuck on ownership, borrowing, lifetimes, or other compiler-driven pitfalls. It turns common Rust failure modes into clear, production-oriented guidance.

Core Features & Use Cases

  • Ownership and Borrowing Guidance: Avoid moves, borrow conflicts, partial moves, and lifetime mistakes.
  • Idiomatic API Design: Choose the right string, type, newtype, and enum patterns for clear, safe interfaces.
  • Error Handling and Iteration: Use Result, Option, matching, and iterator combinators effectively.
  • Concurrency and Async Safety: Build thread-safe and cancellation-safe Rust with proper async and memory patterns.
  • Advanced Rust Pitfalls: Handle unsafe code, macros, FFI, testing, and performance concerns with confidence.
  • Use Case: A developer implementing an async service can use this Skill to design the API, preserve error context, avoid borrow checker issues, and keep cancellation behavior safe.

Quick Start

Ask for help with your Rust code and mention the file, error, or pattern you want to fix, and the Skill will guide you with idiomatic, production-quality Rust advice.

Frequently Asked Questions about rust

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

FAQPage Schema
How do I fix Rust borrow checker errors when working with async workflows?

To fix Rust borrow checker errors in async workflows, use cancel-safe async structures and idiomatic patterns to avoid borrow conflicts, partial moves, and lifetime mistakes while preserving error context.

What is the best way to handle ownership and borrowing conflicts in Rust?

The best way to handle Rust ownership and borrowing conflicts is to apply production-oriented guidance that resolves moves, borrow conflicts, and lifetime mistakes using idiomatic, defensive exhaustiveness patterns.

How do I design idiomatic Rust APIs that avoid common type-system pitfalls?

Idiomatic Rust API design avoids type-system pitfalls by choosing the right string, newtype, and enum patterns to create clear, safe, and production-quality interfaces.

Why does my Rust code fail due to lifetime and error-handling issues?

Rust code fails due to lifetime and error-handling issues when context-preserving errors and reference-backed best practices are not applied, requiring idiomatic Result, Option, and matching patterns to resolve.

Can I use this guidance for advanced Rust concurrency and unsafe code?

Yes, this guidance applies to advanced Rust concurrency and unsafe code, providing production-quality patterns for thread-safe, cancellation-safe memory management and FFI.

How do I write production-quality Rust iterators without performance traps?

Write production-quality Rust iterators by using iterator combinators effectively and applying performance-sensitive implementations to avoid advanced traps during heavy transformations.