agentleFS
DevolutionsDevolutions/IronRDP/.agents/skills/rust-style/SKILL.md

rust-style

Skill3.3k starsChanged 2 days agoApache-2.0View on GitHub

Apply the Devolutions Rust style conventions while writing or editing Rust. Use whenever adding or changing Rust code in this repository, including error messages, log statements, comments, invariants, size computations, and function signatures, even when the user does not mention style.

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

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

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

    Write each field's size with its name (4 /* ReturnCode */), never bare arithmetic or size_of.

    line 16
  2. Very specific:

    Put nested helpers at the end of the enclosing function after a return, one level deep.

    line 23
  3. Very specific:

    Put #[cfg(test)] items and test modules at the end of the file, after all production items.

    line 24
  4. Very specific:

    Prefer a block over a single-use helper unless ?

    line 25
  5. Very specific:

    Prefer iterators over temporary collections and let callers own allocations.

    line 27
  6. Very specific:

    Keep generics off crate boundaries: take &Path rather than impl AsRef<Path>, and move the body of a generic function into a dyn …

    line 28

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

Error messages are one short sentence with no trailing punctuation and no capital added just for sentence position, while keeping proper casing for acronyms ("invalid X.509 certificate"), because reporters compose them into chains. Return a crate-qualified result such as io::Result, not a bare Result, unless the alias is already clear (ConnectionResult).

Log messages start with a capital and have no trailing period. Record data as structured fields rather than interpolating it (info!(%server_addr, "Looked up server address")), and name error fields error. Reserve info! for rare lifecycle milestones, debug! for significant one-off events, and trace! for anything that repeats.

Inline comments and doc comments are full sentences, one sentence per line, with a capital and a period; brief field tags such as // VER need neither. Doc comments link to the governing specification with reference-style links and quote the section title.

Write each field's size with its name (4 /* ReturnCode */), never bare arithmetic or size_of.

Define invariants with an INVARIANT: comment in the field's doc comment, before the loop, at the code for a local invariant, or in the function doc for outputs. Reference them without the prefix when justifying an assumption or a lint suppression. State checks positively (if !(idx < len)) and prefer < and <= over > and >=.

Pass context parameters first. Put nested helpers at the end of the enclosing function after a return, one level deep. Put #[cfg(test)] items and test modules at the end of the file, after all production items. Prefer a block over a single-use helper unless ? or return is needed.

Prefer iterators over temporary collections and let callers own allocations. Keep generics off crate boundaries: take &Path rather than impl AsRef<Path>, and move the body of a generic function into a dyn implementation.

Download now (ZIP)

Trending

More talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 1 mentionMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 1 mentionJul 2026: 16 mentionsAug 2026: 1 mentionSep 2026: 15 mentionsOct 2026: 14 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the Devolutions/IronRDP repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about Devolutions/IronRDP

The biggest 5 of 60 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 60

Talked about on GitHub, Bluesky and Hacker News (60 times).

On GitHub · 50

45 more on GitHub

On Bluesky · 9

4 more on Bluesky

On Hacker News · 1

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.