agentleFS
jscraikjscraik/Agent-Skills/Skills/agent-ops/rust-pro/SKILL.md

rust-pro

Skill9 starsChanged 46 days agoApache-2.0View on GitHub

Create and review Rust 1.75+ systems code with ownership-safe async patterns and production error handling. Use when building or debugging Rust services that need performance and reliability.

10 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use intelligent-routing, nextjs-react-expert and 2 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • SKB3002Skill

    intelligent-routing

    Automatic agent selection and intelligent task routing. Analyzes user requests and automatically selects the best specialist agent(s) without requiring explicit user mentions.

    Also in 5 projects that use this

  • SKB3002Skill

    nextjs-react-expert

    React and Next.js performance optimization from Vercel Engineering. Use when building React components, optimizing performance, eliminating waterfalls, reducing bundle size, reviewing code for performance issues, or implementing server/client-side optimizations.

    Also in 3 projects that use this

  • jornalistainclusivoSkill

    design-spec

    How to author a DESIGN.md file — the machine-readable design-token + human-rationale format that must exist before any UI is built. YAML front-matter token schema (colors, typography, spacing, rounded, components), type system, token references, and canonical section order.

    Also in 3 projects that use this

  • zzfancitizenSkill

    verify-changes

    Verify code changes do not break the project by running tests, linter checks, and import validation. Use after making any code changes, editing Python files, modifying imports, updating dependencies, or refactoring.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    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
  1. Distinctive:

    Use for Rust implementation or review work.

    line 21
  2. Distinctive:

    Use when correctness, safety, and performance all matter.

    line 22
  3. Distinctive:

    Prefer borrowing over cloning in hot paths.

    line 38
  4. Distinctive:

    Use iterators before indexing loops when possible.

    line 39
  5. Distinctive:

    Keep lifetimes implicit unless explicit annotations improve clarity.

    line 40
  6. Very specific:

    Prefer Result<T, E> for recoverable paths.

    line 44
  7. Distinctive:

    Use domain-specific error enums over stringly-typed errors.

    line 45
  8. Distinctive:

    If ownership requirements conflict, favor correctness and simplify data flow.

    line 58
  9. Distinctive:

    Keep guidance deterministic so repeated runs produce consistent decisions.

    line 77
  10. Distinctive:

    Run the relevant local checks for touched files and workflow contracts.

    line 87
  11. Distinctive:

    Do not expand scope beyond the request unless explicitly asked.

    line 94
  12. Distinctive:

    Prefer safe, reversible edits over broad refactors.

    line 95
  13. Distinctive:

    Read when: the task needs advanced edge cases, migration-safe patterns, or runtime-specific nuance beyond the core checklist.

    line 106

≈ “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

Table of Contents

  • When to use
  • Required inputs
  • Deliverables
  • Ownership Rules
  • Error Handling
  • Examples
  • Failure mode
  • Gotchas

When to use

  • Use for Rust implementation or review work.
  • Use when correctness, safety, and performance all matter.

Required inputs

  • Target crate/module.
  • Borrowing/ownership constraints.
  • Error semantics and runtime expectations.

Deliverables

  • Safe and idiomatic Rust updates.
  • Explicit error propagation.
  • Notes on any performance-sensitive decisions.

Ownership Rules

  • Prefer borrowing over cloning in hot paths.
  • Use iterators before indexing loops when possible.
  • Keep lifetimes implicit unless explicit annotations improve clarity.

Error Handling

  • Prefer Result<T, E> for recoverable paths.
  • Use domain-specific error enums over stringly-typed errors.
  • Attach context when propagating errors.

Examples

pub fn parse_port(value: &str) -> Result<u16, String> {
    value.parse::<u16>().map_err(|_| format!("invalid port: {value}"))
}

Failure mode

  • If ownership requirements conflict, favor correctness and simplify data flow.

Gotchas

  • Overusing clone() can hide unnecessary allocations.

See Also

SkillWhen to use
[[go]]Systems programming with similar error-handling and concurrency patterns
[[he-fix-bugs]]Triage Rust ownership and borrow-checker errors with evidence-first diagnosis

Topic map: [[agent-ops]]

Philosophy

  • Optimize for clear, verifiable outcomes with the minimum necessary changes.
  • Keep guidance deterministic so repeated runs produce consistent decisions.

Procedure

  1. Confirm scope, constraints, and required inputs before edits.
  2. Apply focused changes tied directly to the requested outcome.
  3. Re-run the highest-signal validations and capture concrete evidence.

Validation

  • Run the relevant local checks for touched files and workflow contracts.
  • Fail fast: stop at the first blocking validation failure and report exact evidence.
  • Re-run checks after fixes and record residual risk if any remains.

Constraints

  • Redact secrets, tokens, credentials, and sensitive data by default.
  • Do not expand scope beyond the request unless explicitly asked.
  • Prefer safe, reversible edits over broad refactors.

Anti-patterns

  • Skipping validation after making changes.
  • Applying broad refactors to solve narrow issues.
  • Assuming behavior without evidence from current checks.

References and assets

  • Open deep guidance: Infrastructure/references/deep-guidance.md
  • Read when: the task needs advanced edge cases, migration-safe patterns, or runtime-specific nuance beyond the core checklist.

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.