SuperAPI AI Directory

rust-skills

Coding & development

View repository

Updated 10-16 01:19

About this skill

Rust Skills Skill Set

Overview

Rust Skills is an AI-driven Rust development assistant that usesmetacognitive frameworkto provide domain-correct architectural solutions. Rather than simply giving surface-level answers, it traces problems to their root through cognitive layers.

Metacognitive Framework

The three-tier cognitive model helps AI provide deeper answers to Rust questions:

  • Layer 3: Domain Constraints (WHY) - Why is it designed this way? Domain rules determine design choices
  • Layer 2: Design Choices (WHAT) - What design pattern fits? Architectural decisions
  • Layer 1: Language Mechanisms (HOW) - How to implement it in Rust? Syntax features

See references/meta-cognition.md

Skill Architecture

rust-skills (母技能 v2.0.0)
├── references/                 # 框架文档
│   ├── meta-cognition.md       # 元认知框架
│   ├── architecture.md         # 技能架构
│   └── commands.md            # 命令系统
├── Layer 1: 语言机制          # m01-m07
├── Layer 2: 设计选择          # m09-m15
├── Layer 3: 领域扩展          # domain-*
└── 基础技能                   # rust-*, 13个子技能

Skill Map

Layer 1: Language Mechanisms (m01-m07)

Skill Core Question Trigger Condition
rust-ownership-skill Who should own this data? E0382, move, borrow
rust-resource-management-skill What ownership pattern fits? Box, Rc, Arc, RefCell
rust-mutability-skill Why does the data need to change? mut, Cell, E0596
rust-zero-cost-skill Compile-time or runtime polymorphism? generic, trait, E0277
rust-type-driven-skill How to use types to prevent invalid states? newtype, PhantomData
rust-error-handling-skill Expected failure or bug? Result, panic, ?
rust-concurrency-skill CPU-intensive or I/O-intensive? async, Send, Sync

Layer 2: Design Choices (m09-m15)

Skill Core Question Trigger Condition
rust-domain-design-skill What role does this concept play? DDD, entity
rust-performance-skill Where is the bottleneck? benchmark, profiling
rust-ecosystem-skill Which crate fits? crate selection
rust-lifecycle-skill When to create, use, and clean up? RAII, Drop
rust-domain-error-skill Who handles errors? retry, circuit breaker
rust-mental-model-skill How to correctly understand this? learning Rust
rust-anti-pattern-skill Is there a problem with this pattern? code smell

Layer 3: Domain Extensions (domain-*)

Skill Domain Core Constraint
rust-fintech-skill Fintech Auditing, precision, consistency
rust-ml-skill Machine Learning Memory efficiency, GPU acceleration
rust-cloud-native-skill Cloud Native 12-Factor, observability
rust-iot-skill Internet of Things Offline-first, power consumption, security
rust-web-skill Web Services Stateless, low latency
rust-embedded-skill Embedded no_std, no heap allocation

Basic Skills

Skill Description Layer
rust-core-skill Variables, data types, functions, control flow Beginner
rust-ownership-skill Ownership, borrowing, lifetimes Layer 1
rust-struct-enum-skill Structs, enums, pattern matching Beginner
rust-generics-skill Generics, traits, trait objects Layer 1
rust-error-handling-skill Result, Option, error propagation Layer 1
rust-collections-skill Vec、String、HashMap Advanced
rust-iterators-skill Iterators, closures, functional Advanced
rust-smart-pointers-skill Box、Rc、Arc、RefCell Layer 1
rust-concurrency-skill Threads, message passing, shared state Layer 1
rust-async-skill async/await、Tokio、Future Advanced
rust-cargo-skill Package management, dependencies, workspaces Engineering
rust-testing-doc-skill Unit testing, integration testing, documentation Engineering
rust-cli-project-skill CLI development, argument parsing Engineering

Learning Path

Beginner Path (1-2 weeks)

  1. rust-core-skill - Basic Syntax
  2. rust-ownership-skill - Ownership System
  3. rust-struct-enum-skill - Data Organization

Advanced Path (2-4 weeks)

  1. rust-generics-skill - Generic Abstraction
  2. rust-error-handling-skill - Error Handling
  3. rust-collections-skill - Collection Types
  4. rust-iterators-skill - Functional Programming

Layer 1 Path

  1. rust-mutability-skill - Mutability Design
  2. rust-zero-cost-skill - Zero-Cost Abstraction
  3. rust-type-driven-skill - Type-Driven Design
  4. rust-resource-management-skill - Resource Management Patterns

Layer 2 Path

  1. rust-domain-design-skill - Domain Design
  2. rust-performance-skill - Performance Optimization
  3. rust-ecosystem-skill - Ecosystem Selection
  4. rust-lifecycle-skill - Lifecycle Management

Domain Path

  1. rust-fintech-skill / rust-ml-skill / rust-web-skill, etc.

Command System

Command Description
/rust-features [version] Get Rust version features
/crate-info <crate> Get crate information
/docs <crate> [item] Get API documentation

Official Resources

Version History

  • 2.0.0 - Added metacognitive framework, Layer 1/2/3 layering, Domain Extensions
  • 1.0.0 - Initial version, including 13 basic sub-skills