Skip to main content
skill CX Codex

clippy-advanced — Claude Code skill: what it does, how to install

clippy-advanced guides Clippy setup for Rust projects: custom lints, clippy.toml thresholds, suppression rules, and CI check commands.

MIT 107 installs ★ 60 updated 2026-11-16

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add laurigates/claude-plugins --skill clippy-advanced -a claude-code
Open on GitHub

What clippy-advanced does

This skill supplies the coding assistant with structured patterns for configuring Rust's Clippy linter. It organizes checks across standard groups — including correctness, perf, pedantic, restriction, and nursery — and sets up [workspace.lints.clippy] entries in Cargo.toml.

It covers clippy.toml options such as thresholds for cognitive complexity, line counts, and argument limits, alongside method denial rules for calls like std::env::var or std::process::exit. Running the resulting checks locally requires the Clippy component installed via rustup component add clippy.

Gating builds on -D warnings in CI requires pinning the Rust toolchain, because toolchain bumps introduce new lints that halt builds unexpectedly.

What it helps with

  • configure Clippy lint categories inside Cargo.toml
  • set code complexity limits and disallowed methods via clippy.toml
  • apply module-level or item-level lint suppression attributes
  • prepare cargo clippy commands tailored for CI workflows

Example prompts for the agent

  • Configure pedantic Clippy lints for my Rust workspace in Cargo.toml
  • Create a clippy.toml file that restricts cognitive complexity and bans raw exit calls
  • Give me the cargo clippy invocation for strict CI checks across all workspace targets

How to install clippy-advanced

1Skills CLI (Vercel)

npx skills add laurigates/claude-plugins --skill clippy-advanced -a claude-code

2Manually: put the files in place

~/.claude/skills/clippy-advanced/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/clippy-advanced/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about clippy-advanced

How to install clippy-advanced in Claude Code?

Run npx skills add laurigates/claude-plugins --skill clippy-advanced -a claude-code. The skill definition will be placed at ~/.claude/skills/clippy-advanced/SKILL.md.

What does the clippy-advanced skill do?

It gives your assistant reference configurations and guidelines for setting up Clippy rules, creating clippy.toml, and executing lint runs across Rust projects.

What system dependency is required to run Clippy?

You need the Clippy component added to your active Rust toolchain via rustup component add clippy.

Source text

SKILL.md · MIT
---
created: 2025-12-16
modified: 2026-11-14
reviewed: 2025-12-16
name: clippy-advanced
description: "Advanced Clippy configuration for Rust — custom rules, pedantic/nursery lints, clippy.toml, IDE and CI integration. Use when configuring or enforcing lint standards."
user-invocable: false
allowed-tools: Bash(cargo clippy *), Read, Grep, Glob
---

# clippy-advanced - Advanced Clippy Configuration

Advanced Clippy configuration for comprehensive Rust linting, including custom rules, lint categories, disallowed methods, and IDE integration.

## When to Use This Skill

| Use this skill when... | Use another tool instead when... |
|------------------------|----------------------------------|
| Configuring Clippy lint rules | Formatting code (use rustfmt) |
| Setting up CI linting for Rust | Building/compiling (use cargo build) |
| Customizing clippy.toml | Running tests (use cargo test) |
| Enforcing code standards | Managing dependencies (use cargo add) |

## Installation

```bash
# Clippy is included with rustup
rustup component add clippy

# Verify installation
cargo clippy --version

# Update clippy with rust toolchain
rustup update
```

## Basic Usage

```bash
# Run clippy on current project
cargo clippy

# Run on all targets (lib, bins, tests, examples, benches)
cargo clippy --all-targets

# Run with all features enabled
cargo clippy --all-features

# Run on workspace
cargo clippy --workspace --all-targets --all-features

# Show detailed lint explanations
cargo clippy -- -W clippy::all -A clippy::pedantic

# Treat warnings as errors
cargo clippy -- -D warnings
```

## Lint Categories

| Category | Purpose | Default |
|----------|---------|---------|
| `clippy::correctness` | Likely bugs | Deny |
| `clippy::complexity` | Overly complex code | Warn |
| `clippy::perf` | Performance issues | Warn |
| `clippy::style` | Code style | Warn |
| `clippy::suspicious` | Code that looks wrong | Warn |
| `clippy::pedantic` | Opinionated style | Off |
| `clippy::restriction` | Opt-in constraints | Off |
| `clippy::nursery` | Experimental | Off |
| `clippy::cargo` | Cargo.toml issues | Off |

### Recommended Cargo.toml Configuration

