Rust Best Practices
farm-fe/farm
Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook.
Idiomatic Rust guide based on Apollo GraphQL's best practices handbook.
$ npx skills add scott-fryxell/brayness --skill rust-best-practices -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install scott-fryxell/brayness rust-best-practices --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/scott-fryxell/brayness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/rust-best-practices .claude/skills/rust-best-practices && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "rust-best-practices" agent skill from https://github.com/scott-fryxell/brayness/tree/main/skills/rust-best-practices into .claude/skills/rust-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-best-practices", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/scott-fryxell/brayness/tree/main/skills/rust-best-practicesType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add scott-fryxell/brayness --skill rust-best-practices -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install scott-fryxell/brayness rust-best-practices --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/scott-fryxell/brayness.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/rust-best-practices .agents/skills/rust-best-practices && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "rust-best-practices" agent skill from https://github.com/scott-fryxell/brayness/tree/main/skills/rust-best-practices into .agents/skills/rust-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-best-practices", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add scott-fryxell/brayness --skill rust-best-practices -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install scott-fryxell/brayness rust-best-practices --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/scott-fryxell/brayness.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/rust-best-practices .cursor/skills/rust-best-practices && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "rust-best-practices" agent skill from https://github.com/scott-fryxell/brayness/tree/main/skills/rust-best-practices into .cursor/skills/rust-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-best-practices", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/scott-fryxell/brayness.git --path skills/rust-best-practices--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add scott-fryxell/brayness --skill rust-best-practices -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install scott-fryxell/brayness rust-best-practices --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/scott-fryxell/brayness.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/rust-best-practices .gemini/skills/rust-best-practices && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "rust-best-practices" agent skill from https://github.com/scott-fryxell/brayness/tree/main/skills/rust-best-practices into .gemini/skills/rust-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-best-practices", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install scott-fryxell/brayness rust-best-practicesInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add scott-fryxell/brayness --skill rust-best-practices -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/scott-fryxell/brayness.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/rust-best-practices .github/skills/rust-best-practices && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "rust-best-practices" agent skill from https://github.com/scott-fryxell/brayness/tree/main/skills/rust-best-practices into .github/skills/rust-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-best-practices", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add scott-fryxell/brayness --skill rust-best-practices -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install scott-fryxell/brayness rust-best-practices --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/scott-fryxell/brayness.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/rust-best-practices .opencode/skills/rust-best-practices && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "rust-best-practices" agent skill from https://github.com/scott-fryxell/brayness/tree/main/skills/rust-best-practices into .opencode/skills/rust-best-practices/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-best-practices", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
rust-best-practicesIdiomatic Rust guide based on Apollo GraphQL's best practices handbook.
Rust Best Practices is an agent skill from scott-fryxell/brayness. Idiomatic Rust guide based on Apollo GraphQL's best practices handbook. Use when writing, reviewing, or refactoring Rust - ownership and borrowing decisions, Result error handling, performance, clippy, and tests.
Its SKILL.md is about 890 tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `references/chapter_01.md`, `references/chapter_02.md` and `references/chapter_03.md`). Compatibility notes: Rust 1.70+, Cargo
It sits in Development, covering Refactoring, Linting and formatting and Error handling. It works with Rust and Apollo GraphQL. The repository describes itself as: A harness for the anxious digital mind. A safe place for creatives to keep their creative soul while exploring digital skills. The licence is MIT.
Read from SKILL.md and the folder at commit 71f10e2. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
Bash(cargo:*)Bash(rustc:*)Bash(rustfmt:*)Bash(clippy:*)ReadWriteEditGlobGrepFrom allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
cargoFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
github.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Rust 1.70+, Cargo
From compatibility in the SKILL.md frontmatter.
Rust Best Practices loads about 888 tokens when it runs, and up to ~14k if it reads all its reference files. Until then it costs about 58 tokens; SKILL.md has 358 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from scott-fryxell/brayness at commit 71f10e2, republished under its MIT licence (© scott-fryxell). 358 words, ~888 tokens.
.claude/skills/rust-best-practices/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.Apply these guidelines when writing or reviewing Rust code. Based on Apollo GraphQL's Rust Best Practices Handbook.
Before reviewing, familiarize yourself with Apollo's Rust best practices. Read ALL relevant chapters in the same turn in parallel. Reference these files when providing feedback:
Trimmed to the chapters that apply here. The only Rust in this workspace is
work/realness/tracer, a ~300-line WASM cdylib with no threads, no unsafe,
no trait objects, and no published rustdoc API. Apollo's chapters 6-9 (generics
and dispatch, type state, comments vs documentation, pointers and Send/Sync)
were dropped as inapplicable. Pull them from the
upstream handbook if a
future crate needs them.
&T over .clone() unless ownership transfer is required&str over String, &[T] over Vec<T> in function parametersCopy types (24 bytes or less) can be passed by valueCow<'_, T> when ownership is ambiguousResult<T, E> for fallible operations; avoid panic! in productionunwrap()/expect() outside teststhiserror for library errors, anyhow for binaries only? operator over match chains for error propagation--release flagcargo clippy -- -D clippy::perf for performance hints.iter() instead of .into_iter() for Copy types.collect() callsRun regularly: cargo clippy --all-targets --all-features --locked -- -D warnings
Key lints to watch:
redundant_clone - unnecessary cloninglarge_enum_variant - oversized variants (consider boxing)needless_collect - premature collectionUse #[expect(clippy::lint)] over #[allow(...)] with justification comment.
process_should_return_error_when_input_empty()///) for public API examplescargo insta for snapshot testing generated output// comments explain why (safety, workarounds, design rationale)TODO needs a linked issue: // TODO(#42): ...© scott-fryxell, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files (references) in skills/rust-best-practices of scott-fryxell/brayness.
Open the folder on GitHubat commit 71f10e2
Rust Best Practices next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Rust Best Practices this skillscott-fryxell/brayness | 125 | — | ~888 | Automated safety check: Pass | MIT | |
| Rust Best Practicesfarm-fe/farm | 5.6k | 3 repos | ~1.1k | Automated safety check: Pass | MIT | |
| Rust Hygiene Audittsz-org/tsz | 577 | — | ~1.5k | Automated safety check: Pass | Apache-2.0 | |
| Rust SkillsJMBeresford/retrom | 2.1k | 1 repos | ~9.5k | Automated safety check: Pass | MIT | |
| Rust Skillsnoh-rs/nohrs | 156 | — | ~5.3k | Automated safety check: Pass | MIT | |
| Migrate Core Code to Submodulestinyhumansai/openhuman | 42k | — | ~2.6k | Automated safety check: Pass | GPL-3.0 |
farm-fe/farm
Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook.
tsz-org/tsz
Run a deep DRY + code-hygiene audit of the Rust workspace and turn the findings into verified, deduplicated, hierarchical GitHub tech-debt issues.
JMBeresford/retrom
Comprehensive Rust coding guidelines with 265 rules across 26 categories.
noh-rs/nohrs
Comprehensive Rust coding guidelines with 179 rules across 14 categories.
tinyhumansai/openhuman
Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.
rtk-ai/rtk
Describes seven Rust design patterns for the RTK CLI filter modules, with when to use each, RTK examples, and notes on when a pattern is overkill.
scott-fryxell/brayness
Find and install brand SVG logos via SVGL (https://svgl.app/) and Wikimedia Commons fallbacks into any project's static asset folder.
scott-fryxell/brayness
Write Vitest specs for Vue 3 JavaScript (Vite Plus, happy-dom, @vue/test-utils) and analyze V8 coverage + Fallow health to prioritize test-first refactors.
scott-fryxell/brayness
Derive a project's visual rules from its existing tokens, palette, type scale, logo, and icons (Intake), then generate raw SVG vector graphics from those rules as a small composable set (module…
scott-fryxell/brayness
Create video compositions, animations, title cards, overlays, captions, voiceovers, audio-reactive visuals, and scene transitions in HyperFrames HTML.
scott-fryxell/brayness
A skill your agent uses when designing or implementing motion for web interfaces, including CSS transitions and keyframes, linear() easing design, transform strategy (translate/rotate vs…
scott-fryxell/brayness
Inspect live Vue 3 component state via agent-browser eval - no Devtools extension, no console.log.
Works with
Categories
Idiomatic Rust guide based on Apollo GraphQL's best practices handbook. Rust Best Practices is an agent skill from scott-fryxell/brayness. Idiomatic Rust guide based on Apollo GraphQL's best practices handbook.
Rust Best Practices fits situations like: refactoring Rust - ownership and borrowing decisions; result error handling.
Run `npx skills add scott-fryxell/brayness --skill rust-best-practices -a claude-code`. Or copy the skill folder (skills/rust-best-practices in scott-fryxell/brayness) into .claude/skills/rust-best-practices in your project. Claude Code loads it when a task matches its description.
Run `npx skills add scott-fryxell/brayness --skill rust-best-practices -a codex`. Or copy the skill folder (skills/rust-best-practices in scott-fryxell/brayness) into .agents/skills/rust-best-practices in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add scott-fryxell/brayness --skill rust-best-practices -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rust-best-practices, .gemini/skills/rust-best-practices, .github/skills/rust-best-practices and .opencode/skills/rust-best-practices in your project.
Going by SKILL.md and its folder, Rust Best Practices needs the command-line tools its instructions call (cargo). Its frontmatter pre-approves these tools: Bash(cargo:*), Bash(rustc:*), Bash(rustfmt:*), Bash(clippy:*), Read, Write, Edit, Glob, Grep. Compatibility (from SKILL.md): Rust 1.70+, Cargo.
SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Rust Best Practices is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 888 tokens (SKILL.md is roughly 3.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 13k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Rust Best Practices: Rust Best Practices (farm-fe/farm, 5.6k stars), Rust Hygiene Audit (tsz-org/tsz, 577 stars), Rust Skills (JMBeresford/retrom, 2.1k stars) and Rust Skills (noh-rs/nohrs, 156 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
scott-fryxell (a GitHub user) maintains it in scott-fryxell/brayness, which has 125 GitHub stars. The repository holds 27 skills in this directory. The repository was last updated on September 28, 2026.
Source: scott-fryxell/brayness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.