1---2name: impertio-studio-rust-claude-skill-package-rust-agents-orches3description: Rust Agents Orchestrator4---56# Rust Agents Orchestrator78This is the routing brain of the Rust skill package. It does two jobs:9101. **Route**: at the START of a Rust task, map the user prompt to the exact `rust-*` skill (or skills) to load.112. **Gate**: at the END of a Rust task, run the cross-skill quality checklist before declaring the work done.1213ALWAYS run step 1 before writing Rust code. ALWAYS run step 2 before reporting a Rust task complete.1415This skill routes and checklists. It does NOT do deep lint review: that is `rust-agents-code-reviewer`. It does NOT iterate on compiler errors: that is `rust-agents-compile-fix`. Treating these three as interchangeable is an anti-pattern.1617## The Package: 44 Skills, 5 Categories1819| Category | Count | Prefix | Purpose |20|----------|-------|--------|---------|21| core | 6 | `rust-core-` | Cross-cutting concepts, architecture, mental models |22| syntax | 15 | `rust-syntax-` | Language mechanics, API patterns, code form |23| impl | 13 | `rust-impl-` | Development workflows, end-to-end tasks |24| errors | 7 | `rust-errors-` | Diagnosing and fixing compiler/runtime errors |25| agents | 3 | `rust-agents-` | Routing, review, compile-fix orchestration |2627## Routing Table: Prompt Pattern to Skill2829ALWAYS pick the most specific skill. If a prompt contains a rustc error code (E0xxx) or the word "error"/"fails to compile", route to an `errors-*` skill, NOT a `syntax-*` skill.3031### Ownership, borrowing, lifetimes3233| User prompt signal | Skill |34|--------------------|-------|35| "move", "value used after move", "who owns this" | [[rust-syntax-ownership]] |36| E0382, "borrow of moved value" | [[rust-errors-borrow-checker]] |37| "`&` vs `&mut`", "borrow", "two-phase borrow", "RefCell" | [[rust-syntax-borrowing]] |38| E0502 / E0596 / E0500, "cannot borrow as mutable" | [[rust-errors-borrow-checker]] |39| "lifetime annotation", "`'a`", "HRTB", "`'static`" | [[rust-syntax-lifetimes]] |40| E0106 / E0623 / E0495 / E0700, "missing lifetime specifier" | [[rust-errors-lifetimes]] |4142### Traits, generics, type system4344| User prompt signal | Skill |45|--------------------|-------|46| "trait", "default method", "supertrait", "orphan rule", "blanket impl" | [[rust-syntax-traits]] |47| "generic", "type parameter", "`where` clause", "monomorphization", "const generics" | [[rust-syntax-generics]] |48| "`dyn Trait`", "trait object", "object safety", "vtable", "trait upcasting" | [[rust-syntax-trait-objects]] |49| "GAT", "generic associated type", "LendingIterator" | [[rust-syntax-gats]] |50| E0277 / E0599 / E0220, "trait bound not satisfied", "method not found" | [[rust-errors-trait-bounds]] |5152### Control flow, iterators, pointers5354| User prompt signal | Skill |55|--------------------|-------|56| "`match`", "`if let`", "`let else`", "destructure", "exhaustiveness", "or-pattern" | [[rust-syntax-pattern-matching]] |57| "iterator", "`map`/`filter`/`fold`", "closure", "`Fn`/`FnMut`/`FnOnce`", "`collect`" | [[rust-syntax-iterators-closures]] |58| "`Box`", "`Rc`", "`Arc`", "`Cell`", "`OnceLock`", "`Weak`", "smart pointer" | [[rust-syntax-smart-pointers]] |5960### Async6162| User prompt signal | Skill |63|--------------------|-------|64| "`async fn`", "`.await`", "async block", "async closure", "AFIT", "RPITIT" | [[rust-syntax-async-await]] |65| "Future trait", "executor", "Poll", "runtime choice", "structured concurrency" (concept) | [[rust-core-async-runtime]] |66| "tokio", "`tokio::spawn`", "`spawn_blocking`", "`select!`", "`JoinSet`", "timeout" | [[rust-impl-async-tokio]] |67| "`!Send` future", "Send across `.await`", async Pin/Unpin runtime error | [[rust-errors-async]] |6869### Macros, unsafe, FFI7071| User prompt signal | Skill |72|--------------------|-------|73| "`macro_rules!`", "declarative macro", "fragment specifier", "macro hygiene" | [[rust-syntax-macros-declarative]] |74| "proc macro", "derive macro", "`syn`", "`quote`", "`proc_macro2`" | [[rust-syntax-macros-procedural]] |75| "`unsafe`", "raw pointer", "UB", "strict provenance", "`unsafe extern`", "miri" | [[rust-syntax-unsafe]] |76| "FFI", "`extern \"C\"`", "bindgen", "cbindgen", "`#[repr(C)]`", "C interop" | [[rust-impl-ffi-bindgen]] |7778### Edition, toolchain, core concepts7980| User prompt signal | Skill |81|--------------------|-------|82| "edition 2024", "migrate to 2024", "edition migration", "edition idioms", "`gen` block" | [[rust-syntax-edition-2024]] |83| "rustup", "channels", "components", "clippy setup", "rustfmt config", "MSRV management" | [[rust-core-toolchain]] |84| "which Rust version", "edition system", "stability", "`rust-version`", "release matrix" | [[rust-core-language-versions]] |85| "type system", "ZST", "`repr`", "niche optimization", "never type", "type-state" | [[rust-core-type-system]] |86| "memory model", "stack vs heap", "drop scope", "RAII", "Send/Sync overview" | [[rust-core-memory-model]] |87| "stdlib", "which std module", "prelude", "`std::collections`", "`std::sync`" | [[rust-core-stdlib-overview]] |8889### Cargo and project workflows9091| User prompt signal | Skill |92|--------------------|-------|93| "`cargo new`", "Cargo.toml", "features", "profiles", "`[lints]` table" | [[rust-impl-cargo-project]] |94| "workspace", "member crate", "virtual manifest", "workspace inheritance" | [[rust-impl-workspaces]] |95| "build.rs", "build script", "`OUT_DIR`", "code generation", "`rerun-if-changed`" | [[rust-impl-build-scripts]] |96| "cross-compile", "target triple", "`rustup target add`", "`cross` crate", "`cfg`" | [[rust-impl-cross-compile]] |9798### Error handling design and error skills99100| User prompt signal | Skill |101|--------------------|-------|102| "`Result`/`Option` idioms", "`?` operator", "custom error type", "error design" | [[rust-impl-error-handling]] |103| "`thiserror`", "`anyhow`", "library vs application errors", "error context" | [[rust-errors-thiserror-anyhow]] |104| "panic", "`RUST_BACKTRACE`", "abort vs unwind", "index out of bounds at runtime" | [[rust-errors-runtime]] |105| "linker error", "missing native lib", "version conflict", "`cargo update`", MSRV mismatch | [[rust-errors-build-link]] |106107### Concurrency, common crates, testing108109| User prompt signal | Skill |110|--------------------|-------|111| "`Arc<Mutex>`", "`RwLock`", "atomics", "`Ordering`", "deadlock", "scoped thread" | [[rust-impl-concurrency]] |112| "channel", "`mpsc`", "`oneshot`", "`broadcast`", "`watch`", "backpressure" | [[rust-impl-channels]] |113| "serde", "`Serialize`/`Deserialize`", "JSON/TOML/YAML", "`#[serde(...)]`" | [[rust-impl-serde]] |114| "clap", "CLI args", "`derive(Parser)`", "subcommand", "shell completion" | [[rust-impl-clap-cli]] |115| "`#[test]`", "integration test", "doc test", "`nextest`", "`criterion`", "bench" | [[rust-impl-testing]] |116| "`#![no_std]`", "embedded", "`#[panic_handler]`", "`#[global_allocator]`" | [[rust-impl-no-std]] |117118### Agent / meta skills119120| User prompt signal | Skill |121|--------------------|-------|122| "review my Rust code", "is this idiomatic", deep clippy lint review | [[rust-agents-code-reviewer]] |123| "fix this compile error", iterate on rustc output, follow `--explain` suggestions | [[rust-agents-compile-fix]] |124| "which skill", "route this task", "run the quality checklist" | this skill |125126## Decision Tree: Ambiguous Prompt to Skill127128```129Rust task arrives130├── Contains an E0xxx code or "does not compile"? ......... ROUTE to errors-*131│ ├── E0382 / E0502 / E0596 / E0500 ............. rust-errors-borrow-checker132│ ├── E0106 / E0623 / E0495 / E0700 ............. rust-errors-lifetimes133│ ├── E0277 / E0599 / E0220 ..................... rust-errors-trait-bounds134│ ├── linker / native lib / version clash ....... rust-errors-build-link135│ ├── async `!Send` / Pin across .await ......... rust-errors-async136│ └── panic / OOB / abort at runtime ............ rust-errors-runtime137├── "How do I build / set up X"? ...................... ROUTE to impl-*138├── "Why does Rust work like X" (concept)? ............ ROUTE to core-*139├── "What is the syntax for X" (language form)? ....... ROUTE to syntax-*140├── "Review / is this idiomatic"? ..................... rust-agents-code-reviewer141└── Multiple skills plausible? ........................ load the NARROWEST142 that names the exact construct, then load its core-* concept skill143 only if the user needs the mental model, not just the syntax.144```145146ALWAYS prefer the narrowest match. NEVER load a `core-*` overview when the user asked a concrete `syntax-*` or `impl-*` question. Load 1 to 3 skills, not the whole package.147148## Cross-Skill Quality Checklist149150Run this BEFORE declaring ANY Rust task complete. Every item is a hard gate.151152| # | Check | Command / inspection | Pass criterion |153|---|-------|----------------------|----------------|154| a | Edition + MSRV | read `edition` and `rust-version` in Cargo.toml | code uses only features available at the stated MSRV; edition is 2024 unless the project pins older |155| b | Clippy | `cargo clippy --all-targets -- -D warnings` | no warnings; correctness + suspicious + perf clean |156| c | Formatting | `cargo fmt --all --check` | exits 0, no diff |157| d | No panics on fallible paths | grep `.unwrap()` / `.expect()` in non-test code | every remaining one is on a genuinely infallible path or has a justifying comment |158| e | Async hygiene | inspect `.await` points | no blocking call on the async executor; no `!Send` value held across `.await` in a spawned task |159| f | Doc coverage | `cargo doc` + inspect public items | every public item has a `///` doc; add a doctest where it clarifies usage |160| g | Unsafe is justified | grep `unsafe` blocks | every `unsafe` block has a `// SAFETY:` comment stating the invariant |161| h | Error type contract | inspect library error types | error types implement `std::error::Error` + `Display`; a library does NOT leak `anyhow::Error` in its public API |162| i | Tests | `cargo test --all-targets` and `cargo test --doc` | all unit, integration, and doc tests pass |163164If any item fails, fix it and re-run the failing check. NEVER report a Rust task done with an unchecked item.165166See `references/methods.md` for the full command set and CI wiring, `references/examples.md` for worked routing and checklist runs, `references/anti-patterns.md` for routing and gating mistakes.167168## Quick Reference169170- Routing happens FIRST, the checklist happens LAST. Never skip either.171- Error code present means an `errors-*` skill, never a `syntax-*` skill.172- `cargo build` passing is NOT the quality gate. `cargo clippy` plus `cargo fmt --check` plus `cargo test` is.173- MSRV is set by `rust-version` in Cargo.toml. A new dependency must not raise it silently.174- This skill routes and gates. Deep review is `rust-agents-code-reviewer`. Error iteration is `rust-agents-compile-fix`.175176## Reference Links177178- Rust API Guidelines: https://rust-lang.github.io/api-guidelines/179- Clippy lint reference: https://rust-lang.github.io/rust-clippy/master/180- `references/methods.md`: command set, clippy lint groups, CI configuration181- `references/examples.md`: worked routing and checklist examples182- `references/anti-patterns.md`: routing and quality-gate anti-patterns183184---185> Source: [Impertio-Studio/Rust-Claude-Skill-Package](https://github.com/Impertio-Studio/Rust-Claude-Skill-Package) — distributed by [TomeVault](https://tomevault.io).186<!-- tomevault:4.0:skill_md:2026-06-16 -->