rust

Enforce Rust formatting, linting, and safety conventions for code generation and review.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Pyl-Tech/stream-coding --skill rust-pyl-tech
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rust
Source: https://github.com/Pyl-Tech/stream-coding/tree/main/.agents/skills/rust
Command: npx skills add https://github.com/Pyl-Tech/stream-coding --skill rust-pyl-tech

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you prevent Rust code review churn and production failures by ensuring your specification explicitly covers Rust conventions, safety constraints, ownership/borrowing rules, and verification expectations.

Core Features & Use Cases

  • Rust formatting & lint gates: Requires cargo fmt and cargo clippy -- -D warnings to keep code style consistent and warnings treated as errors.
  • Ownership, borrowing, and immutability guidance: Forces specs to document when to borrow vs own, when Cow applies, and when mutation is justified.
  • Production-grade error handling & testing patterns: Mandates Result + ?, context-aware errors, and appropriate unit/integration/property/async testing approaches.
  • Security and review checklists: Requires explicit invariants for unsafe, dependency/audit tooling expectations, and a targeted review rubric for high-severity issues.

Quick Start

Ask your AI to generate a Rust project spec that follows the required conventions for ownership, error handling, security (including unsafe safety comments), and the code-review checklist.

Frequently Asked Questions about rust

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

FAQPage Schema
How do I enforce Rust ownership and borrowing rules in code review?▼

You enforce Rust ownership and borrowing rules in code review by mandating specifications that document when to borrow versus own, when Cow applies, and when mutation is justified.

How do I configure cargo fmt and clippy gates for Rust CI pipelines?▼

Configure cargo fmt and clippy gates for Rust CI pipelines by treating warnings as errors using cargo clippy -- -D warnings and enforcing rustfmt as a non-negotiable formatting check before merging code.

What is the best way to handle errors in production Rust applications?▼

The best way to handle errors in production Rust applications is to mandate Result with the ? operator, provide context-aware error messages, and define appropriate unit, integration, property, and async testing patterns.

How do I document unsafe Rust blocks for security reviews?▼

Document unsafe Rust blocks for security reviews by writing explicit invariants and safety comments that explain the security-aware reasoning behind the unsafe usage, dependencies, and audit tooling expectations.

Does this Rust specification approach work with existing Cargo.toml projects?▼

Yes, this Rust specification approach works with existing Cargo.toml projects, applying directly to .rs modules, Cargo-based CI/linting pipelines, and production or library/application code reviews.

Why does my Rust code review keep failing over ownership and safety constraints?▼

Your Rust code review keeps failing because your specifications lack explicit coverage of safety constraints, ownership/borrowing rules, and verification expectations required to prevent production failures and review churn.