Agent skill

Rust Clippy Triage

by rocky-data in rocky-data/rocky

Playbook for when cargo clippy -- -D warnings fires in the Rocky engine.

Apache-2.0Auto-check passedDevelopment

Install Rust Clippy Triage

skills CLI
$ npx skills add rocky-data/rocky --skill rust-clippy-triage -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install rocky-data/rocky rust-clippy-triage --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/rocky-data/rocky.git skills-src && mkdir -p .claude/skills && cp -r skills-src/engine/.claude/skills/rust-clippy-triage .claude/skills/rust-clippy-triage && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
rust-clippy-triage
GitHub stars
304
Token cost
~1.8k tokens
SKILL.md length
780 words
Files
1
Skills in repo
22
Repo updated
First seen
Licence
Apache-2.0

At a glance

Playbook for when cargo clippy -- -D warnings fires in the Rocky engine.

  • Works in 5 steps: Read the lint name and the message → Does the fix make the code better? → Is the fix wrong for your case? → …
  • Triaging a new clippy failure
  • SKILL.md covers The CI rule, When CI goes red — triage order, Local iteration loop and Formatter gotcha, plus 1 more section
  • Calls cargo

What it does

Rust Clippy Triage is an agent skill from rocky-data/rocky. Playbook for when cargo clippy -- -D warnings fires in the Rocky engine. Use when triaging a new clippy failure, deciding between fix/allow/refactor, choosing where to put [allow(...)], or thinking about adding a workspace-level lints table.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Linting and formatting. It works with Rust. The repository describes itself as: A SQL transformation engine that type-checks your whole pipeline and catches breaking changes before they run — branches, replay, column-level lineage, compile-time contracts… The licence is Apache-2.0.

When your agent uses it

  • Triaging a new clippy failure
  • Deciding between fix/allow/refactor
  • Choosing where to put [allow(...)]
  • Thinking about adding a workspace-level lints table

Example prompts

  • “/rust-clippy-triage”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Read the lint name and the message
  2. Does the fix make the code better?
  3. Is the fix wrong for your case?
  4. The lint is consistently wrong for Rocky
  5. The lint fires in generated code

What it can do on your machine

Read from SKILL.md and the folder at commit 46be77e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • cargo

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • rust-lang.github.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Rust Clippy Triage loads about 1.8k tokens when it runs. Until then it costs about 66 tokens; SKILL.md has 780 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~66
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from rocky-data/rocky at commit 46be77e, republished under its Apache-2.0 licence (© rocky-data). 780 words, ~1,789 tokens.

