Best for
- Use this skill when writing, refactoring, debugging, or auditing Rust code.
Benknightdark/neo-skills/skills/neo-rust/SKILL.md
Use this skill when writing, refactoring, debugging, or auditing Rust code. Trigger for .rs files, Cargo projects, ownership/borrowing/lifetime issues, Result/Option error handling, unnecessary clone/performance work, unsafe code review, or modern Rust architecture.
Decision brief
Write safe, maintainable, and idiomatic Rust code by strictly following the official design patterns, leveraging Rust's powerful type system, and avoiding anti-patterns.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/Benknightdark/neo-skills --skill "skills/neo-rust"Inspect the Agent Skill "neo-rust" from https://github.com/Benknightdark/neo-skills/blob/c3e3d1bcf6aae00a729ceab257e6a68dd40d89ec/skills/neo-rust/SKILL.md at commit c3e3d1bcf6aae00a729ceab257e6a68dd40d89ec. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Progress: - [ ] Step 1: Perceive & Inventory (Check if Cargo.toml and .rs files exist in the project, and clarify whether the task is "feature development", "refactoring", or "Code Review"). - [ ] Step 2: Load Reference (Based on the task type, dynamically load corresponding ref…
1. Inspect the current directory to verify if Cargo.toml exists. 2. Analyze the task. For Code Review tasks, read existing changes; for feature development, determine the target modules to create or modify.
To save context space, only this SKILL.md is loaded initially. Once executing the task, the Agent must load the following resources: Development & Architecture: Load patterns.md and coding-style.md. Review, Refactoring & Debugging: Load anti-patterns.md.
Verify newly written or modified Rust code to ensure it is 100% compilable: 1. Run cargo check to verify syntax and type checking. 2. Run cargo clippy --all-targets -- -D warnings to perform strict static analysis and catch potential code smells. 3. If validation fails: - Carefu…
Review the “Template A: Code Review Report” section in the pinned source before continuing.
Permission review
The documentation asks the agent to read local files, directories, or repositories.
Inspect the current directory to verify if `Cargo.toml` exists.The documentation asks the agent to read local files, directories, or repositories.
**Development & Architecture**: Load [patterns.md](file:///Users/ben/Projects/neo-skills/skills/neo-rust/reference/patterns.md) and [coding-style.md](file:///Users/ben/Projects/neo-skills/skills/neo-rust/reference/coding-style.md).Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 85/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 7 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Write safe, maintainable, and idiomatic Rust code by strictly following the official design patterns, leveraging Rust's powerful type system, and avoiding anti-patterns.
async function, using the standard library's std::sync::Mutex and holding its MutexGuard across an .await boundary will cause a compiler error because MutexGuard does not implement Send and cannot be transferred across threads.
{} to limit the MutexGuard lifetime before the .await, or use tokio::sync::Mutex instead..clone() excessively, which introduces significant memory allocation and copy overhead.
&str instead of String, &[T] instead of Vec<T>), or refactor ownership structures and lifetimes..unwrap() or panic!() directly in library or production-grade code will cause the application to crash, violating Rust's safety-first principle.
Result<T, E> or Option<T> for graceful error propagation, and use the ? operator or match expression to handle them.Progress:
Cargo.toml and .rs files exist in the project, and clarify whether the task is "feature development", "refactoring", or "Code Review").reference/patterns.md and reference/coding-style.md for writing new code, and load reference/anti-patterns.md for reviews and debugging).cargo check and cargo clippy. Fix any warnings or errors until compilation passes cleanly without warnings).cargo fmt to format the code according to official guidelines, and present output using the Output Templates).Cargo.toml exists.To save context space, only this SKILL.md is loaded initially. Once executing the task, the Agent must load the following resources:
Verify newly written or modified Rust code to ensure it is 100% compilable:
cargo check to verify syntax and type checking.cargo clippy --all-targets -- -D warnings to perform strict static analysis and catch potential code smells.stderr compiler errors or Clippy suggestions.Present your output using the following structured templates depending on the task type.
# Rust Code Review Report
## 1. Executive Summary
* **Score**: [1-10 rating]
* **Summary**: [Overall feedback on code quality, ownership usage, and error handling]
## 2. Findings
> [!IMPORTANT]
> Order findings by severity (Error > Warning > Info).
* **[Severity] Location: `src/main.rs:L12` - [Finding Title]**
* **Description**: [Why is this an issue? Which Rust best practice is violated?]
* **Recommendation**:
```rust
// Idiomatic Rust example demonstrating the fix
```
## 3. Top 3 Recommendations
1. [First actionable improvement]
2. [Second actionable improvement]
3. [Third actionable improvement]
# Rust Implementation / Refactoring Summary
## 1. Overview of Changes
[Briefly summarize what Rust modules, structs, or traits were added or refactored]
## 2. Applied Design Patterns & Best Practices
* [e.g., Applied the Typestate Pattern to ensure state safety]
* [e.g., Replaced `.clone()` with `&str` for performance gains]
## 3. Local Verification Results
- [x] `cargo check` passed
- [x] `cargo clippy` passed with zero warnings
- [x] `cargo fmt` completed successfully
## 4. Next Steps
1. [Recommended next action, e.g., run cargo test]
2. [Other relevant suggestions]
Alternatives
alirezarezvani/claude-skills
Terraform infrastructure-as-code agent skill and plugin for Claude Code, Codex, Gemini CLI, Cursor, OpenClaw. Covers module design patterns, state management strategies, provider configuration, security hardening, policy-as-code with Sentinel/OPA, and CI/CD plan/apply workflows. Use when: user wants to design Terraform modules, manage state backends, review Terraform security, implement multi-region deployments, or follow IaC best practices.
ruvnet/RuView
Comprehensive GitHub code review with AI-powered swarm coordination
dotnet/skills
Grades a specified set of test methods individually and produces a concise table mapping each test (fully-qualified name) to a letter grade (A–F), a score band, and a one-line note — designed to be posted as a PR comment. Use when the caller wants per-test feedback on a curated list of methods (for example, the new or modified tests in a pull request), not a suite-wide audit. Polyglot: .NET, Python, TS/JS, Java, Go, Ruby, Rust, Swift, Kotlin, PowerShell, C++. Input is a list of test methods (or
ruvnet/ruflo
Comprehensive GitHub code review with AI-powered swarm coordination