rust-router
Router for Rust questions, errors, and design patterns across ownership, async, and domain-specific architectures.
- 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)
- Automatically triggers negotiation mode for comparative queries ("vs", "best practice", "compare") and dual-skill loading when domain keywords combine with technical errors
- Includes error code routing table (E0382, E0597, E0277, etc.) that maps compiler errors directly to relevant skills, plus keyword conflict resolution for ambiguous terms like "unsafe" and "tokio"
- Enforces Rust 1.85+ with 2024 edition and strict linting (clippy pedantic, unsafe_code warn) as default project settings
Rust Question Router
Version: 2.0.0 | Last Updated: 2025-01-22
v2.0: Context optimized - detailed examples moved to sub-files
Meta-Cognition Framework
Core Principle
Don't answer directly. Trace through the cognitive layers first.
Layer 3: Domain Constraints (WHY)
├── Business rules, regulatory requirements
├── domain-fintech, domain-web, domain-cli, etc.
└── "Why is it designed this way?"
More from zhanghandong/rust-skills
m15-anti-pattern
Use when reviewing code for anti-patterns. Keywords: anti-pattern, common mistake, pitfall, code smell, bad practice, code review, is this an anti-pattern, better way to do this, common mistake to avoid, why is this bad, idiomatic way, beginner mistake, fighting borrow checker, clone everywhere, unwrap in production, should I refactor, 反模式, 常见错误, 代码异味, 最佳实践, 地道写法
5.4Kcoding-guidelines
Use when asking about Rust code style or best practices. Keywords: naming, formatting, comment, clippy, rustfmt, lint, code style, best practice, P.NAM, G.FMT, code review, naming convention, variable naming, function naming, type naming, 命名规范, 代码风格, 格式化, 最佳实践, 代码审查, 怎么命名
1.1Km10-performance
CRITICAL: Use for performance optimization. Triggers: performance, optimization, benchmark, profiling, flamegraph, criterion, slow, fast, allocation, cache, SIMD, make it faster, 性能优化, 基准测试
803m07-concurrency
CRITICAL: Use for concurrency/async. Triggers: E0277 Send Sync, cannot be sent between threads, thread, spawn, channel, mpsc, Mutex, RwLock, Atomic, async, await, Future, tokio, deadlock, race condition, 并发, 线程, 异步, 死锁
744m06-error-handling
CRITICAL: Use for error handling. Triggers: Result, Option, Error, ?, unwrap, expect, panic, anyhow, thiserror, when to panic vs return Result, custom error, error propagation, 错误处理, Result 用法, 什么时候用 panic
734rust-refactor-helper
Safe Rust refactoring with LSP analysis. Triggers on: /refactor, rename symbol, move function, extract, 重构, 重命名, 提取函数, 安全重构
721