rust-systems
Skill43 starsChanged 59 days agoMITView on GitHub
Rust patterns for CLI tools, backend services, and general application code. Use when working with Rust, Cargo workspaces, axum/tokio services, clap CLIs, async concurrency, or configuring clippy, rustfmt, cargo-nextest, or Cargo.toml.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- roanbrasil/engineer-grade-agent-skillstheir own version, first seen Jun 17, 2026
- FutureJJ/claude-skillstheir own version, first seen Mar 7, 2026
- rohitg00/awesome-claude-code-toolkittheir own version, first seen Feb 4, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- rohitg00/awesome-claude-code-toolkit★ 2.7ksame name
- roanbrasil/engineer-grade-agent-skills★ 8same name
- FutureJJ/claude-skills★ 3same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository28 other files it gives its agents.
- agent-native-architectureSkill
- brainstormingSkill
- code-reviewSkill
- cpp-systemsSkill
- c-systemsSkill
- debuggingSkill
- document-reviewSkill
- frontend-designSkill
- git-worktreeSkill
- linux-bash-scriptingSkill
- md-docsSkill
- meta-promptingSkill
- nodejs-backendSkill
- orchestrating-swarmsSkill
- php-laravelSkill
- pinescriptSkill
- planningSkill
- postgresqlSkill
- python-servicesSkill
- react-frontendSkill
- receiving-code-reviewSkill
- reflectSkill
- simplifying-codeSkill
- terraformSkill
- test-auditSkill
- verification-before-completionSkill
- writingSkill
- writing-testsSkill
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 5 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
5
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
- Distinctive: line 19
Keep blocking work off async workers, bound queues and spawned work, and define shutdown behavior.
- Distinctive: line 21
Do not mutate process-wide state in concurrent tests.
- Very specific: line 25
Default: no unsafe. If clippy flags it, don't #[allow] it.
- Very specific: line 26
Every unsafe block gets a // SAFETY: comment above it explaining why each invariant holds.
- Very specific: line 27
Keep unsafe blocks minimal: wrap in a safe abstraction at module boundary, mark the module pub(crate).
- Very specific: line 28
Use miri (cargo +nightly miri test) on any crate containing unsafe or raw pointer arithmetic.
- Very specific: line 29
Prefer bytemuck, zerocopy, bytes over hand-rolled transmutes for zero-copy patterns.
- Distinctive: line 36
Only touch what's necessary.
- Distinctive: line 38
Before adding a trait or generic, verify it's used in 3+ places.
- Very specific: line 48
No new unsafe without // SAFETY: comment
- Distinctive: line 52
Read the relevant reference before implementing or reviewing the matching behavior:
“Common” is measured: kept by at least 6 in 10 of the 3 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.
Files
Rust Systems & Services
Covers modern application-layer Rust (edition 2024): CLIs, web services, libraries. Not no_std/embedded.
Working rules
- Preserve error variants in libraries and add operational context at application boundaries.
- Distinguish missing configuration from unreadable or invalid files before writing replacements.
- Keep blocking work off async workers, bound queues and spawned work, and define shutdown behavior.
- Trace exported interfaces before treating a change as internal; verify installed runtime capabilities.
- Do not mutate process-wide state in concurrent tests; exercise the real binary and relevant feature combinations.
Unsafe Discipline
- Default: no
unsafe. If clippy flags it, don't#[allow]it; refactor. The#[expect]escape hatch below does not apply here; unsafe findings get fixed, not annotated. - Every
unsafeblock gets a// SAFETY:comment above it explaining why each invariant holds. No comment = reviewer rejects. - Keep
unsafeblocks minimal: wrap in a safe abstraction at module boundary, mark the modulepub(crate). - Use
miri(cargo +nightly miri test) on any crate containingunsafeor raw pointer arithmetic; it catches UB that optimizers mask. - Prefer
bytemuck,zerocopy,bytesover hand-rolled transmutes for zero-copy patterns. - Env-var writes are
unsafein edition 2024. Write them only inmain, before the runtime starts or any thread spawns. Concurrentgetenvis UB;OnceLockdoes not make it safe. Watch for lazyLD_LIBRARY_PATH-style writes on first use; hoist them to startup.
Discipline
- Simplicity first: every change as simple as possible, impact minimal code.
- Only touch what's necessary; avoid unrelated changes in a PR.
- No
#[allow(clippy::...)]as a shortcut; fix the underlying issue. When a suppression is genuinely warranted, write#[expect(clippy::lint_name, reason = "...")]instead:expectwarns once the lint stops firing, so a suppression that has outlived its cause reports itself, whereallowrots silently forever. (expectneeds Rust 1.81+; edition 2024 clears that floor.) - Before adding a trait or generic, verify it's used in 3+ places. Otherwise a concrete type is clearer.
bool::then_some(x)takesxby value: the argument is computed before the bool is consulted, so a guard written as a condition plus a fixed-width slice panics on exactly the inputs the condition was checking for:(b.len() >= 19 && b[4] == b'-').then_some(&v[..19])panics on any shorter value, exiting 101 inside the one function written to report the case as undetermined. Usethen(|| …), which is lazy. Clippy does not flag the difference. Grepthen_some(for an argument that indexes, slices, unwraps, or allocates. Related: a fixed-width slice is not a parse.&v[..19]also panics mid-character on non-ASCII, and comparing two such prefixes lexicographically drops the timezone offset, so01:00+02:00sorts after00:00Zwhile being an hour earlier. Parse and normalize, or reject.
Verify
cargo fmt --all -- --checkpasses with zero diffscargo clippy --workspace --all-targets --all-features -- -D warningspassescargo nextest run --workspace(orcargo test --workspace) passes with zero failurescargo deny checkpasses (licenses, advisories, duplicates) for any crate going to production- No new
unsafewithout// SAFETY:comment
Task-specific references
Read the relevant reference before implementing or reviewing the matching behavior:
- For Cargo setup, workspace changes, public API reachability, build profiles, or CI: toolchain-and-interfaces.md.
- For errors, ownership, parsing boundaries, Tokio, shutdown, or concurrency: ownership-and-execution.md.
- For CLI/service entrypoints, production resilience, telemetry, or tests: applications-and-testing.md.
Existing specialized references, when the corresponding topic applies:
- macros-and-os-boundaries.md.
- rustdoc.md.
- build-profiles.md.
- performance.md.
- cli-tools.md.
- production-resilience.md.
- axum-service.md.
- observability.md.
- ci-pipeline.md.
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.

