rust-programming
Use when writing, reviewing, or refactoring Rust code, especially workspace crates, public APIs, error handling, async code, ownership choices, or…
Skill by mkurman
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/mkurman-rust-programming
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/rust-programming
What's inside
- Skill name
rust-programming- Description
- Use when writing, reviewing, or refactoring Rust code, especially workspace crates, public APIs, error handling, async code, ownership choices, or performance-sensitive paths.
- License
- MIT
- Instructions
- 130 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- idiomatic-rust.md · references/
SKILL.md (first lines)
# Rust Programming
Use this skill to keep Rust changes idiomatic, maintainable, and easy to verify.
## Operating Rules
1. Read the surrounding module before changing ownership, trait bounds, public types, or async flow.
2. Prefer the repository's existing crate boundaries and error types over introducing a new abstraction.
3. Make invalid states unrepresentable with focused types, enums, and constructors where the domain has real invariants.
4. Return `Result` for recoverable failures and reserve `panic!`, `unwrap`, and `expect` for tests, impossible states with a clear message, or process-fatal startup validation.
5. Keep allocations and clones intentional. Borrow first, clone at ownership boundaries, and document non-obvious lifetime or allocation tradeoffs.
6. Favor explicit control flow over clever chains when error handling, locking, cancellation, or state mutation is involved.
7. Keep public APIs small, named consistently, and documented enough that callers know ownership, errors, and side effects.
8. Run `cargo fmt`, focused `cargo test`, and `cargo clippy --workspace --all-targets` when the change warrants it.
## Design Checks
- **Types**: Does the type express the domain, or is it a bag of loosely related fields?
- **Ownership**: Can the caller pass a reference? If ownership is needed, is the transfer visible in the API?
- **Errors**: Is each error actionable at the layer that receives it?
- **Concurrency**: Are locks held for the shortest practical scope, and never across awaits unless deliberately required?
- **Traits**: Are trait bounds on the function that needs them instead of leaking through larger structs?
- **Testing**: Do tests cover behavior and edge cases, not only compilation or snapshots?
## Best Practice Patterns
### Accept Borrowed Inputs
```rust
// Avoid: forces callers to allocate or give up ownership.
fn load_config(path: PathBuf) -> Result<Config, ConfigError> {
std::fs::read_to_string(path)?.parse()
}
// Prefer: accepts Path, PathBuf, and path-like wrappers.
fn load_config(path: impl AsRef<std::path::Path>) -> Result<Config, ConfigError> {
std::fs::read_to_string(path)?.parse()
}
```
### Keep Error Types Actionable
```rust
#[derive(Debug, thiserror::Error)]
pub enum ImportError {
#[error("failed to read import file {path}")]
Read {
path: std::path::PathBuf,
#[source]
source: std::io::Error,
},
#[error("invalid import payload")]
InvalidPayload(#[from] serde_json::Error),
}
```
Use typed variants when callers can recover differently. Use context-rich messages at process or UI boundaries where diagnosis matters more than matching.
### Make Invalid States Unrepresentable
```rust
pub struct NonEmptyName(String);
impl NonEmptyName {
pub fn parse(value: String) -> Result<Self, NameError> {
if value.trim().is_empty() {
return Err(NameError::Empty);
}
Ok(Self(value))
}
pub fn as_str(&self) -> &str {
&self.0
}
}
```
Do validation once at construction instead of repeatedly checking raw strings throughout the codebase.
### Do Not Hold Locks Across Awaits
```rust
// Avoid: the lock stays held while the async write waits.
async fn save_bad(state: &tokio::sync::Mutex<State>, store: &Store) -> anyhow::Result<()> {
let guard = state.lock().await;
store.write(&guard.snapshot()).await
}
// Prefer: copy the data needed, then release the lock before await.
async fn save_good(state: &tokio::sync::Mutex<State>, store: &Store) -> anyhow::Result<()> {
let snapshot = {
let guard = state.lock().await;
guard.snapshot()
};
store.write(&snapshot).await
}
```
### Clone At Ownership Boundaries
```rust
let workspace_id = workspace.id.clone();
tokio::spawn(async move {
refresh_workspace(workspace_id).await
});
```
Cloning for a spawned task, channel message, cache entry, or stored value is often correct. Cloning to satisfy the borrow checker inside one synchronous function is a signal to shorten borrows first.
### Test Behavior, Not Implementation Shape
```rust
#[test]
fn rejects_empty_workspace_name() {
let err = NonEmptyName::parse(" ".to_string()).unwrap_err();From mkurman/zorai, MIT.
More from mkurman/zorai
- 0.798score
best-practices
web-quality-skills
Apply modern web development best practices for security, compatibility, and code quality.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
video-analyzer
mkurman
Use this skill when analyzing existing video files using FFmpeg and AI vision, extracting frames for design system generation, detecting scene boundaries…
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
internal-docs
mkurman
Use this skill when writing, reviewing, or improving internal engineering documents - RFCs, design docs, post-mortems, runbooks, and knowledge base articles.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
proposal-writing
mkurman
Use this skill when writing proposals, responding to RFPs, drafting SOWs, or developing pricing strategies.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
budgeting-planning
mkurman
Use this skill when building budgets, conducting variance analysis, implementing rolling forecasts, or allocating costs.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
create-workflow
mkurman
Conversational guide for creating valid YAML workflow definitions.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
product-strategy
mkurman
Use this skill when defining product vision, building roadmaps, prioritizing features, or choosing frameworks like RICE, ICE, or MoSCoW.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
brand-strategy
mkurman
Use this skill when defining brand positioning, voice and tone guidelines, brand architecture, or storytelling frameworks.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
social-media-strategy
mkurman
Use this skill when planning social media strategy, creating platform-specific content, scheduling posts, or analyzing engagement metrics.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
compensation-strategy
mkurman
Use this skill when benchmarking compensation, designing equity plans, building leveling frameworks, or structuring total rewards.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
account-management
mkurman
Use this skill when managing key accounts, planning expansions, running QBRs, or mapping stakeholders.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
video-audio-design
mkurman
Use this skill when adding audio to programmatic videos - generating narration with ElevenLabs TTS, sourcing royalty-free background music, creating SFX with…
SkillAFreshness: A★ 325Claude Code +9
Signals
- Stars
- 325
- Forks
- 24
- Open issues
- 0
- Last commit (this folder)
- May 4, 2026 (5 months ago)
- Last release
- Oct 23, 2026 (5 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/mkurman/zorai
- Website
- zorai.app/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from mkurman
- 0.597score
create-workflow
mkurman
Conversational guide for creating valid YAML workflow definitions.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
account-management
mkurman
Use this skill when managing key accounts, planning expansions, running QBRs, or mapping stakeholders.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
brand-strategy
mkurman
Use this skill when defining brand positioning, voice and tone guidelines, brand architecture, or storytelling frameworks.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
budgeting-planning
mkurman
Use this skill when building budgets, conducting variance analysis, implementing rolling forecasts, or allocating costs.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
compensation-strategy
mkurman
Use this skill when benchmarking compensation, designing equity plans, building leveling frameworks, or structuring total rewards.
SkillAFreshness: A★ 325Claude Code +9 - 0.597score
internal-docs
mkurman
Use this skill when writing, reviewing, or improving internal engineering documents - RFCs, design docs, post-mortems, runbooks, and knowledge base articles.
SkillAFreshness: A★ 325Claude Code +9
Cite this page
rust-programming skill. Agent Mart. https://agentmart.dev/skills/mkurman-rust-programming (last updated 2026-10-24)