rust-coding-skill
Installation
SKILL.md
Contains Shell Commands
This skill contains shell command directives (!`command`) that may execute system commands. Review carefully before installing.
Rust Coding Skill
Opinionated Rust rules for the Copilot Rust SDK (rust/). Priority order:
- Readable code — every line should earn its place
- Correct code — especially in concurrent/async contexts
- Performant code — think about allocations, data structures, hot paths
Error handling
The SDK's public error type is crate::Error (rust/src/errors.rs). Add new
variants to crate::ErrorKind rather than introducing parallel error enums
per module — every public failure mode is part of the API contract and should
be expressible in one type.
anyhow is reserved for binaries and example code. Library code never returns
anyhow::Result — callers can't pattern-match on anyhow::Error, so it would
prevent them from handling specific failures.