@davidhozic/clippy
BRun cargo clippy for Rust linting. Use this when asked to lint the code or check for common mistakes.
Install
agr install @davidhozic/clippy --target claudeWrites 1 file into .claude/skills/, pinned to git-a8174619.
- .claude/skills/clippy/SKILL.md
Document
name: clippy description: Run cargo clippy for Rust linting. Use this when asked to lint the code or check for common mistakes.
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.
Trustgrade B
- passBody integrity
Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.
- passType matchnot applicable to this artifact type
Whether the artifact is really the kind of thing its metadata claims it is.
- passFreshness
How long since the source repository was last pushed to.
- passPrompt injection
Scans the artifact's own text for instructions aimed at your agent rather than at you.
- warnLicenseno SPDX license detected
Whether the source repository declares an SPDX license permissive enough to redistribute.
How the grade is calculated
Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:
- Aevery check passed
- Bone warning
- Ctwo warnings
- Dprompt injection or body integrity failed, or three warnings
- Fone of those failed, and something else is wrong
These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.
Versions
git-a8174619f4e22026-07-31