Rust Development Skill
Guard: MCP Server Required
This skill REFUSES to operate without the rust-doc MCP server running.
Before any Rust code generation, the agent MUST:
- Check that
vendor/rust-docs-mcp-server/target/release/rustdocs_mcp_serverexists - If not built, run:
cd vendor/rust-docs-mcp-server && cargo build --release - Start the server in background:
vendor/rust-docs-mcp-server/target/release/rustdocs_mcp_server "serde@^1.0" &
Agentic Guards
When generating Rust code, the agent MUST:
- Query the rust-doc MCP server for crate APIs before writing code
- Never invent function signatures — verify via
query_rust_docs - Use the latest documentation, not training data
- Prefer safe Rust patterns (avoid
unsafewithout explicit justification)
Preferences
- Dependency management:
cargo addover manual Cargo.toml edits - Testing:
#[cfg(test)]withcargo test - Formatting:
cargo fmtbefore commit - Clippy:
cargo clippy -- -D warningsfor CI - Edition: 2024 preferred
- Error handling:
anyhowfor applications,thiserrorfor libraries
Quick Reference
# Build and start the MCP server
cd vendor/rust-docs-mcp-server && cargo build --release
./target/release/rustdocs_mcp_server "serde@^1.0" &
# Query docs via MCP tool
# (available after server starts, via query_rust_docs tool)