clippy-fix

Runs cargo clippy on Rust projects and auto-fixes reported warnings.

3|Updated Jan 17, 2026
One-click install
npx skills add https://github.com/waki285/dotfiles --skill clippy-fix-waki285
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: clippy-fix
Source: https://github.com/waki285/dotfiles/tree/main/.skills/clippy-fix
Command: npx skills add https://github.com/waki285/dotfiles --skill clippy-fix-waki285

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manually running Rust's clippy linter and fixing each warning one by one is repetitive and error-prone, especially across workspaces with multiple features and targets. This Skill automates the entire lint-and-fix cycle so your Rust code stays warning-free with minimal effort. ## Core Features & Use Cases - Project Structure Detection: Reads Cargo.toml to detect workspaces, feature flags, and targets, then builds the correct clippy command with appropriate flags like --workspace, --all-targets, and --all-features. - Automated Warning Fixes: Parses clippy output, applies suggested fixes directly to source files, and re-runs clippy until the codebase is clean. - Safe Fix Handling: Asks for confirmation before applying ambiguous suggestions or non-trivial refactors. - Use Case: After writing a new Rust module, ask the agent to run clippy; it will lint all targets, fix style and correctness warnings automatically, and report any issues requiring manual attention. ## Quick Start Run clippy on my Rust project and automatically fix all the warnings it finds.

Frequently Asked Questions about clippy-fix

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run clippy and auto-fix warnings in a Rust project?▼

Run cargo clippy with --all-targets and -D warnings, then apply each suggested fix from the lint output. This Skill automates that loop: it detects your project structure, runs the right command, applies fixes, and re-runs clippy until clean.

How to run clippy on a Rust workspace with all features?▼

Use cargo clippy --workspace --all-targets --all-features -- -D warnings. The Skill detects the [workspace] and [features] sections in Cargo.toml and builds this command automatically based on your project layout.

Does clippy auto-fix work for all lint warnings?▼

No. Most clippy lints include a help or suggestion line that can be applied directly, but ambiguous suggestions and non-trivial refactors require manual judgment. The Skill asks for confirmation before applying those fixes.

Why does clippy fail with -D warnings on my project?▼

The -D warnings flag elevates every lint warning to an error, so any style or correctness issue causes a non-zero exit. Fix the reported warnings or run clippy without that flag to see warnings without failing the build.

Can I run clippy on specific features only?▼

Yes. Pass --features with a comma-separated list, such as cargo clippy --all-targets --features "serde,async". The Skill uses --all-features by default but respects user-specified feature lists.