Skip to content
Back to skills

Rust Guidelines

ASecurity

Use when writing, refactoring, or reviewing Rust against API and engineering guidelines, auditing crate readiness, or defining ownership, error, safety, and allocation contracts. Covers naming, public APIs, interoperability, documentation, macros, and verification. Not a Rust tutorial or profiling playbook.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 9, 2026
ai-agentsrustgorefactoringapiperformancedocumentation

Works with

  • api

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned November 9, 2026

npx -y skills add Lu1sDV/skillsmd --skill rust-guidelines --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rust Guidelines?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Rust Guidelines
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/lu1sdv-rust-guidelines/badge)](https://www.skillsdirectory.com/skills/lu1sdv-rust-guidelines)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: rust-guidelines
description: >
  Use when writing, refactoring, or reviewing Rust against API and engineering
  guidelines, auditing crate readiness, or defining ownership, error, safety,
  and allocation contracts. Covers naming, public APIs, interoperability,
  documentation, macros, and verification. Not a Rust tutorial or profiling playbook.
---

# Rust Guidelines

Apply an idiomatic API baseline plus requirement-driven engineering checks.
Correctness and soundness are mandatory; design recommendations are defaults,
not reasons to break a public contract.

## Workflow

1. Read repository instructions, affected callers, and Cargo configuration.
   Identify crate versus application, edition, minimum supported Rust version
   (MSRV), targets, features, and explicit resource or compatibility promises.
2. Open only references implicated by the task. For a broad audit, scope coverage
   using the table first. Do not preload the bundle or routinely fetch upstream.
3. Make the smallest contract-preserving change. Separate defects, contract
   violations, and optional improvements. Do not add dependencies, upgrade the
   MSRV, or impose heapless execution merely to satisfy a checklist.
4. Verify affected behavior and callers with the project's checks. Record
   configurations, results, and unexecuted checks.

## Load by topic

| Task or question | Read |
|---|---|
| Naming, ownership, types, builders, ergonomics, evolution | [API shape](references/api-shape.md) |
| Standard traits, conversions, errors, features, Send/Sync | [Interoperability](references/interoperability.md) |
| Validation, panics, output-buffer errors, unsafe or FFI | [Correctness](references/correctness.md) |
| Memory profiles, bounded work, performance claims | [Memory and performance](references/memory-performance.md) |
| Public Rust macro design or review | [Macros](references/macros.md) |
| Rustdoc, releases, Cargo checks, lints, verification | [Documentation and tooling](references/documentation-tooling.md) |

## Decision rules

Make ownership, mutation, failure, blocking, and resource obligations explicit.
Return ordinary values unless caller-owned storage has a real purpose; an owned
result is not automatically an allocation. Use allocation-conscious code unless
stricter requirements are established. A project policy is not a language guarantee.

## Completion

For reviews, report a location, observable consequence, minimal correction, and
verification status for each actionable finding; omit speculation. For changes,
summarize behavior, compatibility effects, checks, and limitations. Performance
and allocation guarantees must not exceed their evidence.

[Sources and adaptation](README.md) is maintainer context, not a prerequisite read.

Files in this skill

  • README.md2.1 KB
  • SKILL.md2.7 KB
  • references/api-shape.md2.4 KB
  • references/correctness.md2.1 KB
  • references/documentation-tooling.md2.8 KB
  • references/interoperability.md3.1 KB
  • references/macros.md1.2 KB
  • references/memory-performance.md2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.