rust-lint
Rust code quality check - Use Clippy and Rustfmt to ensure Rust code standards and performance optimization
Best use case
rust-lint is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Rust code quality check - Use Clippy and Rustfmt to ensure Rust code standards and performance optimization
Teams using rust-lint should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/rust-lint/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How rust-lint Compares
| Feature / Agent | rust-lint | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Rust code quality check - Use Clippy and Rustfmt to ensure Rust code standards and performance optimization
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# Rust Lint Skill
## 📋 Overview
Use Rust official toolchain to check code quality:
- **Clippy**: Smart code checks (450+ rules)
- **Rustfmt**: Code formatting
## 🔧 Prerequisites
| Tool | Min Version | Installation |
|------|-------------|--------------|
| Rust | 1.70+ | `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \| sh` |
| Clippy | - | `rustup component add clippy` |
| Rustfmt | - | `rustup component add rustfmt` |
## 🚀 Usage
**Run Clippy:**
```bash
.\.agent\skills\rust-lint\scripts\lint.ps1
```
**Auto-fix:**
```bash
.\.agent\skills\rust-lint\scripts\lint.ps1 -Fix
```
**Format code:**
```bash
.\.agent\skills\rust-lint\scripts\format.ps1
```
## 🎯 What It Checks
### Performance Optimization
- ✅ Avoid unnecessary clones
- ✅ Use iterators instead of loops
- ✅ String handling optimization
- ✅ Collection operation efficiency
### Security
- ✅ Unused unsafe code
- ✅ Integer overflow detection
- ✅ Null pointer dereference
- ✅ Lifetime issues
### Idiomatic Rust
- ✅ Pattern matching recommendations
- ✅ Option/Result usage
- ✅ Error handling best practices
- ✅ Trait implementation suggestions
## 📊 Output Example
```
🦀 Rust Lint - Checking project...
warning: unnecessary use of `clone`
--> src/main.rs:15:18
|
15 | let data = items.clone();
| ^^^^^^^^ help: remove this
|
= note: `#[warn(clippy::unnecessary_clone)]` on by default
error: indexing may panic
--> src/lib.rs:42:13
|
42 | let x = arr[5];
| ^^^^^^
|
= help: consider using `.get()` or `.get_mut()`
📊 Results:
❌ Errors: 1
⚠️ Warnings: 3
```
## ⚙️ Configuration
Create `clippy.toml`:
```toml
cognitive-complexity-threshold = 30
too-many-arguments-threshold = 8
disallowed-methods = [
"std::env::set_var", # Unsafe environment variable setting
]
# Allowed lints
allow = [
"clippy::module_name_repetitions",
]
# Warning level lints
warn = [
"clippy::pedantic",
"clippy::nursery",
]
# Denied lints
deny = [
"clippy::unwrap_used",
"clippy::expect_used",
]
```
Create `rustfmt.toml`:
```toml
max_width = 100
indent_style = "Block"
use_small_heuristics = "Default"
imports_granularity = "Crate"
```
## 🔗 Related Resources
- [Clippy Lints List](https://rust-lang.github.io/rust-clippy/master/)
- [Rustfmt Configuration](https://rust-lang.github.io/rustfmt/)Related Skills
sql-lint
SQL code style check - Use SQLFluff to check SQL statement style and syntax (supports PostgreSQL, MySQL, SQLite, etc.)
lint-python
Check Python code quality with Ruff
lint-js
Check JavaScript/TypeScript code quality with ESLint
k8s-lint
Kubernetes YAML validation - Use kube-linter and kubeconform to check K8s config security and best practices
docker-lint
Dockerfile best practices check - Use hadolint to validate Dockerfile security, performance, and compliance
ai-agent-lint
AI Agent code quality check - Use Ruff to check code standards for LangChain, AutoGen, and other AI Agent projects
vuln-scan
Multi-language dependency security scan - Use Safety CLI and OSV-Scanner to quickly detect dependency vulnerabilities in Python/JS/Java projects
SKILL_ONBOARDING.md
> **Purpose**: Conduct a one-time "Handshake Interview" with the user to establish their Developer Persona.
usb-debug
No description provided.
serial-debug
No description provided.
security-check
Check dependency security vulnerabilities
run-tests
Run project test suite