agentleFS
89jobrien89jobrien/godmode/skills/rust-conventions/SKILL.md

godmode:rust-conventions

Skill1 starsChanged 57 days agoMITView on GitHub

Rust coding conventions and best practices for all *.rs files in this workspace. Reference when writing new Rust code, reviewing a PR, or deciding between implementation approaches. Covers naming, ownership, error handling, API design, testing, and project organisation — based on the Rust API Guidelines, RFC 430, and idiomatic community standards.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the file named in a row before doing the task in its right column.

    line 19
  2. Distinctive:

    Before submitting any Rust code:

    line 39

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

Rust Conventions

Apply these rules to all Rust code written in this workspace. Prioritise readability, safety, and maintainability in that order.

Reference files

Read the file named in a row before doing the task in its right column. These files are not loaded automatically.

FileRead before
references/naming-and-ownership.mdnaming a new item, or choosing between borrowing, cloning, and shared ownership
references/error-handling.mdwriting a fallible function, defining an error type, or deciding whether code may panic
references/iterators-and-collections.mdwriting a loop, an iterator chain, or an accumulation
references/patterns-to-follow-and-avoid.mdstructuring a new module or type, or reviewing for design smells
references/traits-and-api-design.mdadding derives or trait impls to a public type, or designing a public API
references/async.mdwriting or changing async code or background tasks
references/code-style-and-testing.mdbefore committing, writing doc comments, or adding tests
references/project-organisation.mdcreating a crate, editing Cargo.toml, or laying out modules
references/common-patterns.mdchoosing a construction or structuring pattern such as the builder pattern
references/clippy-and-error-decision-tree.mda clippy lint fires, or you are deciding between returning Result and calling unwrap/expect

Quality Checklist

Before submitting any Rust code:

  • Naming follows RFC 430 throughout
  • All public types derive or implement Debug
  • Error handling uses Result<T, E> — no bare unwrap() in non-test code
  • All public items have /// rustdoc with at least one sentence
  • Tests cover the happy path and at least one failure/edge case
  • No unsafe without a // SAFETY: comment explaining the invariant
  • taskit check fmt — no format diff
  • taskit check lint — zero warnings
  • taskit test run — all green
  • No dead code, unused imports, or commented-out blocks

Related

  • skills/agent-governance/SKILL.md — Rust implementations of governance patterns
  • skills/systematic-debugging/SKILL.md — debugging approach for Rust-specific issues
  • skills/verification-before-completion/SKILL.md — CI gate 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.