โ† Back to list
rustfs

rust-router

by rustfs

๐Ÿš€2.3x faster than MinIO for 4KB object payloads. RustFS is an open-source, S3-compatible high-performance object storage system supporting migration and coexistence with other S3-compatible platforms such as MinIO and Ceph.

โญ 20,125๐Ÿด 866๐Ÿ“… Jan 23, 2026

SKILL.md


name: rust-router description: "CRITICAL: Use for ALL Rust questions including errors, design, and coding. Triggers on: Rust, cargo, rustc, crate, Cargo.toml, ๆ„ๅ›พๅˆ†ๆž, ้—ฎ้ข˜ๅˆ†ๆž, ่ฏญไน‰ๅˆ†ๆž, analyze intent, question analysis, compile error, borrow error, lifetime error, ownership error, type error, trait error, value moved, cannot borrow, does not live long enough, mismatched types, not satisfied, E0382, E0597, E0277, E0308, E0499, E0502, E0596, async, await, Send, Sync, tokio, unsafe, FFI, concurrency, error handling, ็ผ–่ฏ‘้”™่ฏฏ, compile error, ๆ‰€ๆœ‰ๆƒ, ownership, ๅ€Ÿ็”จ, borrow, ็”Ÿๅ‘ฝๅ‘จๆœŸ, lifetime, ็ฑปๅž‹้”™่ฏฏ, type error, ๅผ‚ๆญฅ, async, ๅนถๅ‘, concurrency, ้”™่ฏฏๅค„็†, error handling, ้—ฎ้ข˜, problem, question, ๆ€Žไนˆ็”จ, how to use, ๅฆ‚ไฝ•, how to, ไธบไป€ไนˆ, why, ไป€ไนˆๆ˜ฏ, what is, ๅธฎๆˆ‘ๅ†™, help me write, ๅฎž็Žฐ, implement, ่งฃ้‡Š, explain, ๅŒบๅˆซ, difference, ๆœ€ไฝณๅฎž่ทต, best practice" globs: ["/Cargo.toml", "/*.rs"]

Rust Question Router

Version: 2.0.0 | Last Updated: 2026-01-17

New in v2.0: Meta-Cognition Routing - Three-layer cognitive model for deeper answers

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?"

Layer 2: Design Choices (WHAT)
โ”œโ”€โ”€ Architecture patterns, DDD concepts
โ”œโ”€โ”€ m09-m15 skills
โ””โ”€โ”€ "What pattern should I use?"

Layer 1: Language Mechanics (HOW)
โ”œโ”€โ”€ Ownership, borrowing, lifetimes, traits
โ”œโ”€โ”€ m01-m07 skills
โ””โ”€โ”€ "How do I implement this in Rust?"

Routing by Entry Point

User SignalEntry LayerDirectionFirst Skill
E0xxx errorLayer 1Trace UP โ†‘m01-m07
Compile errorLayer 1Trace UP โ†‘Error table below
"How to design..."Layer 2Check L3, then DOWN โ†“m09-domain
"Building [domain] app"Layer 3Trace DOWN โ†“domain-*
"Best practice..."Layer 2Both directionsm09-m15
Performance issueLayer 1 โ†’ 2UP then DOWNm10-performance

CRITICAL: Dual-Skill Loading

When domain keywords are present, you MUST load BOTH skills:

Domain KeywordsL1 SkillL3 Skill
Web API, HTTP, axum, handlerm07-concurrencydomain-web
ไบคๆ˜“, ๆ”ฏไป˜, trading, paymentm01-ownershipdomain-fintech
CLI, terminal, clapm07-concurrencydomain-cli
kubernetes, grpc, microservicem07-concurrencydomain-cloud-native
embedded, no_std, MCUm02-resourcedomain-embedded

Example: "Web API ๆŠฅ้”™ Rc cannot be sent"

  • Load: m07-concurrency (L1 - Send/Sync error)
  • Load: domain-web (L3 - Web state management)
  • Answer must include both layers

Trace Examples

User: "My trading system reports E0382"

1. Entry: Layer 1 (E0382 = ownership error)
2. Load: m01-ownership skill
3. Trace UP: What design led to this?
4. Check: domain-fintech (trading = immutable audit data)
5. Answer: Don't clone, use Arc<T> for shared immutable data
User: "How should I handle user authentication?"

1. Entry: Layer 2 (design question)
2. Trace UP to Layer 3: domain-web constraints
3. Load: domain-web skill (security, stateless HTTP)
4. Trace DOWN: m06-error-handling, m07-concurrency
5. Answer: JWT with proper error types, async handlers

INSTRUCTIONS FOR CLAUDE

