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.zip

Installs 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.
101 chars✓ has a “when” trigger
Beginner

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

You give it
Rust project code
You get back
Clippy warnings treated as errors or a success exit code

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.

  1. Check Cargo.toml for the current MuJoCo version (look for +mj-X.Y.Z in the package version). Then find the matching mujoco-X.Y.Z/ directory at the repository root.

  2. Run clippy (replace X.Y.Z with 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
  1. Verify the exit code is 0 (success). Fix any warnings before considering the work done.

[!NOTE]

  • --all-targets checks lib, tests, examples, and benches.
  • -D warnings treats all warnings as errors so nothing is silently ignored.
  • --features renderer enables 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 (see coding-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.

SkillInstallsUpdatedSafetyDifficulty
clippy (this skill)02moReviewBeginner
debug-cli18moReviewIntermediate
fix-clippy36moNo flagsBeginner
handling-rust-errors42moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry