REA
Reverse engineer anything from your terminal or agent with one CLI and MCP server.
Agent Skills that teach coding agents to write, review, and port idiomatic Rust, plus a tested clippy config. Works with Claude Code, Codex, Copilot, Cursor, and Gemini CLI.
如果你是作者,可把这段代码贴到 README。徽章会链接回本页。
[](https://mcp.popnx.com/en/skills/morganlinton-beautifulrust)在同一工作中把 AI 连到服务的 MCP
Reverse engineer anything from your terminal or agent with one CLI and MCP server.
Codebase intelligence for TypeScript and JavaScript, exposed as structured MCP analysis tools.
MCP server for terminal commands, file operations, and process management
同类工作,排序与 Skill 列表相同
| 本项 BeautifulRust | rea | graphify | archify | security-audit-skill | |
|---|---|---|---|---|---|
| 作者 | morganlinton | morluto | Graphify-Labs | tt-a1i | cloudflare |
| Skill 数 | 1 | 1 | 1 | 1 | 1 |
| GitHub 星标 | 1,826 | 461,751 | 148,352 | 96,757 | 73,156 |
| 最近代码更新 | 2026年11月9日 | 2026年11月16日 | 2026年11月16日 | 2026年11月15日 | 2026年9月15日 |
| 许可证 | MIT | MIT | Apache-2.0 | Apache-2.0 | MIT |
morganlinton 提供的 1 个 Skill(指令集),AI 读取后照做 · 不是 MCP server
MCP = 手
把 AI 连到外部服务或数据,例如读取 Notion 或开发票。需要有程序或服务器在运行。
Skill = 手册
教 AI 怎么做某项工作的文本文件,不连接任何服务。
有些会重叠:少数 Skill 带有调用工具的脚本,少数 MCP 只提供知识。请从你想完成的工作出发。
Claude CodeClaude (เว็บ/แอป)CodexCursorGemini CLIGitHub Copilot
依据开发者 README 和 repo 中的文件夹
GitHub account morganlinton (person), 8 years old
★ 1,826 stars · code last changed 2026年11月9日
5 scripts that can run on a computer: evals/bevy-arena-regen/place-files.sh, evals/refactor-inventory-module/place-files.sh, evals/bevy-arena-regen/files/src/lib.rs, evals/bevy-arena-regen/files/tests/arena.rs and 1 more
No internet calls found in the scripts
No hooks or writes to machine settings found
Checked automatically from the repo files at commit b971843 (read only, nothing was run). Not a safety guarantee: read it and decide for yourself
第一步:你用哪个 AI?
选择你用的应用,本页只显示该应用的安装方法
Uploading to claude.ai would fail: the description is over 200 characters (593). Use "Let the AI install it" instead
复制这句话,粘贴到 Claude Code 的对话中
For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing
The AI tells you what it will do first and asks your permission at every step
重新打开 Claude Code,输入 /rust-best-practices,或直接提出相关任务,Claude 会自动选用
Checked against official docs 2026年11月12日 · Source: code.claude.com
Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。
已经装好了吗?先检查 · 打开终端,输入这条命令后按 Enter
node -vMac:按 ⌘ + Space,输入 Terminal 后按 Enter
Windows:打开“开始”菜单,输入 Windows PowerShell,然后选“打开”
还没安装: 打开官方下载页,选择 LTS 版本和点选式安装程序:Mac 用 .pkg · Windows 用 .msi。双击后一路下一步即可,不需要 curl 命令
装好后关掉终端再打开,重新运行同一条命令,应显示版本号: node -v
安装一次,所有需要 Node.js 的工具都能用
正在检查命令 · 通过后才会显示复制按钮
摘自开发者 README,会下载并运行开发者的代码
Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”
这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹
正在检查命令 · 通过后才会显示复制按钮
ChatGPT 桌面应用内置 Codex,Codex 从 ~/.agents/skills 文件夹读取 Skill
在 ChatGPT 桌面应用中打开 Codex,把这句话粘贴到对话中
The AI always shows you the path before installing
The AI tells you what it will do first and asks your permission at every step
把 rust-best-practices 文件夹放到 ~/.agents/skills/rust-best-practices
~ 是你的主文件夹($HOME)
Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。
Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”
这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹
正在检查命令 · 通过后才会显示复制按钮
Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com
不能使用你自己安装的 Skill,只能使用目录中插件自带的 Skill
想在 ChatGPT 中使用这个 Skill,请按上面的方法使用 ChatGPT 桌面应用
Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com
复制这句话,粘贴到 Codex 的对话中 · 适用于 ChatGPT 桌面应用中的 Codex、Codex CLI 和 IDE 扩展
For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing
The AI tells you what it will do first and asks your permission at every step
Codex 会自动发现新安装的 Skill;如果没有出现,请重启 Codex · 使用方法:在 ChatGPT 中输入 @ 并选择 Skill · 在 Codex CLI 或 IDE 扩展中运行 /skills,或输入 $ 加 Skill 名称
Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com
Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。
Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”
这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹
正在检查命令 · 通过后才会显示复制按钮
复制这句话,粘贴到 Cursor 的对话中
For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing
The AI tells you what it will do first and asks your permission at every step
在 Cursor 的 Agent 聊天中输入 / 并选择 rust-best-practices
Checked against official docs 2026年11月12日 · Source: cursor.com
Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。
Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”
这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹
正在检查命令 · 通过后才会显示复制按钮
适用于其他能读取 Skill 的应用。这句话列出了 Claude Code、Codex 和 Cursor 的路径,AI 会按你的应用选择 · Copy this sentence into the app’s chat
For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing
The AI tells you what it will do first and asks your permission at every step
Checked against official docs 2026年11月12日 · Source: code.claude.com, learn.chatgpt.com, cursor.com
其他支持 Agent Skills 的应用(如 Gemini CLI、GitHub Copilot)使用不同文件夹,请查看该应用的指南,再把含 SKILL.md 的文件夹复制过去。
已于 2026年11月11日 对照 Claude Code、Codex 和 Cursor 官方指南核实 skill 文件夹
以下文字来自开发者的 repo,不是 PopNx MCP 的指令
显示前 8,000 个字符 · 在 GitHub 打开完整文件
---
name: rust-best-practices
description: >-
Write idiomatic, robust, maintainable Rust. Use this skill whenever you write, review,
refactor, debug, or explain Rust code: new crates, modules, functions, structs, traits,
error types, async code, unsafe or FFI code, Cargo.toml, tests, or rustdoc. Trigger on
any mention of Rust, cargo, crates, .rs files, the borrow checker, lifetimes, traits,
clippy, or rustfmt, even when the user does not ask for "best practices" or "idiomatic"
code. Synthesized from the Google Rust Style Guide, the Rust API Guidelines,
Effective Rust, Rust Design Patterns, and Microsoft's Pragmatic Rust Guidelines.
---
# Rust best practices
Distilled from five Rust style and design guides, with a digest of each in `references/`.
Where they disagree, this file says which to follow and why.
## 1. Mindset
- **Write Rust-shaped code.** Don't port C++, Java, C#, or Python constructs one-to-one.
Model errors with `Result`, resources with ownership and `Drop`, polymorphism with
traits and enums, and nullability with `Option`. Inheritance-flavored tricks (`Deref` to
a "base" struct, `Manager`/`Factory` types, `throw_if_null` helpers) are smells.
- **Make invalid states unrepresentable.** Push invariants into types: enums instead of
bool flags and "must be X if Y" comments, newtypes for units and IDs, fallible
constructors that validate once. Then the compiler enforces what a comment only requests.
- **Application code is not library code.** Library code (anything with external users)
follows the API-design rules below strictly. Application code should favor simplicity
and directness: concrete types, `String` or `&str` rather than `impl Into<String>`
parameters, `anyhow`-style errors, `Vec` return values, no speculative generality.
- **Let the tools do the work.** rustfmt owns formatting, clippy owns idiom checks, the
compiler owns memory safety. Spend your attention on design.
## 2. Before you hand back code
Run these and fix everything they report:
```bash
cargo fmt
cargo clippy --all-targets --all-features -- -D warnings
cargo test
cargo doc --no-deps # libraries: catches broken doc links and missing docs
```
- Fix a lint rather than silencing it. When a lint is genuinely wrong for one item, use
`#[expect(clippy::name, reason = "...")]` on the narrowest item. `expect` warns when
the lint stops firing, so stale suppressions get cleaned up. Use `#[allow]` only in
generated code or macro output.
- Never put `#![deny(warnings)]` in source: new toolchains add warnings and break the
build. Enforce warnings-as-errors in CI instead, with `cargo clippy -- -D warnings`.
- Configure lints once in `Cargo.toml` (`[lints]` or `[workspace.lints]`), not with
scattered crate attributes. If a project has none, suggest `lints/lints.toml` and
`lints/clippy.toml` from https://github.com/morganlinton/BeautifulRust; the suppression
lints in it need `rust-version` 1.81 or later.
## 3. Ownership and borrowing
**Prefer unique ownership.** Reach for `Rc`/`Arc` only when shared ownership is part of
the design, and for `RefCell`/`Mutex` only when interior mutability is. They are not
failures, but they move checking from compile time to run time, so use them on purpose.
**Don't clone to make the borrow checker stop complaining.** A clone that exists only to
end a borrow produces a silent copy whose later changes are lost. Try these first, in
roughly this order:
1. Extend a temporary with a named `let`, or shorten a borrow with a block.
2. Split a long expression into typed intermediates so the failing step is visible.
3. Move a field out of `&mut self` with `std::mem::take` (needs `Default`),
`std::mem::replace`, or `Option::take` instead of cloning it.
4. Split a large struct into smaller ones so disjoint fields can be borrowed separately.
The compiler tracks disjoint field borrows inside one function, but not across
method calls.
5. Clone small, immutable data deliberately, and say so in a comment if it's not obvious.
6. Use indices into an owning `Vec`, or `Rc<RefCell<_>>` with `Weak` back-pointers, as
a last resort. Avoid self-referential structs.
```rust
// Move out of a &mut enum without cloning.
fn a_to_b(e: &mut MyEnum) {
if let MyEnum::A { name, x: 0 } = e {
*e = MyEnum::B { name: std::mem::take(name) };
}
}
```
**Accept the most general borrowed type.** `&str` not `&String`, `&[T]` not `&Vec<T>`,
`&T` not `&Box<T>`, `Option<&T>` not `&Option<T>`. Deref coercion then lets callers pass
owned values, borrows, or literals. Where you only read a path, string, or byte buffer,
`impl AsRef<Path>` / `impl AsRef<str>` / `impl AsRef<[u8]>` is fine on parameters (never
on struct fields; store `PathBuf` and `String`). Library code that only iterates should
take `impl IntoIterator<Item = T>`; application code may simply take `&[T]`.
**Take ownership only when you need it, and then take it by value.** If a function stores
or consumes its argument, take `T`, not `&T` plus an internal `.clone()`. If it only
reads, take `&T`; if it mutates in place, `&mut T`. Return multiple values as a tuple or
struct, not through `&mut` out-parameters (reusing a caller-owned buffer, as
`Read::read` does, is the exception).
**Prefer owned data in structs.** A struct holding `&'a T` forces a lifetime onto every
container. Owning a `String` or `Vec<u8>` is usually simpler and rarely the bottleneck.
When a type does carry a lifetime, give it a descriptive name (`'src`, `'conn`); `'_` and
`'a` are fine on simple functions.
**Freeze after setup.** Build with `let mut`, then rebind `let data = data;` so later
code cannot mutate it by accident.
**Keep `Rc`, `Arc`, `Box`, and `RefCell` out of public signatures.** Take `&T`,
`&mut T`, or `T` and let callers decide how to own things. A service that must be shared
implements a cheap `Clone` by wrapping its state in `Arc<Inner>` internally.
## 4. Types and API design
### Naming
| Item | Case | Notes |
|---|---|---|
| Types, traits, enum variants | `UpperCamelCase` | Acronyms are one word: `Uuid`, `HttpClient` |
| Functions, methods, modules, locals | `snake_case` | |
| Constants, statics | `SCREAMING_SNAKE_CASE` | |
| Type parameters | short, from the main bound | `T`, `R: Read`, `W: Write` |
| Lifetimes | short lowercase | descriptive when on a type |
- No `get_` prefix on getters: `fn len(&self)`, `fn name(&self) -> &str`,
`fn name_mut(&mut self)`. Use bare `get` only when there is one obvious thing to get
(`Cell::get`). Related: `set_foo(T)`, `take_foo()`, `with_foo(|f| ..)` for closure
access, and unsafe `_unchecked` siblings for checked accessors.
- Conversion prefixes signal cost and ownership: `as_` (free, borrow to borrow), `to_`
(expensive, borrow to owned or borrow to borrow), `into_` (consumes `self`). Put `mut`
in type order: `as_mut_slice`, not `as_slice_mut`.
- Constructors: `new` (primary), `with_capacity` / `new_with_foo` (variants), `try_new`
(fallible), `from_foo` (conversion; pair important ones with a `From` impl). I/O
resources use domain verbs: `File::open`, `TcpStream::connect`.
- `iter` / `iter_mut` / `into_iter` return types named `Iter` / `IterMut` / `IntoIter`;
`keys()` returns `Keys`.
- Error types read verb-object-error: `ParseBoolError`, not `BoolParseError`.
- Avoid weasel suffixes `Service`, `Manager`, `Factory`, `Helper`, `Util`. Name the thing
it is (`Bookings`, `Dispatcher`, `FooBuilder`). Don't repeat the module name in the
type (`foo::Id`, not `foo::FooId`). Avoid abbreviations an outsider wouldn't know.
- If you implement `len()`, implement `is_empty()`.
- Feature names are bare: `std`, `serde`, `alloc`, never `use-std` or `no-std`.
### Model the domain with types
- **Newtypes** for semantic distinctions: `struct Miles(f64)` and `struct Kilometers(f64)`
cannot be mixed, where a type alias can. Add `#[repr(transparent)]` when layout matters,
and derive or forward the traits you need (`derive_mo提问、分享技巧或报告无法使用。按“有帮助”数量排序。