Default Project Settings (When Creating Rust Code)

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

[package]
edition = "2024"  # ALWAYS use latest stable edition
rust-version = "1.85"

[lints.rust]
unsafe_code = "warn"

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

Rules:

  • ALWAYS use edition = "2024" (not 2021 or earlier)
  • Include rust-version for MSRV clarity
  • Enable clippy lints by default
  • DO NOT use WebSearch for Rust questions - use skills and agents

Meta-Cognition Routing Process

  1. Identify Entry Layer

    • E0xxx errors โ†’ Layer 1
    • Design questions โ†’ Layer 2
    • Domain-specific โ†’ Layer 3
  2. Load Appropriate Skill

    • Read the skill file for context
    • Note the "Trace Up" and "Trace Down" sections
  3. Trace Through Layers

    • Don't stop at surface-level fix
    • Ask "Why?" to trace up
    • Ask "How?" to trace down
  4. Answer with Context

    • Include the reasoning chain
    • Reference which layers/skills informed the answer

When User Requests Intent Analysis

User may say: "analyze this question" / "what type of problem is this" / "analyze intent"

Execute these steps:

  1. Extract Keywords - Identify Rust concepts, error codes, crate names
  2. Identify Entry Layer - Which cognitive layer is this?
  3. Map to Skills - Which m0x/m1x/domain skills apply?
  4. Report Analysis - Tell user the layers and suggested trace
  5. Invoke Skill - Load and apply the matched skill

Layer 1 Skills (Language Mechanics)

PatternCategoryRoute To
move, borrow, lifetime, E0382, E0597m01m01-ownership
Box, Rc, Arc, RefCell, Cellm02m02-resource
mut, interior mutability, E0499, E0502, E0596m03m03-mutability
generic, trait, inline, monomorphizationm04m04-zero-cost
type state, phantom, newtypem05m05-type-driven
Result, Error, panic, ?, anyhow, thiserrorm06m06-error-handling
Send, Sync, thread, async, channelm07m07-concurrency
unsafe, FFI, extern, raw pointer, transmute-unsafe-checker

Layer 2 Skills (Design Choices)

PatternCategoryRoute To
domain model, business logicm09m09-domain
performance, optimization, benchmarkm10m10-performance
integration, interop, bindingsm11m11-ecosystem
resource lifecycle, RAII, Dropm12m12-lifecycle
domain error, recovery strategym13m13-domain-error
mental model, how to thinkm14m14-mental-model
anti-pattern, common mistake, pitfallm15m15-anti-pattern

Layer 3 Skills (Domain Constraints)

Domain KeywordsRoute To
fintech, trading, decimal, currencydomain-fintech
ml, tensor, model, inferencedomain-ml
kubernetes, docker, grpc, microservicedomain-cloud-native
embedded, sensor, mqtt, iotdomain-iot
web server, HTTP, REST, axum, actixdomain-web
CLI, command line, clap, terminaldomain-cli
no_std, microcontroller, firmwaredomain-embedded

Error Code Routing

Error CodeLayerRoute ToCommon Cause
E0382L1m01-ownershipUse of moved value
E0597L1m01-ownershipLifetime too short
E0506L1m01-ownershipCannot assign to borrowed
E0507L1m01-ownershipCannot move out of borrowed
E0515L1m01-ownershipReturn local reference
E0716L1m01-ownershipTemporary value dropped
E0106L1m01-ownershipMissing lifetime specifier
E0596L1m03-mutabilityCannot borrow as mutable
E0499L1m03-mutabilityMultiple mutable borrows
E0502L1m03-mutabilityBorrow conflict
E0277L1m04/m07Trait bound not satisfied
E0308L1m04-zero-costType mismatch
E0599L1m04-zero-costNo method found
E0038L1m04-zero-costTrait not object-safe
E0433L1m11-ecosystemCannot find crate/module

Unsafe-Specific Routing

For detailed unsafe rules, route to unsafe-checker skill:

PatternRoute To
unsafe code review, SAFETY commentunsafe-checker
FFI, extern "C", C interop, libcunsafe-checker
raw pointer, *mut, *const, NonNullunsafe-checker
transmute, union, repr(C)unsafe-checker
MaybeUninit, uninitialized memoryunsafe-checker
panic safety, double-freeunsafe-checker
Send impl, Sync impl, manual auto-traitsunsafe-checker

Functional Routing Table

PatternRoute ToAction
latest version, what's newrust-learnerUse agents
API, docs, documentationdocs-researcherUse agent
Cargo.toml, dependenciesdynamic-skillsSuggest /sync-crate-skills
code style, naming, clippycoding-guidelinesRead skill
unsafe code, FFIunsafe-checkerRead skill
code reviewos-checkerSuggest /rust-review

