Rust Skills

2026-08-30 浏览 (1)

Rust Skills

Comprehensive Rust development assistant with meta-question routing, coding guidelines, version queries, and ecosystem support.

Default Project Settings

When creating Rust projects or Cargo.toml files, ALWAYS use:

[package]
edition = "2024"
rust-version = "1.85"

[lints.rust]
unsafe_code = "warn"

[lints.clippy]
all = "warn"
pedantic = "warn"

Core Skills

rust-router

Master router for ALL Rust questions. Handles:

  • Intent analysis and question routing
  • Cross-cutting Rust topics
  • Crate detection and skill management

rust-learner

Rust version and crate information:

  • Rust version features and changelog
  • Crate info from lib.rs/crates.io
  • API documentation from docs.rs

coding-guidelines

Code style and best practices:

  • Naming conventions (P.NAM.*)
  • Formatting rules (P.FMT.*)
  • Error handling patterns (P.ERR.*)

unsafe-checker

Unsafe code review and FFI guidance:

  • Safety documentation requirements
  • Raw pointer handling
  • FFI best practices

Meta-Question Skills (m01-m15)

SkillTopic
m01-ownershipMemory ownership, borrowing, lifetimes
m02-resourceSmart pointers (Box, Rc, Arc, RefCell)
m03-mutabilityMutability and interior mutability
m04-zero-costGenerics, traits, monomorphization
m05-type-drivenType state, phantom types, newtype
m06-error-handlingResult, Option, error propagation
m07-concurrencySend, Sync, async/await, channels
m08-safetyMerged into unsafe-checker
m09-domainDomain modeling in Rust
m10-performanceOptimization and benchmarking
m11-ecosystemCrate integration, interop
m12-lifecycleResource lifecycle, RAII, Drop
m13-domain-errorDomain-specific error handling
m14-mental-modelRust mental models
m15-anti-patternCommon mistakes and pitfalls

Error Code Reference

ErrorTopicSkill
E0382Use of moved valuem01-ownership
E0597Lifetime too shortm01-ownership
E0502Borrow conflictm01-ownership
E0499Multiple mutable borrowsm01-ownership
E0277Trait bound not satisfiedm04-zero-cost
E0308Type mismatchm04-zero-cost

Usage Examples

Ask about:

  • "Why am I getting E0382?"
  • "How to use Arc<Mutex>?"
  • "Best practices for error handling"
  • "Review my unsafe code"
  • "What's new in Rust 1.85?"

你可能感兴趣的文章

Agent Cache System

Rust Skills Tests

Agent Integration Test Scenarios

Domain Skills Test Scenarios

Rust-Router Test Scenarios

Ownership (m01) Test Scenarios

Unsafe-Checker Test Scenarios

Layer 2 Skills Test Scenarios

Pressure Scenario: When to Use unwrap()

Pressure Scenario: Send/Sync Trait Bounds

  • 所属分类: AI
  • 本文标签: rust
  • 版权声明: 本文链接 https://seaxiang.com/blog/RVmIqAyZ