agentleFS
1bye1bye/rake/.agents/skills/rust-development/SKILL.md

rust-development

Skill131 starsChanged 5 days agoApache-2.0View on GitHub

Implement, review, and refactor Rust code with explicit ownership, usable public APIs, and verification of the relevant features and targets. Use for Rust code changes and Rust-specific compiler or Clippy diagnostics.

10 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 7 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 10 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow the task's scope and the project's own conventions, supported toolchain, and target matrix.

    line 8
  2. Distinctive:

    Read the owning module, its callers and exports, Cargo features, target-specific dependencies, and relevant tests.

    line 14
  3. Very specific:

    Use Result for expected failure and Option for absence.

    line 37
  4. Distinctive:

    Check contracts for empty, degenerate, and non-finite values when relevant.

    line 39
  5. Distinctive:

    Document existing clamping/approximation rather than silently changing it during a structural cleanup.

    line 40
  6. Distinctive:

    Keep traits tied to a real capability boundary or generic algorithm.

    line 44
  7. Distinctive:

    Keep unsafe operations small and validate the stated safety argument against actual callers, aliasing, initialization, and lifetime.

    line 46
  8. Distinctive:

    Verify task ownership, cancellation, and completion when async work or a worker is spawned.

    line 48
  9. Very specific:

    Run focused tests and the project's formatting/Clippy checks.

    line 53

“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “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 development

Follow the task's scope and the project's own conventions, supported toolchain, and target matrix. Use this skill for Rust-specific decisions; preserve established architecture during focused fixes.

Find the actual boundary

Read the owning module, its callers and exports, Cargo features, target-specific dependencies, and relevant tests. Determine whether the changed code is portable domain logic, an application operation, or a runtime/platform adapter.

For each important value, identify who owns it, who borrows it, who may mutate it, and what ends its lifetime. For derived values, identify the source and invalidation rule. This is particularly useful when a change appears to require a global context, many clones, or pervasive shared mutable state.

Choose the relevant procedure

  • For borrow-checker errors, cloning, shared state, or async lifetimes, read ownership.md. Fix the ownership relationship before widening lifetimes or wrapping data in synchronization primitives.
  • For moving modules, splitting a large owner, or changing exports, read refactoring.md. Preserve behavior and test the public boundary while changing structure.
  • For a local behavior change, identify its input/output/error contract and test the changed behavior through the existing owner. Do not reorganize the project solely to use this skill.

Rust-specific review

  • Use Result for expected failure and Option for absence. Check error context, cause preservation, and whether consumers can import and match public error types.
  • Check contracts for empty, degenerate, and non-finite values when relevant. Document existing clamping/approximation rather than silently changing it during a structural cleanup.
  • Inspect what Clone copies. Shared handles, copy-on-write values, and deep copies require different decisions; do not mechanically replace every clone with a borrow.
  • Keep traits tied to a real capability boundary or generic algorithm. Consider concrete types and enums before adding dispatch or a parallel abstraction layer.
  • Keep unsafe operations small and validate the stated safety argument against actual callers, aliasing, initialization, and lifetime. A comment alone is not proof.
  • Verify task ownership, cancellation, and completion when async work or a worker is spawned. A dropped future or handle may leave external/blocking work running.

Verify the supported use

Run focused tests and the project's formatting/Clippy checks. For exported APIs, include an external consumer or doctest that uses public paths. Check changed feature/platform branches explicitly; --all-targets is not all platforms.

Preserve the minimum supported Rust version and avoid suggestions that require a newer language/library feature unless upgrading is part of the request. Use compiler and installed dependency documentation to resolve uncertain APIs. Measure relevant performance before and after changing allocation, caching, or hot algorithms.

Report the resulting ownership/API change, checks run, and any unverified target or prerequisite. Do not claim GPU, browser, native-library, or service behavior from a compile check or an in-memory substitute.

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.