skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
full-stack-skills/rust-skills103 installs

rust-stable

Implement and explain stable Rust language semantics with explicit toolchain and MSRV checks — ownership, borrowing, lifetimes, move semantics, traits, generics, associated types, pattern matching, closures, error propagation, and Edition differences. Use as the core Rust language skill when users ask for Rust syntax, compiler-error fixes, ownership/borrowing diagnoses, or version-sensitive stable code; hand std API selection (which collection, which smart pointer, which string type) to rust-stdlib, "how do I write X" pattern questions to rust-by-example, and specialized domains to their dedicated skills.

How do I install this agent skill?

npx skills add https://github.com/full-stack-skills/rust-skills --skill rust-stable
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    The 'rust-stable' skill is a comprehensive reference and implementation guide for the Rust programming language. It utilizes standard local development tools and official documentation sources to assist with language semantics and code validation. No malicious patterns or security risks were identified.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

What does this agent skill do?

Rust Stable Language Semantics

Use this skill for language semantics: ownership, borrowing, lifetimes, traits, generics, pattern matching, error propagation, and Edition differences. First verify the project's actual toolchain and Minimum Supported Rust Version (MSRV).

For standard-library API selection (which collection, which smart pointer, which string type, which I/O trait), use rust-stdlib. For concrete pattern examples ("how do I write X"), use rust-by-example.

Prerequisites Before Starting

  1. Run rustc --version --verbose and cargo --version.
  2. Inspect the rust-version field in rust-toolchain.toml, rust-toolchain, and Cargo.toml.
  3. Distinguish between three versions: local toolchain, project MSRV, and current official stable release.
  4. When encountering version-sensitive APIs, consult Current Stable Baseline and rely on official release notes and API documentation as the final authority.
  5. If a project is locked to an old version, strictly adhere only to syntaxes and APIs that are already stabilized for that specific version.

Current Offline Baseline: Rust 1.97.1 (released July 16, 2026). This is a dated repository baseline and does not update automatically.

Capability Boundaries

Suitable For Handling

  • Ownership, borrowing, lifetimes, and move semantics.
  • struct, enum, pattern matching, traits, generics, and associated types.
  • Option, Result error propagation, and custom errors (the language mechanism).
  • Closures (Fn/FnMut/FnOnce), attribute syntax, format strings (the language mechanism).
  • Modules, visibility modifiers, pub/pub(crate)/pub(super).
  • Edition differences (language-level — unsafe extern, RPIT capture, match ergonomics).
  • Common compilation errors, borrowing check failures, and stable migration judgments.

Hand Off to Specialized Skills

User IntentPreferred Skill
"Which std collection / smart pointer / string type should I use?"rust-stdlib
"How do I write X in Rust?" (concrete pattern)rust-by-example
API design (naming, traits, future-proofing, ~100 C-* rules)rust-api-design
Project layout, module trees, workspace structurerust-workspace, rust-module-layout
Cargo.toml dependencies, features, profiles, publishingrust-cargo-build
Dependency governance, supply chain, cargo-denyrust-dependencies
Semver, breaking-change classification, publish workflowrust-semver
Java Maven/Gradle project migration and component replacementrust-java-migration
Java-to-Rust source-test parity, Rust obligations, and migration test auditrust-java-migration-testing
Threads, locks, atomics, channels, Tokiorust-concurrency
Unit tests, integration tests, doctests, coveragerust-testing
Raw pointers, memory layout, FFI, Mirirust-unsafe-ffi
UniFFI-generated Kotlin, Swift, Python, Ruby, or WASM bindingsrust-uniffi-building
macro_rules, derive, procedural macrosrust-macros
Command contracts, standard streams, exit codes, CLIrust-cli
Server-side HTTP APIs, handlers, middlewarerust-web
SQL/ORMs, schemas, migrations, transactions, poolsrust-database
Web authentication, authorization, sessions, tokensrust-web-security
Bare-metal firmware, no_std drivers, hardware validationrust-embedded
Risk, correctness, API and safety reviewrust-code-review
rustfmt, Clippy, Edition migration, lint policyrust-style-clippy

