zhanghandong/rust-skills▌
34 approved skills in this repository
rust-trait-explorer
Backend
Explore Rust trait implementations and find all types implementing a trait or traits implemented by a type. \n \n Supports two primary queries: find all implementors of a trait using LSP goToImplementation , or discover all traits implemented by a struct using grep pattern matching \n Generates structured output including trait definitions, implementation tables, code snippets, and implementation hierarchies \n Provides coverage analysis to verify all trait methods are implemented and identifies
rust-symbol-analyzer
Backend
Analyze Rust project structure and symbols using LSP with filtering by type. \n \n Supports three analysis modes: entire project workspace, single file, or filtered by symbol type (struct, trait, function, module) \n Uses LSP document and workspace symbol operations to extract nested symbol hierarchies with metadata like visibility, async status, and derives \n Generates multiple output formats including module trees, symbol tables by type, complexity metrics, and dependency analysis \n Handles
rust-refactor-helper
Backend
Safe Rust refactoring with LSP-driven impact analysis and dry-run preview. \n \n Supports four refactoring actions: rename symbol, extract function, inline function, and move to module \n Performs pre-refactor analysis using LSP operations (find references, go to definition, call hierarchy) to identify all affected code locations \n Generates detailed impact reports showing definition location, all references categorized by file, and potential issues like documentation updates or public API chan
rust-deps-visualizer
Backend
ASCII art visualization of Rust project dependency trees with optional feature flag display. \n \n Generates tree-format dependency graphs with configurable depth (default: 3 levels) and optional feature flag annotations \n Supports visual enhancements including dependency categorization (runtime, serialization, development) and optional size visualization in megabytes \n Parses cargo metadata and cargo tree output to extract and format dependencies with standard box-drawing characters \n Trigge
rust-skill-creator
Backend
Dynamically generate skills for Rust crates and standard library documentation. \n \n Supports both agent mode (via /create-llms-for-skills and /create-skills-via-llms commands) and inline mode for skills-only installations \n Handles third-party crates (tokio, serde, axum) and Rust std library modules with automatic URL construction \n Generates SKILL.md files with overview, key types, common patterns, and reference documentation organized by module \n Includes URL templates and helpers for con
rust-learner
Backend
Fetch Rust versions, crate information, and API documentation from authoritative sources. \n \n Supports queries about Rust release features, crate versions, and standard library documentation via dedicated agent routing \n Operates in two modes: agent-based (when agent files available) for background task execution, or inline mode using actionbook selectors and browser automation \n Covers crate info from lib.rs and crates.io, Rust changelogs from releases.rs, std library docs from doc.rust-lan
rust-call-graph
Backend
Visualize Rust function call graphs with configurable depth and direction using LSP. \n \n Supports three query directions: incoming calls (who calls this), outgoing calls (what this calls), and bidirectional analysis \n Configurable traversal depth (default 3 levels) to control graph scope and complexity \n Generates ASCII tree visualizations with entry points, leaf functions, and hot path analysis \n Includes complexity insights and potential issues flagging (high fan-out, multiple callers) \n
m07-concurrency
Productivity
Rust concurrency design: workload classification, sharing models, and Send/Sync requirements. \n \n Guides decision-making between threads (CPU-bound), async (I/O-bound), and hybrid approaches before implementing \n Covers Send/Sync marker traits, thread-safety patterns (Arc, Mutex, RwLock, channels), and atomic operations with quick reference tables \n Includes mandatory \"trace up\" to domain skills (web, fintech, cloud-native, CLI) to align concurrency design with architectural constraints \n
domain-embedded
AI/ML
Embedded and no_std Rust development constraints, patterns, and critical safety rules for microcontroller firmware. \n \n Enforces no dynamic allocation (heap-free design using heapless collections), no_std compilation, and static memory buffers for deterministic resource usage on resource-constrained devices \n Covers interrupt safety through critical sections and Mutex<RefCell> patterns to prevent race conditions when shared state is accessed from ISRs \n Provides hardware ownership patte
rust-code-navigator
Backend
Navigate Rust code using Language Server Protocol for definitions, references, and symbol information. \n \n Supports three core LSP operations: go to definition, find references, and hover information for type/documentation lookup \n Handles workspace symbol search with disambiguation when multiple results exist, plus file-specific navigation with line numbers \n Includes error handling for missing rust-analyzer, typos, and generics/macros that produce multiple definitions \n Output formatted a
domain-fintech
AI/ML
Fintech domain constraints and design patterns for building precise, auditable financial systems in Rust. \n \n Enforces decimal precision (never f64) using rust_decimal, immutable transaction records with Arc, and double-entry accounting principles to prevent money loss or inconsistency \n Provides currency newtypes, transaction aggregates, and audit logging patterns aligned with regulatory compliance and dispute resolution requirements \n Maps domain rules (precision, audit trails, consistency
domain-iot
AI/ML
Design patterns and constraints for building reliable, power-efficient IoT applications in Rust. \n \n Covers six critical domains: network unreliability, power constraints, resource limits, security, reliability, and over-the-air updates with specific Rust implementation strategies \n Provides MQTT client patterns using rumqttc for pub/sub messaging with QoS levels, local buffering, and retry logic with exponential backoff \n Distinguishes between Linux gateway stacks (tokio + std) and MCU devi
domain-ml
AI/ML
Machine learning and AI applications in Rust with tensor operations, model inference, and GPU acceleration. \n \n Covers tensor libraries (ndarray), inference frameworks (tract for ONNX, candle, burn), and PyTorch bindings (tch-rs) for training and deployment workflows \n Emphasizes memory efficiency through zero-copy operations, GPU batching, and standard model formats (ONNX) for portability across Python and Rust \n Provides design patterns for model loading with lazy initialization, batched i
domain-cloud-native
Cloud
Design constraints and patterns for building stateless, observable cloud-native applications in Rust. \n \n Enforces stateless design, graceful shutdown with SIGTERM handling, and 12-factor configuration via environment variables to support Kubernetes orchestration and zero-downtime deployments \n Requires distributed tracing with tracing and OpenTelemetry, plus dedicated /health and /ready endpoints for liveness and readiness probes \n Recommends key crates: tonic for gRPC services, kube and ku
domain-cli
AI/ML
Rust CLI design constraints and patterns for argument parsing, configuration layering, and user feedback. \n \n Type-safe argument parsing with clap derive macros; supports subcommands, help text, and environment variable integration \n Configuration precedence rule: CLI args override environment variables, which override config files and defaults \n Proper error handling with stderr/stdout separation, non-zero exit codes, and Result-based error propagation \n Progress bars, colored output, and
rust-daily
Backend
Aggregates Rust community news and updates from multiple sources, filtered by time range. \n \n Fetches from five primary sources: Reddit r/rust, This Week in Rust, official Rust blog, Inside Rust, and Rust Foundation news/blog/events \n Supports three time ranges (day, week, month) and category filtering (all, ecosystem, official, foundation) \n Operates in two modes: agent-based (if rust-daily-reporter.md exists) or inline (direct source fetching via agent-browser, actionbook MCP, or WebFetch)
meta-cognition-parallel
Productivity
Three-layer parallel analysis of Rust questions across language mechanics, design patterns, and domain constraints. \n \n Executes in parallel agent mode (when layer analyzer files exist) or sequential inline mode, synthesizing results into domain-correct architectural solutions \n Analyzes ownership, borrowing, lifetimes, and error codes at the language layer; evaluates smart pointers, interior mutability, and design trade-offs at the design layer; and applies domain-specific requirements (FinT
domain-web
AI/ML
Web service architecture with async handlers, type-safe extractors, and middleware composition. \n \n Enforces async-first design to prevent blocking request handlers; use spawn_blocking for CPU-intensive work \n Manages shared application state via Arc<T> and Arc<RwLock<T>> to ensure thread safety across concurrent requests \n Provides extractor pattern for request parsing and validation (e.g., State(db) , Json(payload) ) with unified error responses via IntoResponse \n Supports
m13-domain-error
AI/ML
Design error handling by categorizing who handles each error and how they recover. \n \n Distinguish between user-facing errors (actionable messages), internal errors (debug details), system errors (monitoring), and transient vs. permanent failures to determine recovery strategy \n Use typed error enums with thiserror and implement is_retryable() checks to enable appropriate handling patterns \n Apply recovery strategies: retry with exponential backoff for transient failures, fallback values for
m09-domain
AI/ML
Domain-driven design patterns for modeling entities, value objects, and aggregates in Rust. \n \n Distinguishes between Entities (unique identity required), Value Objects (interchangeable by value), and Aggregates (owned hierarchies), with clear Rust patterns for each \n Emphasizes invariant preservation through private fields, validated constructors, and type-state patterns \n Provides templates for common DDD structures: newtypes for value objects, structs with ID fields for entities, and modu
unsafe-checker
Productivity
Unsafe Rust code review and FFI soundness checker for identifying memory safety violations. \n \n Triggers on 30+ unsafe patterns including raw pointers, transmute, FFI declarations, uninitialized memory, and missing SAFETY documentation \n Provides reference tables for valid unsafe use cases (FFI, low-level abstractions, performance bottlenecks) and common errors with fixes \n Covers FFI tooling recommendations (bindgen, cbindgen, PyO3, napi-rs) and deprecated patterns with modern alternatives
rust-router
Backend
Router for Rust questions, errors, and design patterns across ownership, async, and domain-specific architectures. \n \n Routes all Rust queries through a three-layer cognitive framework: language mechanics (ownership, borrowing, lifetimes), design choices (patterns, performance, error handling), and domain constraints (web, fintech, embedded, CLI) \n Automatically triggers negotiation mode for comparative queries (\"vs\", \"best practice\", \"compare\") and dual-skill loading when domain keywor
m02-resource
Productivity
Smart pointer and resource ownership patterns for Rust heap allocation and reference counting. \n \n Guides ownership decisions through a three-step model: single vs. shared ownership, single-threaded vs. multi-threaded context, and presence of reference cycles \n Covers six core types (Box, Rc, Arc, Weak, Cell, RefCell) with a decision flowchart and quick reference table for choosing the right pattern \n Includes common errors and anti-patterns with fixes, such as using Weak to break cycles, av
m11-ecosystem
Productivity
Guidance for selecting, integrating, and managing Rust crates and ecosystem dependencies. \n \n Provides decision tables for common needs (serialization, async runtimes, HTTP, databases, CLI parsing) with recommended crates and evaluation criteria \n Covers language interop patterns including C/C++ bindings via bindgen / cbindgen , Python extensions with pyo3 , Node.js addons via napi-rs , and WebAssembly with wasm-bindgen \n Includes error code reference (E0433, E0603) with fixes, cargo feature
m04-zero-cost
Productivity
Compile-time versus runtime polymorphism: generics, trait objects, and zero-cost abstraction patterns. \n \n Distinguishes static dispatch (generics, impl Trait ) from dynamic dispatch ( dyn Trait ), with decision guidance on when each is appropriate based on type knowledge, performance priorities, and collection heterogeneity \n Maps common type system errors (E0277, E0308, E0599, E0038) to underlying design questions rather than mechanical fixes \n Covers object safety constraints, monomorphiz
m12-lifecycle
Productivity
Design resource creation, cleanup, and scope using RAII, lazy initialization, and pooling patterns. \n \n Covers five lifecycle patterns: RAII with Drop trait, lazy initialization via OnceLock/LazyLock, connection pooling with r2d2/deadpool, guard-based scoped access, and transaction scope boundaries \n Includes decision framework for resource cost, scope determination, and error handling during cleanup \n Provides pattern templates for RAII guards and lazy singletons, plus common errors and ant
m14-mental-model
Productivity
Mental models and analogies for understanding Rust ownership, borrowing, and core concepts. \n \n Provides visual analogies (keys, lending, remotes) and mental models for ownership, moves, references, lifetimes, and smart pointers to build correct intuition \n Includes misconception-to-correction mappings for common borrow checker errors (E0382, E0502, E0499, E0106, E0507) with explanations of what safety guarantee each enforces \n Covers language-specific shifts for developers coming from Java,
m03-mutability
Productivity
Rust mutability design: choosing between &mut , interior mutability, and thread-safe patterns. \n \n Guides decision-making for E0596, E0499, E0502 errors by asking whether mutation is necessary and who controls it, rather than reflexively adding mut \n Covers single-thread patterns (Cell, RefCell) and multi-thread patterns (Mutex, RwLock, Atomic types) with clear selection criteria \n Includes borrow rule reference, anti-patterns (RefCell overuse, Mutex in hot loops), and decision tables f
m05-type-driven
Productivity
Compile-time state validation through type encoding, eliminating invalid states at the type level. \n \n Covers six core patterns: newtype for type-safe primitives, type state for state machines, PhantomData for variance tracking, marker traits for capability flags, builders for gradual construction, and sealed traits for closed impl sets \n Emphasizes asking \"can the compiler catch this?\" before adding runtime validation, with decision guides mapping common needs to appropriate patterns \n In
m01-ownership
Productivity
Rust ownership and lifetime error diagnosis through design-first questioning. \n \n Covers seven critical error codes (E0382, E0597, E0506, E0507, E0515, E0716, E0106) with root-cause questions rather than quick fixes \n Guides developers to ask \"who should own this data?\" before applying syntax solutions, distinguishing between symptom fixes and design restructuring \n Provides decision trees for choosing between move semantics, borrowing, cloning, and smart pointers (Arc, Rc, Cow) based on d
m06-error-handling
Productivity
Rust error handling strategy: when to use Result, Option, panic, and which error crate. \n \n Distinguishes between expected failures (Result/Option), bugs (panic), and unrecoverable errors; includes decision flowchart and core questions to ask before choosing a strategy \n Recommends thiserror for typed library errors and anyhow for ergonomic application-level error handling; covers error propagation with ? and context attachment \n Provides quick reference for unwrap vs expect vs panic, librar
m10-performance
Productivity
Systematic approach to identifying and eliminating performance bottlenecks through measurement and targeted optimization. \n \n Emphasizes profiling first (flamegraph, perf, criterion) before optimizing; includes decision table mapping goals (reduce allocations, improve cache, parallelize) to specific implementation patterns \n Prioritizes optimization by impact: algorithm choice (10x–1000x), data structure (2x–10x), allocation reduction (2x–5x), cache optimization (1.5x–3x) \n Covers common tec
coding-guidelines
Frontend
Rust naming, formatting, and best-practice guidelines covering 50 core rules. \n \n Covers naming conventions (no get_ prefix, iterator patterns, conversion methods), data types (newtypes, slice patterns, pre-allocation), and string handling (prefer bytes for ASCII, use Cow<str> when appropriate) \n Error handling guidance includes ? propagation over try!() , meaningful lifetime names, and lock ordering for concurrency safety \n Includes deprecation mappings (e.g., lazy_static! to OnceLock
m15-anti-pattern
Productivity
Identify and resolve common Rust code anti-patterns during review. \n \n Covers eight major anti-patterns with explanations and idiomatic alternatives, including excessive cloning, unwrap in production, and fighting the borrow checker \n Provides a thinking framework to distinguish symptoms from root causes and trace issues to underlying design problems \n Includes quick reference tables for beginner mistakes, code smells, common error patterns, and deprecated approaches with fixes \n Links anti