Rust Best Practices
farm-fe/farm
Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook.
Playbook for when cargo clippy -- -D warnings fires in the Rocky engine.
$ npx skills add rocky-data/rocky --skill rust-clippy-triage -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install rocky-data/rocky rust-clippy-triage --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ 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-srcUse ~/.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/
Install the "rust-clippy-triage" agent skill from https://github.com/rocky-data/rocky/tree/main/engine/.claude/skills/rust-clippy-triage into .claude/skills/rust-clippy-triage/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-clippy-triage", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/rocky-data/rocky/tree/main/engine/.claude/skills/rust-clippy-triageType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add rocky-data/rocky --skill rust-clippy-triage -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install rocky-data/rocky rust-clippy-triage --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rocky-data/rocky.git skills-src && mkdir -p .agents/skills && cp -r skills-src/engine/.claude/skills/rust-clippy-triage .agents/skills/rust-clippy-triage && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "rust-clippy-triage" agent skill from https://github.com/rocky-data/rocky/tree/main/engine/.claude/skills/rust-clippy-triage into .agents/skills/rust-clippy-triage/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-clippy-triage", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add rocky-data/rocky --skill rust-clippy-triage -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install rocky-data/rocky rust-clippy-triage --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rocky-data/rocky.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/engine/.claude/skills/rust-clippy-triage .cursor/skills/rust-clippy-triage && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "rust-clippy-triage" agent skill from https://github.com/rocky-data/rocky/tree/main/engine/.claude/skills/rust-clippy-triage into .cursor/skills/rust-clippy-triage/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-clippy-triage", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/rocky-data/rocky.git --path engine/.claude/skills/rust-clippy-triage--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add rocky-data/rocky --skill rust-clippy-triage -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install rocky-data/rocky rust-clippy-triage --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rocky-data/rocky.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/engine/.claude/skills/rust-clippy-triage .gemini/skills/rust-clippy-triage && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "rust-clippy-triage" agent skill from https://github.com/rocky-data/rocky/tree/main/engine/.claude/skills/rust-clippy-triage into .gemini/skills/rust-clippy-triage/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-clippy-triage", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install rocky-data/rocky rust-clippy-triageInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add rocky-data/rocky --skill rust-clippy-triage -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/rocky-data/rocky.git skills-src && mkdir -p .github/skills && cp -r skills-src/engine/.claude/skills/rust-clippy-triage .github/skills/rust-clippy-triage && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "rust-clippy-triage" agent skill from https://github.com/rocky-data/rocky/tree/main/engine/.claude/skills/rust-clippy-triage into .github/skills/rust-clippy-triage/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-clippy-triage", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add rocky-data/rocky --skill rust-clippy-triage -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install rocky-data/rocky rust-clippy-triage --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rocky-data/rocky.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/engine/.claude/skills/rust-clippy-triage .opencode/skills/rust-clippy-triage && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "rust-clippy-triage" agent skill from https://github.com/rocky-data/rocky/tree/main/engine/.claude/skills/rust-clippy-triage into .opencode/skills/rust-clippy-triage/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-clippy-triage", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
rust-clippy-triagePlaybook 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. 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.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 46be77e. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
cargoFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
rust-lang.github.ioFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
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.
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.
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.
The full file from rocky-data/rocky at commit 46be77e, republished under its Apache-2.0 licence (© rocky-data). 780 words, ~1,789 tokens.
.claude/skills/rust-clippy-triage/SKILL.md (or your agent's skills folder)..github/workflows/engine-ci.yml runs:
cargo clippy --all-targets --all-features -- -D warningsThat 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 clippy fires, work through this in order. Don't jump to step 4.
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>.
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 consumerclippy::let_and_return — return directlyclippy::single_match → if letclippy::or_fun_call → .unwrap_or_else(|| …) for side-effecting defaultsclippy::unnecessary_wraps — return T instead of Option<T> / Result<T, _>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 = "…":
// 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 { ... }#[allow] to the function or block, never the crate or the module, unless the lint is a categorical mismatch (see step 4).reason = "..." — an unexplained #[allow] is a future maintenance trap.#[allow(clippy::all)] or #[allow(warnings)].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:
[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:
[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.Cargo.toml under [lints], not in [workspace.lints] — workspace-level is for rules that apply to every crate.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:
#[allow(...)] on the derived type definition (clippy usually honors this).Never silence lints globally just because generated code trips them in one place — that hides real issues elsewhere.
# 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.
rustfmt runs independently of clippy. CI has:
cargo fmt -- --check…which fails CI just as reliably as clippy does. Before pushing, always run:
cargo fmt && cargo clippy --all-targets --all-features -- -D warningscargo 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
Just SKILL.md in engine/.claude/skills/rust-clippy-triage of rocky-data/rocky.
Open the folder on GitHubat commit 46be77e
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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Rust Clippy Triage this skillrocky-data/rocky | 304 | — | ~1.8k | Automated safety check: Pass | Apache-2.0 | |
| Rust Best Practicesfarm-fe/farm | 5.6k | 3 repos | ~1.1k | Automated safety check: Pass | MIT | |
| Doc Commentsbiomejs/biome | 26k | — | ~3k | Automated safety check: Pass | Apache-2.0 | |
| Rust Hygiene Audittsz-org/tsz | 577 | — | ~1.5k | Automated safety check: Pass | Apache-2.0 | |
| Releasexin2017338/lynx-proxy | 502 | — | ~1.1k | Automated safety check: Pass | MIT | |
| Flowmark Markdown Formatterjlevy/repren | 374 | — | ~631 | Automated safety check: Pass | MIT |
farm-fe/farm
Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook.
biomejs/biome
A skill your agent uses whenever writing or editing Rust //, ///, or //!
tsz-org/tsz
Run a deep DRY + code-hygiene audit of the Rust workspace and turn the findings into verified, deduplicated, hierarchical GitHub tech-debt issues.
xin2017338/lynx-proxy
Publish a new release version of Lynx Proxy. An agent skill from xin2017338/lynx-proxy.
jlevy/repren
Formats Markdown with the Flowmark auto-formatter for typographic cleanup and semantic line breaks, and helps adopt it across a repository.
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.
rocky-data/rocky
Fivetran REST API reference for Rocky's source adapter. An agent skill from rocky-data/rocky.
rocky-data/rocky
Databricks REST API and SQL reference for Rocky's warehouse adapter.
rocky-data/rocky
Rocky CLI JSON-output schema cascade. An agent skill from rocky-data/rocky.
rocky-data/rocky
Top-level router for Rocky development tasks. An agent skill from rocky-data/rocky.
rocky-data/rocky
Rocky DSL (.rocky file) cross-subproject cascade. An agent skill from rocky-data/rocky.
rocky-data/rocky
Adding a new warehouse or source adapter crate to the Rocky engine.
Works with
Categories
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.
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.
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.
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.
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.
Going by SKILL.md and its folder, Rust Clippy Triage needs the command-line tools its instructions call (cargo).
SKILL.md names 1 domain. As links in the text: rust-lang.github.io. This is read from the text; nothing was executed.
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.
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.
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.
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.
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.