// Use when starting any Rust task to route to the correct rust-* skill, and when finishing any Rust task to run the cross-skill quality checklist (clippy, rustfmt, MSRV, edition idioms, error handling, async hygiene, doc coverage). Prevents loading the wrong skill, missing a relevant skill, and shipping Rust code that fails clippy or ignores the project MSRV. Covers: a routing table mapping user-prompt patterns to rust-* skills (ownership question to rust-syntax-ownership, lifetime error to rust-errors-lifetimes, async runtime question to rust-impl-async-tokio, etc.), and a cross-skill quality checklist every Rust task should pass before completion. Keywords: "which Rust skill", "Rust task routing", "Rust code review checklist", "rust quality gate", clippy, rustfmt, MSRV, "Rust best practice check", "Rust code quality", "before I ship Rust", orchestrator, "Rust skill index", "what skill for", routing, "Rust checklist".
Use when starting any Rust task to route to the correct rust-* skill, and when finishing any Rust task to run the cross-skill quality checklist (clippy, rustfmt, MSRV, edition idioms, error handling, async hygiene, doc coverage). Prevents loading the wrong skill, missing a relevant skill, and shipping Rust code that fails clippy or ignores the project MSRV. Covers: a routing table mapping user-prompt patterns to rust-* skills (ownership question to rust-syntax-ownership, lifetime error to rust-errors-lifetimes, async runtime question to rust-impl-async-tokio, etc.), and a cross-skill quality checklist every Rust task should pass before completion. Keywords: "which Rust skill", "Rust task routing", "Rust code review checklist", "rust quality gate", clippy, rustfmt, MSRV, "Rust best practice check", "Rust code quality", "before I ship Rust", orchestrator, "Rust skill index", "what skill for", routing, "Rust checklist".
license
MIT
compatibility
Designed for Claude Code. Requires Rust 1.85+, edition 2024.
metadata
{"author":"OpenAEC-Foundation","version":"1.0"}
Rust Agents Orchestrator
This is the routing brain of the Rust skill package. It does two jobs:
Route: at the START of a Rust task, map the user prompt to the exact rust-* skill (or skills) to load.
Gate: at the END of a Rust task, run the cross-skill quality checklist before declaring the work done.
ALWAYS run step 1 before writing Rust code. ALWAYS run step 2 before reporting a Rust task complete.
This 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.
ALWAYS 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.
Ownership, borrowing, lifetimes
User prompt signal
Skill
"move", "value used after move", "who owns this"
[[rust-syntax-ownership]]
E0382, "borrow of moved value"
[[rust-errors-borrow-checker]]
"& vs &mut", "borrow", "two-phase borrow", "RefCell"
"review my Rust code", "is this idiomatic", deep clippy lint review
[[rust-agents-code-reviewer]]
"fix this compile error", iterate on rustc output, follow --explain suggestions
[[rust-agents-compile-fix]]
"which skill", "route this task", "run the quality checklist"
this skill
Decision Tree: Ambiguous Prompt to Skill
Rust task arrives
├── Contains an E0xxx code or "does not compile"? ......... ROUTE to errors-*
│ ├── E0382 / E0502 / E0596 / E0500 ............. rust-errors-borrow-checker
│ ├── E0106 / E0623 / E0495 / E0700 ............. rust-errors-lifetimes
│ ├── E0277 / E0599 / E0220 ..................... rust-errors-trait-bounds
│ ├── linker / native lib / version clash ....... rust-errors-build-link
│ ├── async `!Send` / Pin across .await ......... rust-errors-async
│ └── panic / OOB / abort at runtime ............ rust-errors-runtime
├── "How do I build / set up X"? ...................... ROUTE to impl-*
├── "Why does Rust work like X" (concept)? ............ ROUTE to core-*
├── "What is the syntax for X" (language form)? ....... ROUTE to syntax-*
├── "Review / is this idiomatic"? ..................... rust-agents-code-reviewer
└── Multiple skills plausible? ........................ load the NARROWEST
that names the exact construct, then load its core-* concept skill
only if the user needs the mental model, not just the syntax.
ALWAYS 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.
Cross-Skill Quality Checklist
Run this BEFORE declaring ANY Rust task complete. Every item is a hard gate.
#
Check
Command / inspection
Pass criterion
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
b
Clippy
cargo clippy --all-targets -- -D warnings
no warnings; correctness + suspicious + perf clean
c
Formatting
cargo fmt --all --check
exits 0, no diff
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
e
Async hygiene
inspect .await points
no blocking call on the async executor; no !Send value held across .await in a spawned task
f
Doc coverage
cargo doc + inspect public items
every public item has a /// doc; add a doctest where it clarifies usage
g
Unsafe is justified
grep unsafe blocks
every unsafe block has a // SAFETY: comment stating the invariant
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
i
Tests
cargo test --all-targets and cargo test --doc
all unit, integration, and doc tests pass
If any item fails, fix it and re-run the failing check. NEVER report a Rust task done with an unchecked item.
See 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.
Quick Reference
Routing happens FIRST, the checklist happens LAST. Never skip either.
Error code present means an errors-* skill, never a syntax-* skill.
cargo build passing is NOT the quality gate. cargo clippy plus cargo fmt --check plus cargo test is.
MSRV is set by rust-version in Cargo.toml. A new dependency must not raise it silently.
This skill routes and gates. Deep review is rust-agents-code-reviewer. Error iteration is rust-agents-compile-fix.