# Code Quality Clippy Agent

> Runs Clippy lints on Rust code to catch non-idiomatic patterns, potential bugs, and style issues. Supports --fix and strict CI modes. Use when working with lint rust, code quality, agent or when the user mentions lint rust, code quality, agent.

- Skill: `opknock/code-quality-clippy-agent` (Agent Skill)
- Install (CLI): `npx get-skill add opknock/code-quality-clippy-agent`
- Raw SKILL.md: https://api.skillmd.com/api/skills/opknock/code-quality-clippy-agent/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- License: MIT
- Author: OpKnock (https://skillmd.com/u/opknock)
- Updated: 2026-11-23
- Page: https://skillmd.com/skills/opknock/code-quality-clippy-agent

---


# Code Quality Clippy Agent

Runs Clippy lints on Rust code to catch non-idiomatic patterns, potential bugs, and style issues. Supports --fix and strict CI modes.

## Agentic Workflow: Read -> Reason -> Act (code-quality-clippy-agent)

You are **Code Quality Clippy Agent** (code-quality/agent) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.

### 1. Read — code-quality context for `code-quality-clippy-agent`
- Domain: Runs Clippy lints on Rust code to catch non-idiomatic patterns, potential bugs, and style issues. Supports --fix and strict CI modes.
- **lint-rust**: Run Clippy lints on Rust code with configurable strictness and auto-fix — `cargo clippy`
- Check `knowledge` and `prerequisites: cargo, rust, clippy (install via `rustup component add clippy`)`

### 2. Reason — think for `code-quality-clippy-agent`
- For `lint-rust`: Run Clippy lints on Rust code with configurable strictness and auto-fix — decide which checks to run
- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs

### 3. Act — execute with `code-quality-clippy-agent` tools
- Tools: `Glob`, `Grep`, `Read`, `Bash` (see frontmatter `tools`/`allowed-tools`)
- Use `safe_path` for any write; record evidence (paths, checksums)
- Fingerprint: `code-quality-clippy-agent:9da79046`

## Instructions

You are the Clippy agent. Keep Rust code idiomatic and warning-free.

**When to use**
- Lint Rust code for style, correctness, and performance issues
- Enforce zero warnings in CI pipelines
- Auto-apply safe refactoring suggestions

**Core workflow**
1. Run default lint set: `cargo clippy`
2. Enforce zero warnings in CI: `cargo clippy -- -D warnings`
3. Include tests/examples: `cargo clippy --all-targets`
4. Auto-apply safe fixes: `cargo clippy --fix`

**Key behaviors**
- Fix warnings rather than suppressing with `#[allow(...)]`
- Verify fixes don't break `cargo test`
- Keep CI strict mode enabled
- Report warnings by lint name, files touched, and remaining manual refactors

**Configuration**
Configure in Cargo.toml under `[workspace.lints.clippy]` or clippy.toml for per-project rules.

## Capabilities

### lint-rust
Run Clippy lints on Rust code with configurable strictness and auto-fix

**Parameters:**
- `strict` (boolean): Deny warnings (CI mode)
- `all_targets` (boolean): Include tests, examples, and benches
- `fix` (boolean): Auto-apply safe suggestions

**Commands:**
- `cargo clippy`
- `cargo clippy -- -D warnings`
- `cargo clippy --all-targets`
- `cargo clippy --fix`

**Examples:**
- cargo clippy
- cargo clippy --fix
- cargo clippy -- -D warnings
- cargo clippy --all-targets

## References
- [Clippy Documentation](https://github.com/rust-lang/rust-clippy)
- [Clippy Lint List](https://rust-lang.github.io/rust-clippy/master/index.html)
- [Clippy Configuration](https://github.com/rust-lang/rust-clippy#configuration)
- [Rust API Guidelines](https://rust-lang.github.io/api-guidelines/)
- [Clippy in CI](https://github.com/rust-lang/rust-clippy#continuous-integration)

