agentleFS
alexjmiller5alexjmiller5/agent-config-public/skills/rust/SKILL.md

rust

Skill0 starsChanged 41 days agoMITView on GitHub

Use when writing, reviewing, debugging or profiling Rust code, touching Cargo.toml or .rs files, configuring a Rust toolchain, or assessing a Rust performance migration.

38 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use java, node and 9 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.
  • testdino-hqSkill

    java

    Google's official Java style guide. Covers 2-space indentation, 100-char line limit, naming conventions, braces, imports, Javadoc, exception handling, lambdas, and streams. Enforces @Override annotations and specific imports.

    Also in 4 projects that use this

  • mcollinaSkill

    node

    Provides domain-specific best practices for Node.js development with TypeScript, covering type stripping, async patterns, error handling, streams, modules, testing, performance, caching, logging, and more. Use when setting up Node.js projects with native TypeScript support, configuring type stripping (--experimental-strip-types), writing Node 22+ TypeScript without a build step, or when the user mentions 'native TypeScript in Node', 'strip types', 'Node 22 TypeScript', '.ts files without compilation', 'ts-node alternative', or needs guidance on error handling, graceful shutdown, flaky tests, profiling, or environment configuration in Node.js. Helps configure tsconfig.json for type stripping, set up package.json scripts, handle module resolution and import extensions, and apply robust patterns across the full Node.js stack.

    Also in 3 projects that use this

  • rogue-dev-studioSkill

    python

    Python 3.13 with uv package manager via mise. Use when the project needs this capability or the user / team manifest asks for it. Use for specialized `python` work when listed in TEAM.yaml or explicitly requested.

    Also in 6 projects that use this

  • rogue-dev-studioSkill

    golang

    Go development environment. Use when the project needs this capability or the user / team manifest asks for it. Use for specialized `golang` work when listed in TEAM.yaml or explicitly requested.

    Also in 3 projects that use this

  • trotsky1997Skill

    ast-grep

    Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search. This skill should be used when users ask to search for code patterns, find specific language constructs, or locate code with particular structural characteristics.

    Also in 3 projects that use this

  • OpenAISkill

    nextjs

    Next.js App Router expert guidance. Use when building, debugging, or architecting Next.js applications — routing, Server Components, Server Actions, Cache Components, layouts, middleware/proxy, data fetching, rendering strategies, and deployment on Vercel.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 31 edited versions we read keep these.

  • 4

    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:

    Read the relevant chapter before relying on version-sensitive details:

    line 11
  2. Very specific:

    Use the repository's just verbs first.

    line 37
  3. Very specific:

    Test supported feature combinations explicitly.

    line 47
  4. Distinctive:

    Use cargo-audit for dependency advisories.

    line 49
  5. Distinctive:

    Use borrowing and streaming when they simplify ownership and bound memory.

    line 63
  6. Distinctive:

    Use bounded tasks/queues for large inputs.

    line 64

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

Read the authoritative source for the problem

Read the relevant chapter before relying on version-sensitive details:

Toolchain and verification

Respect the repository's edition, MSRV and toolchain pin. For new crates, choose a stable edition supported by the deployment target. On a Nix-managed machine, use its declared compiler, Cargo, rustfmt, Clippy, rust-analyzer and standard-library sources; a missing rustup is not a broken installation. Change declarative configuration when tools are missing. Keep project-specific versions and cross-compilation targets in a pinned development environment. Expose packages with rustPlatform.buildRustPackage and a committed lockfile for applications; install through the supported package/module interface.

Use the repository's just verbs first. Otherwise run:

cargo fmt --all -- --check
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo test --workspace --locked
cargo test --workspace --doc --locked
cargo build --release --locked

Test supported feature combinations explicitly; --all-features is suitable only when features can coexist. If nextest is used, run doctests separately. Use cargo-audit for dependency advisories; investigate findings before changing versions. Check compiler, Cargo and rust-analyzer versions and source lookup when editor diagnostics disagree with the build.

Performance work

Measure representative end-to-end release builds before changing languages. Separate CPU, allocation and memory costs from network, storage and external service latency. Keep an existing implementation when the bottleneck is elsewhere; introduce Rust at a measured hot path before considering a rewrite. State the speedup target and compare correctness, throughput, latency and peak memory using the same inputs and concurrency. Performance is a hypothesis until measured. Native platform APIs and library availability also constrain choice.

Use borrowing and streaming when they simplify ownership and bound memory. Use bounded tasks/queues for large inputs. Keep blocking I/O and sleeps off async executor threads; plan cancellation, timeouts and idempotent retries. Prefer safe, concrete code; add abstractions and dependencies for a demonstrated need. Propagate recoverable errors with context instead of panicking on user input.

Credits: official Rust, Cargo, rust-analyzer and Tokio documentation (reference routing and verification); apollographql/skills@rust-best-practices (release measurement), wshobson/agents@rust-async-patterns (bounded async work), jeffallan/claude-skills@rust-engineer (ownership and safety review).

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.