Borrowing it
Nothing to install: this file belongs to VibRev/ida-headless-mcp. 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/VibRev/ida-headless-mcp/main/.claude/skills/rust-elegant/SKILL.mdgit clone --depth 1 https://github.com/VibRev/ida-headless-mcpWrote 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/vibrev/ida-headless-mcp/rust-elegant)<a href="https://agentmods.dev/skills/vibrev/ida-headless-mcp/rust-elegant"><img src="https://agentmods.dev/badge/skills/vibrev/ida-headless-mcp/rust-elegant/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/vibrev/ida-headless-mcp/rust-elegant"><img src="https://agentmods.dev/badge/skills/vibrev/ida-headless-mcp/rust-elegant.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.00111 | $0.01534 |
| Opus 5 | $0.00056 | $0.00767 |
| Sonnet 5 | $0.00022 | $0.00307 |
| Haiku 4.5 | $0.00011 | $0.00153 |
Grade A, and why
rust-elegant 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 9d 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 — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rust 优雅开发规范
核心原则:写出来的代码要让有经验的 Rust 工程师看了不难受。能跑不是标准,惯用、可维护、高性能才是标准。
快速诊断:看到这些立刻停下来
| 看到这个 | 说明踩了反模式 | 去读 |
|---|---|---|
fn parse_xxx / fn xxx_to_string 作为自由函数 |
枚举行为被流放 | type-design.md |
utils.rs / helpers.rs / ext.rs 里有枚举相关函数 |
同上 | type-design.md |
函数参数列表超过 3 个,或含 bool 参数 |
C 式传参 | type-design.md |
fn foo(x: &String) / fn foo(x: &Vec<T>) |
过度具体化 | type-design.md |
.unwrap() 或 Box<dyn std::error::Error> |
错误处理走极端 | error-handling.md |
Arc<Mutex<T>> 满天飞,或借用报错就 .clone() |
所有权逃避 | ownership.md |
let mut result = Vec::new(); for ... { result.push(...) } |
拒绝迭代器 | iterators.md |
match opt { Some(x) => ..., None => ... } 多层嵌套 |
Option/Result 组合子盲区 | iterators.md |
_ => {} 或 _ => unreachable!() 兜底 enum match |
放弃穷尽性检查 | misc.md |
let _foo = ... 压掉 unused warning |
掩盖逻辑漏洞 | misc.md |
不必要的 .to_string() / .clone() 在函数签名或热路径 |
无效分配 | misc.md |
| 重复的模式匹配或样板代码超过 3 次 | 该用宏了 | misc.md |
所有代码堆一个 main.rs 或 lib.rs |
缺少 Workspace 拆分 | project-structure.md |
/// 写废话,或 // ==== 横幅注释 |
违反注释规范 | comments.md |
| 捏造或混用不同年份的 crate API | 依赖幻觉 | misc.md |
写代码前的强制检查清单
在落笔前,依次问自己:
1. 这个函数是某个类型的行为吗?
- 是 → 写进
impl T,不要写成自由函数
2. 涉及转换?
&str/String → T→impl FromStr for T(支持.parse())T → 显示字符串→impl Display for T- 无损转换 →
impl From<A> for B - 有损转换 →
impl TryFrom<A> for B
3. 函数参数只需要某种"能力",不需要具体类型?
- → 定义 trait,参数用
impl ThatTrait
4. 参数 ≥ 4 个,或含 bool/Option 参数?
- → Builder pattern(
Config { ..Default::default() }.build())
5. 参数是 &String 或 &Vec<T>?
- → 改成
&str或&[T]
What ships with it
7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 9d ago First seen · 96 lines · 111 tokens per session scan A 40d29e382f1d
rust-elegant is a skill published in the GitHub repository VibRev/ida-headless-mcp (15 stars, last pushed 4d ago), licensed Apache-2.0. It adds 111 tokens to every session and 1,534 once invoked, about $0.0006 per session on Opus 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-08-31.
Other skills, from other repositories
analyzing-golang-malware-with-ghidra
Reverse engineer Go-compiled malware using Ghidra with specialized scripts for function recovery, string extraction, and type reconstruction in stripped Go binaries.
analyzing-golang-malware-with-ghidra
Use when reverse engineer Go-compiled malware using Ghidra with specialized scripts for function recovery, string extraction, and type reconstruction in stripped Go binaries. Use when reverseing engineer go-compiled malware using ghidra with specialized scripts for.
analyzing-golang-malware-with-ghidra
Reverse engineer Go-compiled malware in Ghidra by parsing Go buildinfo and pclntab structures, recovering stripped/obfuscated function names (e.g. via GoResolver), and extracting embedded module/dependency strings and types from Go binaries. Use when analyzing a Go-language malware sample, deobfuscating a…
Reverse Engineering & Binary Analysis
Binary analysis, assembly interpretation, disassembly, decompilation, firmware RE, and protocol reverse engineering.
re-zig
A guide to examining compiled Zig programs, including how Zig-specific error handling, panics, compile-time code, and C interfaces appear in machine code. Reverse engineering means studying a compiled program to understand its behaviour.
analyzing-golang-malware-with-ghidra
Reverse engineer Go-compiled malware using Ghidra with specialized scripts for function recovery, string extraction, and type reconstruction in stripped Go binaries.