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.
In this repository78 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- godmode:agent-governanceSkill
- godmode:agent-improvement-loopSkill
- agents-skill-saveSkill
- baml-add-typesSkill
- godmode:brainstormSkill
- godmode:capSkill
- godmode:changelogSkill
- godmode:ci-fixSkill
- godmode:code-reviewSkill
- godmode:context-mapSkill
- godmode:cross-issueSkill
- godmode:crs-discoverSkill
- godmode:crs-hook-testingSkill
- godmode:crs-installSkill
- godmode:crs-ledger-applySkill
- godmode:crs-ledger-diffSkill
- godmode:crs-propose-rulesSkill
- godmode:crs-validateSkill
- godmode:dead-codeSkill
- godmode:decomposeSkill
- godmode:dep-auditSkill
- godmode:dep-bumpSkill
- godmode:designSkill
- devloop-session-primerSkill
- godmode:dialecticSkill
- godmode:doc-maintainerSkill
- godmode:doc-reviewSkill
- godmode:doc-syncSkill
- godmode:doc-writerSkill
- doob-db-inspectorSkill
- doob-release-managerSkill
- godmode:doublecheckSkill
- dual-forge-pr-mergeSkill
- gh-bulk-issuesSkill
- godmode:health-scoreSkill
- godmode:ingestSkill
- godmode:introspectionSkill
- godmode:issue-triageSkill
- godmode:memory-bankingSkill
- godmode:mergeSkill
- godmode:mini-context-graphSkill
- godmode:mistake-trackerSkill
- godmode:moaSkill
- notfiles-release-workflowSkill
- godmode:observability-as-infrastructureSkill
- godmode:parallel-agentsSkill
- godmode:pattern-learnerSkill
- planning-with-cruxSkill
- godmode:pr-authorSkill
- godmode:receiving-reviewSkill
- godmode:refactoringSkill
- godmode:release-notesSkill
- release-readiness-checkSkill
- remote-upstream-triageSkill
- repo-gap-backlogSkill
- rustqualSkill
- rustqual-workspaceSkill
- rust-release-workflow-authorSkill
- godmode:self-reflectSkill
- The first 60 shown.
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
- Distinctive: line 19
Read the file named in a row before doing the task in its right column.
- Distinctive: line 39
Before submitting any Rust code:
≈ “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.
Files
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.
| File | Read before |
references/naming-and-ownership.md | naming a new item, or choosing between borrowing, cloning, and shared ownership |
references/error-handling.md | writing a fallible function, defining an error type, or deciding whether code may panic |
references/iterators-and-collections.md | writing a loop, an iterator chain, or an accumulation |
references/patterns-to-follow-and-avoid.md | structuring a new module or type, or reviewing for design smells |
references/traits-and-api-design.md | adding derives or trait impls to a public type, or designing a public API |
references/async.md | writing or changing async code or background tasks |
references/code-style-and-testing.md | before committing, writing doc comments, or adding tests |
references/project-organisation.md | creating a crate, editing Cargo.toml, or laying out modules |
references/common-patterns.md | choosing a construction or structuring pattern such as the builder pattern |
references/clippy-and-error-decision-tree.md | a 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 bareunwrap()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
unsafewithout a// SAFETY:comment explaining the invariant taskit check fmt— no format difftaskit check lint— zero warningstaskit test run— all green- No dead code, unused imports, or commented-out blocks
Related
skills/agent-governance/SKILL.md— Rust implementations of governance patternsskills/systematic-debugging/SKILL.md— debugging approach for Rust-specific issuesskills/verification-before-completion/SKILL.md— CI gate checklist
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
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.

