agentleFS
erikhowarderikhoward/agent-tools/skills/rust/SKILL.md

rust

Skill0 starsChanged 3 months agoMITView on GitHub

Apply repository-aware Rust conventions for ownership, error and panic boundaries, unsafe code, async tasks, public APIs, tests, and verification.

18 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use fastapi and tdd.

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.
  • martinholovskySkill

    fastapi

    REST API and WebSocket development with FastAPI emphasizing security, performance, and async patterns

    Also in 3 projects that use this

  • AWSSkill

    tdd

    Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 6 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 14 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow the workspace's Rust version, feature policy, public API conventions, lint configuration, and CI commands.

    line 12
  2. Very specific:

    Keep unsafe blocks minimal.

    line 19
  3. Very specific:

    Do not hold blocking lock guards across .await.

    line 21
  4. Distinctive:

    Treat cancellation safety as API behavior when futures can be dropped mid-operation.

    line 22
  5. Distinctive:

    Keep public paths, feature flags, serialized formats, and error behavior deliberate.

    line 23
  6. Distinctive:

    Use narrow lint allowances with a reason.

    line 24
  7. Very specific:

    Read references only for the affected surface: api-design.md, async-and-performance.md, or agent-discipline.md.

    line 26
  8. Distinctive:

    Use repository commands first.

    line 30
  9. Distinctive:

    Run Miri or sanitizer checks when changed unsafe code requires them and the environment supports them.

    line 38

“Common” is measured: kept by at least 6 in 10 of the 14 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

Follow the workspace's Rust version, feature policy, public API conventions, lint configuration, and CI commands. Preserve compatibility unless the task authorizes a break.

Contracts

  • Express ownership and borrowing directly. Clone only when ownership transfer or measured simplicity justifies it.
  • Return recoverable failures. Reserve panic for violated invariants and unrecoverable process contracts. Avoid production unwrap and expect unless a nearby explanation proves the invariant.
  • Preserve error sources and useful context without leaking secrets. Redact secret-bearing Debug output.
  • Keep unsafe blocks minimal. State the safety invariant at the boundary and test the safe API around it. Do not weaken soundness to satisfy a signature.
  • Give spawned tasks an owner and shutdown path. Dropping a task handle does not necessarily cancel the task. Bound channels and concurrency.
  • Do not hold blocking lock guards across .await. Keep async-aware guards short and justify any guard retained across an await point.
  • Treat cancellation safety as API behavior when futures can be dropped mid-operation.
  • Keep public paths, feature flags, serialized formats, and error behavior deliberate. Avoid speculative generics and abstractions.
  • Use narrow lint allowances with a reason. Do not hide warnings globally.

Read references only for the affected surface: api-design.md, async-and-performance.md, or agent-discipline.md.

Verification

Use repository commands first. Common fallbacks are:

cargo fmt --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all-features

Run Miri or sanitizer checks when changed unsafe code requires them and the environment supports them. Report unavailable checks instead of installing tools or claiming success.

Adapted from tiangolo/agents (MIT).

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.