Borrowing it
Nothing to install: this file belongs to edochi/mdvs. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/edochi/mdvs/main/.claude/skills/rust/SKILL.mdgit clone --depth 1 https://github.com/edochi/mdvsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/edochi/mdvs/rust)<a href="https://agentmods.dev/skills/edochi/mdvs/rust"><img src="https://agentmods.dev/badge/skills/edochi/mdvs/rust/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/edochi/mdvs/rust"><img src="https://agentmods.dev/badge/skills/edochi/mdvs/rust.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00032 | $0.01010 |
| Opus 5.5 | $0.00013 | $0.00404 |
| Sonnet 5.5 | $0.00006 | $0.00202 |
| Haiku 4.5 | $0.00003 | $0.00101 |
Grade A, and why
rust scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rust Coding Conventions
Error Handling
- Return
Result<T, E>for fallible operations - Use
thiserrorwith#[derive(Error)]for library error enums. Structure: variant name describes the failure,#[error("...")]format string includes diagnostic context (sizes, IDs), use#[from]for transparent wrapping of upstream errors - Propagate with
?operator — avoid match chains for error forwarding - Never use
.unwrap()or.expect()outside of tests anyhowfor binary/CLI code where specific error types don't matter; never in library crates
Borrowing & Ownership
- Prefer
&Tover.clone()unless ownership transfer is required - Use
&stroverString,&[T]overVec<T>in function parameters - Small
Copytypes (<=24 bytes) can be passed by value - Use
Cow<'_, T>when ownership is ambiguous at compile time - If you're adding
.clone()to satisfy the borrow checker, step back and reconsider the data flow
Type Design
- Use newtypes for semantic distinction:
pub struct UserId(pub Uuid),pub struct Port(pub u16) - Derive ordering:
Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize— include only what's semantically correct Copyfor small value types (IDs, enums).Clonebut notCopyfor larger types- Implement
Displaymanually when the type appears in logs or user-facing output
Documentation Style
///doc comments on all public types, functions, and enum variants — explain what and how//inline comments only to explain why (safety invariants, workarounds, design rationale)- Function docs should include format specs when relevant (e.g., wire format, encoding details)
- Group related constants with
// --- Section Name ---separators - Every
TODOneeds a linked issue:// TODO(#42): description - No module-level
//!doc comments unless the module is a public API entry point
Testing Conventions
- Tests live inline:
#[cfg(test)] mod tests { }at the bottom of each module - Test naming:
snake_case_description— be descriptive (e.g.,buffer_duplicate_insert_ignored) - For serialization testing, use round-trip helpers that encode then decode and assert equality
#[tokio::test]for async tests — always with timeouts- One assertion per test when possible; multiple related assertions are fine if testing one logical behavior
- Test error conditions explicitly — assert the specific error variant, not just "is error"
- Use polling with backoff for async assertions, never fixed
sleep
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 94 lines · 32 tokens per session scan A 8e047ca4aaf2
rust is a skill published in the GitHub repository edochi/mdvs (27 stars, last pushed 11d ago), licensed MIT. It adds 32 tokens to every session and 1,010 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-05.
Other skills, from other repositories
rust-check
Run cargo check on the current Rust project to find compile errors.
dd-code-generation
Use pup CLI for immediate Datadog operations or generate code for integration into applications.
rust-crate-ci
Load before editing any Rust crate in this repo (currently runners/swarm-sandbox-runner). Covers the mandatory local validation gate, common rustfmt/clippy pitfalls, and Windows-specific Rust correctness patterns that CI enforces but are hard to catch locally without a Windows toolchain.
Agent Browser Automation
Fast Rust-based headless browser automation CLI with Node.js fallback for AI agents, featuring navigation, clicking, typing, snapshots, and structured commands optimized for agent workflows.
pixiv-cli-native
Change or validate pixiv-cli Rust ugoira, cgo/FFI, committed static libraries, vendored dependencies, Linux ABI, and native runner evidence. Use when native sources, library hashes, target toolchains, or encoder behavior change; not for routine Go-only or documentation edits.
codemark
Manage structural code bookmarks that survive refactoring. Use when the user says "remember this", "bookmark this", "save this location", "load my bookmarks", "what do I have bookmarked", "mark this code", "codemark", or when starting a new session and needing to reload context from a previous session. Also use…