idalib-rs/idalib/idalib-rust-style
Claude Code and agent skill by idalib-rs/idalib
- community
Checking that the SKILL.md file is still in the repository.
Best practices for contributing to IDALIB Rust bindings
Install
npx vskill@latest install idalib-rs/idalib/idalib-rust-styleSKILL.md
Rust style guidelines
Ensure the entire codebase adheres to the guidelines below. There should be no exceptions to these guidelines, failure to enforce them will result in a failed review.
<guidelines> Follow these instructions strictly to ensure high-quality Rust code:
- Do not use emojis and avoid excessive comments. Write self-explanatory code instead.
- Do not use decorations around println, etc.
- Consistently name types and methods.
- Provide accessors and mutators for struct fields, avoid
pubfields. E.g., for a field namedtimeout, provide:
```rust fn timeout(&self) -> ... { ... } fn set_timeout(&mut self, to: ...) { ... }
- Use fluent style method names.
- Organise imports in the following order: 1) standard library imports, 2) external library imports next, 3) same crate imports next. Use appropriate whitespace to separate groups of related imports.
- Do not nest modules in imports--DO NOT do this:
use module1::blah::{module2::bleep::Type, module3::Bleh}.
CORRECT: ``rust use module1::blah::module2::bleep::Type; use module1::blah::module3::Bleh; ``
CORRECT: ```rust use std::collections::{HashMap, HashSet}; use std::path::{Path, PathBuf};
use serde::Serialize; use tokio::fs;
use crate::models::DataModel; use crate::utils::helper; ```
INCORRECT: ``rust use std::{collections::{HashMap, HashSet}, path::{Path, PathBuf}}; ``
INCORRECT: ``rust use std::collections::HashMap; use std::collections::HashSet; ``
- For module layout, use mod.rs and directories when a module may have sub-modules or module_name.rs for leaf modules. Do not use new-style module paths.
- Handle errors, DO NOT silently ignore them without good reason.
- For error messages, always use lower-case unless you have a proper noun or acronym at the start of the string, i.e., prefer “component not found: reason” over “Component not found: Reason”, but keep "I/O error: reason" and "HTTP error: reason".
- Make use of “borrowed” types rather than owned variants if possible:
- Prefer
impl AsRef<Borrowed>vs&Ownedorimpl AsRef<Owned>unless the owned variant is really needed. - Prefer
impl AsRef<str>or&strover&String - Prefer
impl AsRef<[u8]>or&[u8]over&Vec<u8> - Prefer
impl AsRef<Path>or&Pathover&PathBuf
- Prefer to use methods that indicate intent: avoid usage of
to_stringon `&strand opt forto_ownedorString::from` instead.
- Avoid useless imports, e.g,
use log;; this is superfluous, sincelogwill already be in scope if you havelogas a dependency.
- For collections, prefer
Vec::new()overvec![]for empty vectors.
- When using
OptionandResult, prefer the?operator for propagating errors and unwrapping values instead of using.unwrap()or.expect().
- Do not annotate types via their let bindings, ALWAYS use turbo-fish syntax or rely on type inference. For example, use:
``rust let value = Vec::<u8>::new(); ` or `rust let value = Vec::new(); ` over `rust let value: Vec<u8> = Vec::new(); ``
- When formatting to build strings, log, or to print to the console, ensure you format as below:
``rust let name = "Alice"; let greeting = format!("Hello, {name}!"); println!("Hello, {name}!"); ``
DO NOT:
``rust let name = "Alice"; let greeting = format!("Hello, {}!", name); println!("Hello, {}!", name); ``
- DO NOT call FFI functions in methods that operate on an IDB or derived types without binding the owning type to the lifetime of the IDB. For example:
- Use the following tools to help enforce these guidelines:
cargo fmt -- --config imports_granularity=Module,group_imports=StdExternalCrateto format your code.cargo clippy --no-depsto lint your code andcargo clippy --fixto automatically fix issues where possible.cargo dylint --git https://github.com/xorpse/rust-style --pattern '*'to run the custom lints for this project. Ifdylintdoes not run correctly, ensure it is installed:cargo install cargo-dylint dylint-link.
</guidelines>
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/idalib-rust-style/SKILL.md
Popularity
- Repository stars
- 251
- Repository forks
- 23
- 7-day trend score
- 28
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 19 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/idalib-rs/idalib/idalib-rust-style)