agentleFS
AnrahyaAnrahya/skills/rust-anti-slop/SKILL.md

rust-anti-slop

Skill1 starsChanged 4 months agoMITView on GitHub

Apply evidence-driven Rust engineering discipline while writing, reviewing, debugging, refactoring, hardening, or governing Rust and Cargo repositories. Use for ownership and error design, async lifecycle, unsafe/FFI, APIs, dependencies, features, tests, compiler or Clippy findings, and repository lint or CI policy. Adapt to the repository's toolchain, MSRV, crate roles, targets, features, and conventions.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. tristanmanchester/agent-skills★ 4same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository2 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Read each matching reference in full before acting.

    line 14
  2. Distinctive:

    Read repository instructions and inspect the task-local code path, manifests, toolchain/MSRV, relevant tests, git status, and the current …

    line 31
  3. Distinctive:

    Do not edit generated, vendored, copied, binding-generated, migration-generated, or macro-expanded output as owned source.

    line 35
  4. Very specific:

    No temporary slop in the completed change: unexplained TODO, FIXME, todo!, or unimplemented!

    line 36
  5. Distinctive:

    Never introduce repository-wide policy, optional tools, dependency updates, lockfile churn, or formatter-wide rewrites during an ordinary …

    line 37
  6. Distinctive:

    Verify each unit before starting the next.

    line 45
  7. Distinctive:

    Run focused checks first, then the repository's canonical formatter, compiler, Clippy, tests, rustdoc, and policy gates in proportion to …

    line 46

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Rust anti-slop

Make incorrect, vague, wasteful, difficult-to-review, and unjustified Rust code hard to introduce. Compiler and lint findings are evidence, not permission for mechanical rewrites. Preserve behavior, public contracts, supported targets, repository conventions, and unrelated work.

Route the task

Read each matching reference in full before acting. Do not load references for risks the task does not contain.

Task or riskRequired reference
Any Rust implementation, review, debugging, refactoring, or repairreferences/engineering-core.md
Types, ownership, borrowing, traits, dispatch, or error contractsreferences/types-ownership-and-errors.md
Async tasks, locks, channels, lifecycle, state machines, serialization, performance, security, or operational behaviorreferences/async-state-and-boundaries.md
Public APIs, crate boundaries, dependencies, Cargo features, or target supportreferences/api-and-dependencies.md
Unsafe code, FFI, raw pointers, atomics, layout, or native integrationreferences/unsafe-and-ffi.md
Enabling, changing, suppressing, or migrating compiler or Clippy lintsreferences/lint-policy.md
Miri, feature matrices, semver, coverage, property tests, fuzzing, concurrency testing, cross-target checks, mutation testing, benchmarks, or Dylintreferences/specialized-gates.md
Installing or migrating repository-wide lint, formatting, dependency, unsafe-code, or CI policyreferences/policy-installation.md plus every risk reference it selects

Templates under assets/ are reviewed starting points, not universal policy. The audit script may be executed without reading its source.

Shared invariants

  1. Read repository instructions and inspect the task-local code path, manifests, toolchain/MSRV, relevant tests, git status, and the current diff before editing. Preserve unrelated work and never use destructive cleanup commands.
  2. Honor the pinned toolchain, declared rust-version, feature model, supported targets, generated-code boundaries, and existing quality commands. Do not upgrade or broaden scope unless the task requires it.
  3. Fix the underlying problem with the smallest coherent change. Do not launder compiler, borrow-checker, lint, or test failures with convenient clones, allocations, dynamic types, panics, broader visibility, dependencies, or suppressions.
  4. Preserve error evidence and domain facts. Validate untyped data at boundaries and keep owned core logic typed.
  5. Do not edit generated, vendored, copied, binding-generated, migration-generated, or macro-expanded output as owned source. Fix its source or exclude it narrowly.
  6. No temporary slop in the completed change: unexplained TODO, FIXME, todo!, or unimplemented!; ignored errors; dead alternatives; debug output; speculative abstractions; or unjustified exceptions.
  7. Never introduce repository-wide policy, optional tools, dependency updates, lockfile churn, or formatter-wide rewrites during an ordinary engineering task unless explicitly required. Do not run cargo fix, cargo clippy --fix, or broad automatic rewrites on a dirty repository without reviewing the exact scope first.

Work

  1. Derive the behavioral contract from the request and repository evidence. Name the observable outcome, non-goals, and cheapest trustworthy proof before coding; distinguish facts, inferences, and pre-existing failures.
  2. For a bug, reproduce the symptom before editing when safe and practical. If blocked, preserve the strongest existing evidence and report the verification gap rather than inventing a cause.
  3. Select and read the matching references above. Map the blast radius and, for non-trivial multi-step work, define ordered units that each leave the repository coherent and end in a proof checkpoint.
  4. Implement or recommend the smallest change that preserves the applicable ownership, error, lifecycle, concurrency, unsafe, feature, target, and public-API constraints.
  5. Verify each unit before starting the next. If a checkpoint fails, stop and find the cause; do not build on an unverified state or add temporary compatibility code unless the final contract requires it.
  6. Run focused checks first, then the repository's canonical formatter, compiler, Clippy, tests, rustdoc, and policy gates in proportion to the affected features and targets.
  7. Prove the observable outcome through the narrowest real surface available. Compilation, Clippy, and self-authored tests support that proof but do not replace it when real behavior can be exercised.
  8. Inspect the complete final diff, re-check affected consumers and invariants, and apply the acceptance gate in references/engineering-core.md to owned changed code.

Report

State the repository context and scope inspected, files changed, exact commands and results, fixed versus outstanding findings, every remaining exception or pre-existing failure, and anything not verified with the resulting risk. Never claim the repository is clean when a required gate was skipped or failed.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.