```toml
[workspace.lints.clippy]
# Deny correctness issues (likely bugs)
correctness = "deny"
complexity = "warn"
perf = "warn"
style = "warn"
suspicious = "warn"

# Enable pedantic but allow some noisy lints
pedantic = "warn"
must_use_candidate = "allow"
missing_errors_doc = "allow"

# Enable some restriction lints selectively
clone_on_ref_ptr = "warn"
dbg_macro = "warn"
print_stdout = "warn"
todo = "warn"
unimplemented = "warn"
unwrap_used = "warn"

# Enable nursery lints (experimental)
use_self = "warn"
```

## clippy.toml Essential Settings

Create `clippy.toml` in project root for thresholds and disallowed items:

```toml
cognitive-complexity-threshold = 15
too-many-lines-threshold = 100
too-many-arguments-threshold = 5

disallowed-methods = [
  { path = "std::env::var", reason = "Use std::env::var_os for better Unicode handling" },
  { path = "std::process::exit", reason = "Use Result propagation instead" },
]

disallowed-names = ["foo", "bar", "baz"]
```

## Lint Suppression

```rust
// Function-level
#[allow(clippy::too_many_arguments)]
fn complex_function(a: i32, b: i32, c: i32, d: i32, e: i32, f: i32) {}

// Module-level (src/lib.rs)
#![warn(clippy::all)]
#![warn(clippy::pedantic)]
#![deny(clippy::unwrap_used)]
#![allow(clippy::module_name_repetitions)]

// Inline
#[allow(clippy::cast_possible_truncation)]
let x = value as u8;
```

## Agentic Optimizations

| Context | Command |
|---------|---------|
| CI strict | `cargo clippy --workspace --all-targets -- -D warnings` |
| JSON output | `cargo clippy --message-format=json` |
| Compact errors | `cargo clippy --message-format=short` |
| Quick check | `cargo clippy --message-format=short -- -D warnings` |
| Pedantic check | `cargo clippy -- -W clippy::pedantic -D clippy::correctness` |

## Quick Reference

### Command-Line Flags

| Flag | Description |
|------|-------------|
| `--all-targets` | Check lib, bins, tests, examples, benches |
| `--all-features` | Enable all features |
| `--workspace` | Check entire workspace |
| `--message-format=json` | JSON output for tooling |
| `--message-format=short` | Compact error format |
| `-- -D warnings` | Treat warnings as errors |
| `-- -W clippy::pedantic` | Enable pedantic lints |
| `-- -A clippy::lint_name` | Allow specific lint |

### Lint Levels

| Level | Attribute | Effect |
|-------|-----------|--------|
| Allow | `#[allow(...)]` | Suppress lint |
| Warn | `#[warn(...)]` | Show warning |
| Deny | `#[deny(...)]` | Compile error |

## References

- [Clippy documentation](https://doc.rust-lang.org/clippy/)
- [Lint list](https://rust-lang.github.io/rust-clippy/master/)
- [Configuration options](https://doc.rust-lang.org/clippy/configuration.html)
- [rust-analyzer integration](https://rust-analyzer.github.io/manual.html)

For detailed configuration examples, CI integration, IDE setup, and best practices, see [REFERENCE.md](REFERENCE.md). A CI job that gates on `-D warnings` needs a pinned compiler: [REFERENCE.md § Pin the toolchain](REFERENCE.md#pin-the-toolchain).

© laurigates · MIT · laurigates/claude-plugins

Similar skills

All skills for Code review and refactoring →

From the same set27

The whole set →
git-commit-workflow The git-commit-workflow Claude Code skill defines commit-message and staging rules. It helps split related edits into focused commits and review staged changes. CX Codex +1 161installs binary-analysis binary-analysis guides your coding agent in inspecting unknown binaries, running hex dumps, and extracting embedded artifacts. CX Codex +1 146installs shell-expert shell-expert is a Claude Code skill for writing Bash, zsh, and POSIX scripts and composing command-line automation. It activates for shell pipelines and portable scripting tasks. CX Codex +1 141installs rust-development A Rust development skill covering Cargo, ownership, async code, and Tokio. It fits coding tasks that mention Rust or its core tooling. CX Codex +1 108installs playwright-testing The playwright-testing skill guides Playwright E2E work for web apps, including browser coverage, mobile viewports, API checks, and visual snapshots. CX Codex +1 106installs api-testing api-testing — a skill for writing REST and GraphQL API tests with Supertest (TypeScript) and httpx/pytest (Python). Validates status codes, response schemas, auth flows, and error handling. CX Codex +1 106installs cargo-nextest This Claude Code skill runs and filters Rust tests with cargo-nextest. It comes into play for test runs, CI setup, and investigations into slow or flaky tests. CX Codex +1 101installs bevy-game-engine bevy-game-engine guides AI coding assistants through building Rust games with Bevy, covering ECS setup, rendering, input, and assets. CX Codex +1 3installs

Project sponsors

Companies that keep this analytics open