Do not replace the complete workflow of domain-specific skills with this skill.

Workflow

  1. Determine Version Boundaries — Record toolchain version, edition, MSRV, and target platform(s).
  2. Narrow Problem Scope — Determine whether the issue belongs to ownership/type system/standard library/compiler errors or a specialized domain.
  3. Read Minimal Resources — Open only references directly relevant to the problem; do not load entire documentation sets at once.
  4. Implement Minimum Correct Solution — Prioritize stable standard library usage, clear ownership semantics, and explicit error propagation.
  5. Run Quality Gate Checks — Execute cargo fmt --check, cargo check (with all targets/features), and relevant tests.
  6. Handle Version Differences — If an API is not supported by MSRV, choose the old compatible API or implement a compatibility shim; otherwise explicitly raise the MSRV.
  7. Transfer to Specialized Skills — Load corresponding skills for async, unsafe macros, Web, embedded domains after entering those areas.

Design Rules

  • Prefer &T / &mut T; clone only when ownership transfer is required or independent lifetimes are needed.
  • Use types to express invariants; prefer enums/newtypes over boolean parameters and unconstrained strings.
  • Library code should return structured errors; application boundaries may add context before deciding how to display them.
  • Prefer iterators and standard collections, but do not sacrifice readability for chain-of-call syntax.
  • Do not use unsafe as a bypass for borrowing checks first prove that safe abstractions cannot express the requirement.
  • Do not default third-party crate imports; compare against stable std, MSRV, maintenance cost, and supply chain risk.
  • Never claim an API is stabilized in a specific version unless official release notes or an API page marked with since confirm it.

Validation Gateways

Run validation gates from lowest to highest risk:

cargo fmt --all --check
cargo check --all-targets --all-features
cargo test --all-targets --all-features
cargo clippy --all-targets --all-features -- -D warnings

If the project does not support --all-features or contains platform-specific targets, record reasons and use a defined feature/target matrix. For unsafe code, add cargo miri test; for MSRV issues, repeat cargo check and tests on the declared minimum toolchain.

Required Documentation to Read On-Demand

Version & Language Semantics

Cross-references (load the right skill instead)

  • "Which std collection / smart pointer / string type?" → rust-stdlib (its references/ covers collections, smart-pointers, string-types, iterators, I/O, interior-mutability, combinators, std-concurrency, process-and-fs, std-module-index)
  • "How do I write X?" → rust-by-example (its references/ covers conversions, flow-control, closures, modules, generics-traits, error-handling, attributes, unsafe, procedural-macros-overview, inline-asm, migrating-from-other-languages)
  • API design → rust-api-design; Cargo manifest → rust-cargo-build; dependency governance → rust-dependencies

Reproducible Examples

  • Quick Start Workflows
  • Ownership Patterns (examples/ownership-patterns.md)
  • Collection Patterns (examples/collections-patterns.md)
  • Trait Design Patterns (examples/trait-design-patterns.md)
  • Error Handling Patterns (examples/error-handling-patterns.md)
  • examples/golden-basic/: Minimal golden examples compiled by repository CI.

Common Pitfalls to Avoid

  1. Confusing "current stable" with project MSRV.
  2. Running only cargo check, omitting tests, examples, benchmarks, or feature combinations.
  3. Blindly using clone, wrapping in Arc<Mutex<_>>, or invoking unsafe solely to avoid borrowing errors.
  4. Holding synchronous locks across .await calls in async code.
  5. Describing versioned historical documentation as continuously updated resources.
  6. Copying code snippets without including dependencies, features, error types, and platform constraints.

Official Sources

Data Privacy Policy

This skill provides local knowledge, examples, and validation workflows only. It does not collect, store, or transmit user data. Access to official documentation must comply with the user's network access requirements prior to accessing public resources.

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/full-stack-skills/rust-skills/rust-stable">View rust-stable on skillZs</a>