Download SKILL.mdSave it as .claude/skills/rust-clippy-triage/SKILL.md (or your agent's skills folder).
name
rust-clippy-triage
description
Playbook for when `cargo clippy -- -D warnings` fires in the Rocky engine. Use when triaging a new clippy failure, deciding between fix/allow/refactor, choosing where to put `#[allow(...)]`, or thinking about adding a workspace-level lints table.

Clippy triage for the Rocky engine

The CI rule

.github/workflows/engine-ci.yml runs:

cargo clippy --all-targets --all-features -- -D warnings

That means any clippy warning in any target (lib, bin, tests, examples, benches), across all feature combinations, fails CI. Baseline lint policy lives in a [workspace.lints.clippy] table in engine/Cargo.toml — correctness = "deny" plus a few warn-level lints (needless_pass_by_value, redundant_closure_for_method_calls, cloned_instead_of_copied, large_enum_variant). engine/clippy.toml holds only lints that need configuration DATA rather than a level — today a single disallowed-methods entry routing test code away from a bare Cli::try_parse_from (it overflows the 2 MB test-thread stack and aborts the test binary; parse through try_parse_with_big_stack in main.rs). Put lint levels in the Cargo.toml table, not there. The policy is "correctness is a hard error; zero warnings overall."

When CI goes red — triage order

When clippy fires, work through this in order. Don't jump to step 4.

1. Read the lint name and the message

Clippy output starts with the lint name, e.g. warning: this could be a match`` followed by [#[warn(clippy::single_match)]]. That name is load-bearing — it tells you which lint group, what the fix usually looks like, and what docs to read. The full docs are at https://rust-lang.github.io/rust-clippy/master/#/<lint_name>.

2. Does the fix make the code better?

Most clippy lints are genuinely useful. If the suggested fix makes the code clearer or shorter, just take it — that's the default path for the vast majority of triage.

Common "just fix it" lints in Rocky-shaped code:

  • clippy::redundant_clone — remove the .clone()
  • clippy::needless_borrow — remove the &
  • clippy::needless_collect — drop the .collect::<Vec<_>>() before the iterator consumer
  • clippy::let_and_return — return directly
  • clippy::single_match → if let
  • clippy::or_fun_call → .unwrap_or_else(|| …) for side-effecting defaults
  • clippy::unnecessary_wraps — return T instead of Option<T> / Result<T, _>
3. Is the fix wrong for your case?

Sometimes clippy is wrong for a specific call site. Classic examples:

  • clippy::needless_pass_by_value on a function that's part of an #[async_trait] trait impl — the ownership is load-bearing for the trait signature.
  • clippy::too_many_arguments on a function whose arguments are all required config. The right response is usually a newtype (see rust-style), not #[allow].
  • clippy::large_enum_variant on a SQL AST enum — splitting the large variant behind Box would pessimise hot-path matching. Box the variant or allow, with a reason.
  • clippy::await_holding_lock when the lock is a tokio::sync::Mutex (it's cancel-safe and designed for this). Clippy can't always tell std::sync::Mutex from tokio::sync::Mutex by type name — check which one is actually held.

In those cases, allow at the tightest scope with a reason = "…":

rust
// DO — allow at the function, with a reason clippy-watchers can evaluate
#[allow(
    clippy::too_many_arguments,
    reason = "all args are required config and a struct-wrapper hurts call-site readability"
)]
pub fn build_plan(
    catalog: &str,
    schema: &str,
    table: &str,
    strategy: MaterializationStrategy,
    watermark: Option<Instant>,
    // ...
) -> Plan { ... }
  • Scope the #[allow] to the function or block, never the crate or the module, unless the lint is a categorical mismatch (see step 4).
  • Always include reason = "..." — an unexplained #[allow] is a future maintenance trap.
  • Never #[allow(clippy::all)] or #[allow(warnings)].
Show full SKILL.md (356 more words)Show less
4. The lint is consistently wrong for Rocky

If the same lint keeps getting #[allow]'d across the workspace with the same reason, that's the signal to adjust the workspace-level policy in the existing [workspace.lints.clippy] table in engine/Cargo.toml (currently correctness = "deny" + a few warn-level style/perf lints) instead of sprinkling per-site allows:

toml
[workspace.lints.clippy]
correctness = { level = "deny", priority = -1 }
needless_pass_by_value = "warn"
# tune a lint here rather than repeating a per-site #[allow]

Rules:

  • Changing [workspace.lints] is a policy change, not a fix — propose it to Hugo first. Widening (e.g. demoting a lint to allow) affects every crate.
  • Each entry needs a comment explaining why, with at least one example that triggered it.
  • Crate-specific lint policy goes in that crate's Cargo.toml under [lints], not in [workspace.lints] — workspace-level is for rules that apply to every crate.
5. The lint fires in generated code

rocky-cli/src/output.rs derives JsonSchema, Serialize, Deserialize on a lot of types. Clippy sometimes fires on the expansion of those derives. If you can't silence it at source, you have two choices:

  • Put the #[allow(...)] on the derived type definition (clippy usually honors this).
  • Adjust the struct shape so the derive doesn't emit the problem in the first place.

Never silence lints globally just because generated code trips them in one place — that hides real issues elsewhere.

Local iteration loop

bash
# From inside engine/:
cargo clippy --all-targets                 # see warnings without -D (fast iterate)
cargo clippy --all-targets --all-features -- -D warnings  # same command CI runs
cargo clippy -p rocky-core --all-targets   # scope to one crate while iterating
cargo clippy --fix --allow-dirty           # auto-apply safe suggestions (review the diff!)

--fix is safe for most lints but always review the diff before committing — it will happily change semantics for lints like clippy::collapsible_if. Don't run it on a dirty working tree without committing your in-progress work first.

Formatter gotcha

rustfmt runs independently of clippy. CI has:

cargo fmt -- --check

…which fails CI just as reliably as clippy does. Before pushing, always run:

bash
cargo fmt && cargo clippy --all-targets --all-features -- -D warnings

cargo fmt has no per-file config in Rocky — it uses the default rustfmt.toml behavior. Don't introduce a rustfmt.toml without Hugo review for the same reason as [workspace.lints]: it's a policy change.

  • rust-style — the reason a lint fires is often that the code isn't following Rocky style; fix the style, not the lint.
  • rust-error-handling — the clippy::result_large_err lint fires if a Result<T, E> has a large E; the fix is usually boxing the error variant, not allowing the lint.
  • rust-dep-hygiene — when clippy complains about a deprecated API from a dependency, sometimes the right fix is a dep bump, not an allow.

© rocky-data, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in engine/.claude/skills/rust-clippy-triage of rocky-data/rocky.

Open the folder on GitHubat commit 46be77e

Compare with similar skills

Rust Clippy Triage next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Rust Clippy Triage compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Rust Clippy Triage this skillrocky-data/rocky304—~1.8kAutomated safety check: PassApache-2.0
Rust Best Practicesfarm-fe/farm5.6k3 repos~1.1kAutomated safety check: PassMIT
Doc Commentsbiomejs/biome26k—~3kAutomated safety check: PassApache-2.0
Rust Hygiene Audittsz-org/tsz577—~1.5kAutomated safety check: PassApache-2.0
Releasexin2017338/lynx-proxy502—~1.1kAutomated safety check: PassMIT
Flowmark Markdown Formatterjlevy/repren374—~631Automated safety check: PassMIT

Similar skills

  • Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook.

    5.6k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Doc Comments

    biomejs/biome

    Official

    A skill your agent uses whenever writing or editing Rust //, ///, or //!

    26k GitHub stars~3k tokensUpdated today
    DevelopmentAuto-check passed
  • Run a deep DRY + code-hygiene audit of the Rust workspace and turn the findings into verified, deduplicated, hierarchical GitHub tech-debt issues.

    577 GitHub stars~1.5k tokensUpdated 29 days ago
    DevelopmentAuto-check passed
  • Release

    xin2017338/lynx-proxy

    Publish a new release version of Lynx Proxy. An agent skill from xin2017338/lynx-proxy.

    502 GitHub stars~1.1k tokensUpdated 23 days ago
    DevelopmentAuto-check passed
  • Formats Markdown with the Flowmark auto-formatter for typographic cleanup and semantic line breaks, and helps adopt it across a repository.

    374 GitHub stars~631 tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Rsigma

    timescale/rsigma

    Use the rsigma CLI and MCP server: engine eval, engine daemon, rule lint, rule draft, rule tune, rule backtest, backend convert, mcp serve.

    159 GitHub stars~1.2k tokensUpdated 2 days ago
    DevelopmentAuto-check passed

More from rocky-data/rocky

All 22 skills in this repo
  • Fivetran

    rocky-data/rocky

    Fivetran REST API reference for Rocky's source adapter. An agent skill from rocky-data/rocky.

    304 GitHub stars~914 tokensUpdated today
    Auto-check passed
  • Databricks

    rocky-data/rocky

    Databricks REST API and SQL reference for Rocky's warehouse adapter.

    304 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Rocky Codegen

    rocky-data/rocky

    Rocky CLI JSON-output schema cascade. An agent skill from rocky-data/rocky.

    304 GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Rocky Dev

    rocky-data/rocky

    Top-level router for Rocky development tasks. An agent skill from rocky-data/rocky.

    304 GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Rocky Dsl Change

    rocky-data/rocky

    Rocky DSL (.rocky file) cross-subproject cascade. An agent skill from rocky-data/rocky.

    304 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Rocky New Adapter

    rocky-data/rocky

    Adding a new warehouse or source adapter crate to the Rocky engine.

    304 GitHub stars~2k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Rust Clippy Triage

What does Rust Clippy Triage do?

Playbook for when cargo clippy -- -D warnings fires in the Rocky engine. Rust Clippy Triage is an agent skill from rocky-data/rocky. Playbook for when cargo clippy -- -D warnings fires in the Rocky engine.

When should I use Rust Clippy Triage?

Rust Clippy Triage fits situations like: triaging a new clippy failure; deciding between fix/allow/refactor; choosing where to put [allow(...)]; thinking about adding a workspace-level lints table.

How do I install Rust Clippy Triage in Claude Code?

Run `npx skills add rocky-data/rocky --skill rust-clippy-triage -a claude-code`. Or copy the skill folder (engine/.claude/skills/rust-clippy-triage in rocky-data/rocky) into .claude/skills/rust-clippy-triage in your project. Claude Code loads it when a task matches its description.

How do I install Rust Clippy Triage in Codex?

Run `npx skills add rocky-data/rocky --skill rust-clippy-triage -a codex`. Or copy the skill folder (engine/.claude/skills/rust-clippy-triage in rocky-data/rocky) into .agents/skills/rust-clippy-triage in your project. Codex loads it when a task matches its description.

Can I use Rust Clippy Triage in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rocky-data/rocky --skill rust-clippy-triage -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rust-clippy-triage, .gemini/skills/rust-clippy-triage, .github/skills/rust-clippy-triage and .opencode/skills/rust-clippy-triage in your project.

What does Rust Clippy Triage need to run?

Going by SKILL.md and its folder, Rust Clippy Triage needs the command-line tools its instructions call (cargo).

Does Rust Clippy Triage access the network?

SKILL.md names 1 domain. As links in the text: rust-lang.github.io. This is read from the text; nothing was executed.

Is Rust Clippy Triage safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Rust Clippy Triage use?

Rust Clippy Triage is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Rust Clippy Triage use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Rust Clippy Triage?

Skills that share tags, products or a category with Rust Clippy Triage: Rust Best Practices (farm-fe/farm, 5.6k stars), Doc Comments (biomejs/biome, 26k stars), Rust Hygiene Audit (tsz-org/tsz, 577 stars) and Release (xin2017338/lynx-proxy, 502 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Rust Clippy Triage?

rocky-data (a GitHub organization) maintains it in rocky-data/rocky, which has 304 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on October 8, 2026.

Source: rocky-data/rocky on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.