agentleFS
elodin-syselodin-sys/elodin/.cursor/skills/rust/SKILL.md

rust

Skill553 starsChanged 5 months agoApache-2.0View on GitHub

Elodin Rust style and anti-patterns. Use when writing or reviewing Rust in this repo, adding error types, designing APIs, or when the user mentions Rust conventions or DONTs.

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, 1 is distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 31 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Do not use String as an error type.

    line 13
  2. Distinctive:

    Do not use accessory functions that do nothing, e.g.,

    line 16
  3. Very specific:

    Do not allocate strings if you can help it.

    line 27
  4. Very specific:

    Avoid unwrap() and expect() except for mutex locks, logical invariants (guaranteed success), prototypes, tests, and examples.

    line 32
  5. Very specific:

    Don't call format! multiple times in succession.

    line 35
  6. Very specific:

    Consider using Cow<'static, str> for a field instead of String or &'static str if static strings are the rule but exceptional cases require …

    line 40

“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

DON'Ts

  1. Do not use String as an error type. Use thiserror crate and an enum in general.
  2. Do not use accessory functions that do nothing, e.g.,
    pub fn stats(&self) -> &Snapshot {
        &self.snapshot
    }

This is an old object-oriented pattern that we do not need. Expose fields as pub or pub(crate) and access them directly.

  1. Do not allocate strings if you can help it. Be suspicious of format!, to_string(), to_owned(), into(), str::to_lowercase(), str::to_uppercase(), str::replace*(), str::repeat(), Path::to_string_lossy(), PathBuf::to_path_buf().
  2. Avoid unwrap() and expect() except for mutex locks, logical invariants (guaranteed success), prototypes, tests, and examples.
  3. Don't call format! multiple times in succession; it allocates a string each time. Use write! to build upon one String.

DOs

  1. Consider using Cow<'static, str> for a field instead of String or &'static str if static strings are the rule but exceptional cases require an owned Strings, e.g., for error enum variants: Message(Cow<'static, str>).

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.