Priority Order

  1. Identify cognitive layer (L1/L2/L3)
  2. Load entry skill (m0x/m1x/domain)
  3. Trace through layers (UP or DOWN)
  4. Cross-reference skills as indicated in "Trace" sections
  5. Answer with reasoning chain

Skill File Paths

Meta-Cognition Framework

_meta/reasoning-framework.md    # How to trace through layers
_meta/layer-definitions.md      # Layer definitions
_meta/externalization.md        # Cognitive externalization
_meta/error-protocol.md         # 3-Strike escalation rule
_meta/hooks-patterns.md         # Automatic triggers

Layer 1 Skills (Language Mechanics)

skills/m01-ownership/SKILL.md
skills/m02-resource/SKILL.md
skills/m03-mutability/SKILL.md
skills/m04-zero-cost/SKILL.md
skills/m05-type-driven/SKILL.md
skills/m06-error-handling/SKILL.md
skills/m07-concurrency/SKILL.md

Layer 2 Skills (Design Choices)

skills/m09-domain/SKILL.md
skills/m10-performance/SKILL.md
skills/m11-ecosystem/SKILL.md
skills/m12-lifecycle/SKILL.md
skills/m13-domain-error/SKILL.md
skills/m14-mental-model/SKILL.md
skills/m15-anti-pattern/SKILL.md

Layer 3 Skills (Domain Constraints)

skills/domain-fintech/SKILL.md
skills/domain-ml/SKILL.md
skills/domain-cloud-native/SKILL.md
skills/domain-iot/SKILL.md
skills/domain-web/SKILL.md
skills/domain-cli/SKILL.md
skills/domain-embedded/SKILL.md

OS-Checker Integration

For code review and security auditing:

Use CaseCommandTools
Daily check/rust-reviewclippy
Security audit/audit securitycargo audit, geiger
Unsafe audit/audit safetymiri, rudra
Concurrency audit/audit concurrencylockbud
Full audit/audit fullall os-checker tools

Workflow Example with Meta-Cognition

User: "Why am I getting E0382 in my trading system?"

Analysis:
1. Entry: Layer 1 (E0382 = ownership/move error)
2. Load: m01-ownership skill
3. Context: "trading system" โ†’ domain-fintech

Trace UP โ†‘:
- E0382 in trading context
- Check domain-fintech: "immutable audit records"
- Finding: Trading data should be shared, not moved

Response:
"E0382 indicates a value was moved when still needed.
In a trading system (domain-fintech), transaction records
should be immutable and shareable for audit purposes.

Instead of cloning, consider:
- Arc<TradeRecord> for shared immutable access
- This aligns with financial audit requirements

See: m01-ownership (Trace Up section),
     domain-fintech (Audit Requirements)"

Score

Total Score

90/100

Based on repository quality metrics

โœ“SKILL.md

SKILL.mdใƒ•ใ‚กใ‚คใƒซใŒๅซใพใ‚Œใฆใ„ใ‚‹

+20
โœ“LICENSE

ใƒฉใ‚คใ‚ปใƒณใ‚นใŒ่จญๅฎšใ•ใ‚Œใฆใ„ใ‚‹

+10
โœ“่ชฌๆ˜Žๆ–‡

100ๆ–‡ๅญ—ไปฅไธŠใฎ่ชฌๆ˜ŽใŒใ‚ใ‚‹

+10
โœ“ไบบๆฐ—

GitHub Stars 1000ไปฅไธŠ

+15
โœ“ๆœ€่ฟ‘ใฎๆดปๅ‹•

1ใƒถๆœˆไปฅๅ†…ใซๆ›ดๆ–ฐ

+10
โœ“ใƒ•ใ‚ฉใƒผใ‚ฏ

10ๅ›žไปฅไธŠใƒ•ใ‚ฉใƒผใ‚ฏใ•ใ‚Œใฆใ„ใ‚‹

+5
โ—‹Issue็ฎก็†

ใ‚ชใƒผใƒ—ใƒณIssueใŒ50ๆœชๆบ€

0/5
โœ“่จ€่ชž

ใƒ—ใƒญใ‚ฐใƒฉใƒŸใƒณใ‚ฐ่จ€่ชžใŒ่จญๅฎšใ•ใ‚Œใฆใ„ใ‚‹

+5
โœ“ใ‚ฟใ‚ฐ

1ใคไปฅไธŠใฎใ‚ฟใ‚ฐใŒ่จญๅฎšใ•ใ‚Œใฆใ„ใ‚‹

+5

Reviews

๐Ÿ’ฌ

Reviews coming soon