Linting tool for Rust projects using cargo clippy.
Install
mkdir -p .claude/skills/clippy-davidhozic && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12351" && unzip -o skill.zip -d .claude/skills/clippy-davidhozic && rm skill.zipInstalls to .claude/skills/clippy-davidhozic
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Run cargo clippy for Rust linting. Use this when asked to lint the code or check for common mistakes.Key capabilities
- →Catch common Rust mistakes
- →Identify style issues in Rust code
- →Detect potential bugs in Rust projects
- →Treat all warnings as errors
- →Enable specific features like renderer
How it works
The skill executes `cargo clippy` across all project targets, treating warnings as errors to enforce strict code quality.
Inputs & outputs
When to use clippy
- →Lint Rust code
- →Check for common Rust mistakes
- →Validate project style
About this skill
Running Clippy
Run cargo clippy to catch common Rust mistakes, style issues, and potential bugs.
-
Check
Cargo.tomlfor the current MuJoCo version (look for+mj-X.Y.Zin the package version). Then find the matchingmujoco-X.Y.Z/directory at the repository root. -
Run clippy (replace
X.Y.Zwith the version found in step 1):
export MUJOCO_DYNAMIC_LINK_DIR=$(realpath mujoco-X.Y.Z/lib) && export LD_LIBRARY_PATH=$(realpath mujoco-X.Y.Z/lib/) && cargo clippy --all-targets --features renderer -- -D warnings 2>&1
- Verify the exit code is 0 (success). Fix any warnings before considering the work done.
[!NOTE]
--all-targetschecks lib, tests, examples, and benches.-D warningstreats all warnings as errors so nothing is silently ignored.--features rendererenables the renderer feature; adjust if working on viewer code (e.g.--features "renderer viewer-ui").- Do NOT fix integer truncation casts (e.g.
usize as i32) when the C API validates or clamps the value (seecoding-conventions.md).- Do NOT suppress clippy lints with
#[allow(...)]without a justifying comment.- To check a single file:
cargo clippy --lib --features renderer -- -D warnings.- To auto-fix simple lints:
cargo clippy --fix --allow-dirty --features renderer.
When not to use it
- →When fixing integer truncation casts validated by the C API
- →When suppressing clippy lints without a justifying comment
Limitations
- →Requires manual adjustment for viewer code features
- →Does not automatically fix all lints without the `--fix` flag
How it compares
This workflow automates the linting process with specific configurations, unlike manually running clippy or ignoring warnings.
Compared to similar skills
clippy side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| clippy (this skill) | 0 | 2mo | Review | Beginner |
| debug-cli | 1 | 8mo | Review | Intermediate |
| fix-clippy | 3 | 6mo | No flags | Beginner |
| handling-rust-errors | 4 | 2mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
debug-cli
antinomyhq
Use when users need to debug, modify, or extend the code-forge application's CLI commands, argument parsing, or CLI behavior. This includes adding new commands, fixing CLI bugs, updating command options, or troubleshooting CLI-related issues.
fix-clippy
quickwit-oss
Fix all clippy lint warnings in the project
handling-rust-errors
hashintel
HASH error handling patterns using error-stack crate. Use when working with Result types, Report types, defining custom errors, propagating errors with change_context, adding context with attach, implementing Error trait, or documenting error conditions in Rust code.
search-code
JamieMason
Search for code patterns in Syncpack. Use when finding symbols, implementations, or understanding how code is used. Covers ast-grep for Rust and grep/rg for other cases.
m01-ownership
actionbook
CRITICAL: Use for ownership/borrow/lifetime issues. Triggers: E0382, E0597, E0506, E0507, E0515, E0716, E0106, value moved, borrowed value does not live long enough, cannot move out of, use of moved value, ownership, borrow, lifetime, 'a, 'static, move, clone, Copy, 所有权, 借用, 生命周期
m03-mutability
actionbook
CRITICAL: Use for mutability issues. Triggers: E0596, E0499, E0502, cannot borrow as mutable, already borrowed as immutable, mut, &mut, interior mutability, Cell, RefCell, Mutex, RwLock, 可变性, 内部可变性, 借用冲突