rust-developer

Provide Rust development guidelines for error handling, file I/O safety, and type safety.

11|3|Updated Oct 31, 2025
One-click install
npx skills add https://github.com/dwalleck/catalyst --skill rust-developer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-developer
Source: https://github.com/dwalleck/catalyst/tree/main/.claude/skills/rust-developer
Command: npx skills add https://github.com/dwalleck/catalyst --skill rust-developer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides comprehensive Rust development guidelines derived from real-world code reviews, helping teams write safer, more idiomatic, and high-performance Rust code while avoiding common pitfalls.

Core Features & Use Cases

  • Comprehensive Rules: 20+ lessons covering error handling, ownership, and patterns for robust Rust.
  • Boundaries & Validation: Guidance on input validation, error propagation, and safe API design.
  • Practical Deep Dives: Deep dives on file I/O safety, type safety, and performance optimization.
  • Use Case: When reviewing a Rust PR, quickly reference best-practice checks to ensure idiomatic and safe changes.
  • Immediate Guidance: A Quick Start to scan the Quick Reference and core deep-dives.

Quick Start

Start with the Quick Reference (quick-reference.md) and read Error Handling Deep Dive, File I/O Deep Dive, and Type Safety Deep Dive to establish a solid baseline.

Frequently Asked Questions about rust-developer

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

FAQPage Schema
How do I write safer Rust code and avoid common pitfalls?

Rust safety relies on ownership, borrowing, and type systems to prevent memory errors at compile time. This Skill delivers 20+ lessons on error handling, file I/O safety, and type safety patterns derived from real-world code reviews, helping you write idiomatic code that compiles safely.

What's the best way to handle errors in Rust?

Error handling in Rust uses Result types and proper propagation to distinguish recoverable errors from unrecoverable ones. The Error Handling Deep Dive covers validation, error propagation, and safe API design to ensure your code fails predictably and safely.

How do I optimize Rust code for performance?

Performance optimization in Rust focuses on ownership patterns, avoiding unnecessary allocations, and leveraging the type system. The Skill includes practical deep dives on performance optimization techniques that maintain safety while achieving speed.

Can I use Rust for file I/O operations safely?

Rust's type system prevents many file I/O bugs, but safe handling requires proper error handling and resource management. The File I/O Deep Dive covers resource cleanup, error cases, and patterns for safe file operations in production CLI tools and hooks.

What should I review when checking a Rust PR for best practices?

PR reviews should validate ownership correctness, error handling patterns, type safety, and idiomatic code structure. The Quick Reference and deep dives provide 20+ checks for ensuring Rust changes are safe, performant, and follow team standards.

Does Rust prevent memory leaks and undefined behavior?

Rust's ownership system eliminates entire categories of memory errors—null pointers, use-after-free, data races—at compile time. This Skill teaches the patterns and guardrails that make Rust fundamentally safer than C or C++ for systems code.