rust-systems
Skill0 starsChanged 13 days agoISCView on GitHub
Apply 2026-SOTA Rust systems and idiomatic engineering: lint and format governance, Google Rust Style Guide API design and code organization, async cancellation contracts, memory and FFI soundness, verification lanes, and stable-first data-parallel invariants. Use when authoring, refactoring, or reviewing Rust systems or application code, Cargo workspaces, public library APIs, Tokio async flows, unsafe blocks, FFI bindings, or SIMD hot paths. Do NOT use when the task is frontend UI, CSS, or non-Rust backend work. Guardrails loads first for cross-cutting hazards (nullability, lifetime elision, dependencies, Docker, HTML/auth, or secrets).
1 other project uses a version of this.
Adopted by
Most recently taken up by
- iliaal/ai-skillstheir own version, first seen Nov 7, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- iliaal/ai-skills★ 45same 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 repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- apex-performance-auditorSkill
- checkSkill
- context7-mcpSkill
- design-craftSkill
- framework-engine-stacksSkill
- guardrailsSkill
- hypermedia-engine-stacksSkill
- learning-curatorSkill
- okf-docsSkill
- pi-lens-ast-grepSkill
- pi-lens-lsp-navigationSkill
- pi-lens-write-ast-grep-ruleSkill
- pi-lens-write-tree-sitter-ruleSkill
- scalabilitySkill
- select-modelSkill
- skill-authoring-visionSkill
- systems-auditorSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
Non-goals: no toolchain provisioning (never suggest manual toolchain installs), no unrequested dependency upgrades, no CI workflow file …
- Very specific: line 40
Build: Before the first edit, emit a readiness statement naming the mode, context tier (library or application), and applied lint table:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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 Systems & Idiomatic Engineering
A unified syllabus for high-assurance Rust systems engineering and Google-grade idiomatic design. Read this syllabus first, then open only the reference file required by your active surface.
1. Activation Boundary & Scope
Triggers on: authoring, refactoring, or reviewing Rust systems and application code, Cargo workspace topologies, library vs. application API design, module/import layout, trait and newtype modeling, Tokio async flows, cancellation hazards, mutex poison handling, unsafe blocks, raw pointer provenance, Tree Borrows, FFI boundaries, sanitizers, Miri runs, SIMD vectorization, cacheline alignment, and high-throughput performance paths.
Does not trigger on: frontend UI, styling, CSS, pure prose documentation, or non-Rust backend code.
Guardrails Boundary: guardrails loads first for cross-cutting hazards (nullability, lifetime elision, dependencies, Docker, HTML/auth, or secrets); this skill owns Rust systems soundness and idiomatic architecture. Co-activation is expected.
Scope: Rust systems and idiomatic authoring, refactoring, and review guidance.
Non-goals: no toolchain provisioning (never suggest manual toolchain installs), no unrequested dependency upgrades, no CI workflow file generation, no new-crate scaffolding unless requested.
Recorded Deferrals: no_std bare-metal review (MMIO volatile registers, custom panic handlers, critical sections, linker scripts); Kani and Creusot formal verification harnesses; Profile-Guided Optimization (PGO); the cfi sanitizer; procedural-macro AST implementation internals; and the unstable Allocator API. Profiling telemetry is narrowed to Criterion benchmarking and perf c2c cited as evidence only.
2. Mode Contracts & Verification Bounds
The skill operates in exactly one of three modes:
- Build: Before the first edit, emit a readiness statement naming the mode, context tier (
libraryorapplication), and applied lint table:Readiness: Build · mode=rust-systems · context=[library|application] · table=[workspace.lints] (RFC 3389, Edition 2024) - Review: Findings only; strictly non-mutating unless edits are explicitly requested. Every finding MUST use the pinned literal line format:
severity · file:line · rule · fix - Verify: Names the required verification lane for the surface under test. Refuses Miri-only claims when FFI, inline assembly, or
core::archSIMD are present.
Bounded Verification Loop: Build -> inspect once in a single batch -> fix that batch in one pass -> confirm with at most one further round -> stop and report remainder. Never loop indefinitely.
3. The Brief Wins & Brief-Proof Invariants
An explicit user brief outranks default style preferences, lint levels, and target profiles (such as activating [chrome], [Fuchsia], or nightly portable_simd), but SHALL NOT earn past core memory soundness (strict provenance, aliasing), the abort/containment contradiction, mutex poison soundness, pre-main() code execution hazards, or select! cancellation safety.
4. Soundness & Style Modules
- API Design, Idioms & Code Organization: Distinguishes Library (binding API flexibility rules) vs. Application (simplicity and directness) contexts. Enforces leaf-module API placement, single-module
usegranularity, no glob imports, qualified free functions, unqualified types, unique ownership overRc/Arc, flexible borrows (&[T],&str), closure accessors (with_foo),enumoverbool, newtypes,~Exttraits, macro hierarchy,expectoverunwrap, and optional Chromium/Fuchsia/Android profiles.Read references/api-and-style.md when designing APIs, organizing modules/imports, modeling traits/types, writing macros/docs, or applying Chromium/Fuchsia/Android target rules. - Lint & Format Governance: Single lint truth via RFC 3389
[workspace.lints]with mandatory member[lints] workspace = trueopt-in andedition = "2024". Enforces Google-aligned compiler/Clippy lints (unsafe_op_in_unsafe_fn,non_exhaustive_omitted_patterns,borrowed_box,should_implement_trait,new_without_default,len_without_is_empty) andrustfmtrules (max_width = 100,imports_granularity = "Module"). Release profile keepsoverflow-checks = truefor value paths.Read references/workspace-lints.md when authoring workspace manifests, configuring lints, setting rustfmt rules, or adjusting profiles. - Async Cancellation & Concurrency Contracts: Cancel-unsafe operations (
read_exact,write_all,Mutex::lock,Semaphore::acquire) banned intokio::select!branches. Forbids recovering poisoned mutexes (into_inner()). Lexical lock scopes orwith_foo()closure accessors before.await. Graceful shutdown viaCancellationToken. Tokio work-stealing default; thread-per-core or platform-specific executors require an ADR or platform profile.Read references/cancellation.md when reviewing async streams, select! branches, mutex locking, shutdown logic, or runtime topology. - Memory, Unsafe & FFI Soundness: Unsafe code requires (1) safe abstraction isolation, (2) a
// SAFETY:comment, and (3) a technical justification (including benchmarks if performance-motivated). Strict provenance mandatory (addr(),with_addr(); rejectsas usize). Forbids running code beforemain()(ctor). Mandatory#[repr(C)]on cross-boundary structs; forbids fat pointers overextern "C". Prohibitspanic::catch_unwindin first-party logic except as un-relied-upon defense-in-depth underpanic = "unwind".Read references/ffi-boundaries.md when inspecting unsafe blocks, raw pointers, FFI declarations, or foreign ABI shims. - Verification Lanes: Hardened lane:
fmt --check,clippy --all-targets --all-features -- -D warnings,nextest run --profile ci,cargo test --doc,cargo build --release,deny check(bitmask0x1/0x2/0x4/0x8),semver-checks. Miri flags for strict provenance and Tree Borrows. Native sanitizers (address,thread,memorywith-Zbuild-std) mandatory for asm/SIMD/FFI where Miri is blind.Read references/verification.md when configuring CI, running sanitizers, executing Miri, writing contextual assertions, or checking supply chain policies. - Data-Parallel Invariants: Stable-first policy (no unstable features by default). Prefer slice auto-vectorization (
chunks_exact) and isolatedcore::archintrinsics with runtime feature detection and mandatory scalar fallbacks. Portable SIMD (core::simd) requires explicit nightly authorization. Streaming stores require_mm_sfence(). Contended concurrent cachelines require#[repr(align(64))]/CachePadded, verified byperf c2cor Criterion.Read references/data-parallel.md when optimizing loops, vectorizing computation, aligning struct layouts, or benchmarking hot paths. - Review Checklist: Severity ladder (
error,warning,info), expanded flag-on-sight catalog covering both systems soundness and Google Rust Style Guide rules, and pinned output formatting.Read references/review-checklist.md when executing Review mode or compiling final audit reports.
5. Anti-Examples
- Lint & Format Governance:
Do NOT:declare per-crate#![deny(...)], use#[rustfmt::skip]for personal taste, or nest paths inuse foo::{Bar, baz::Qux};.Do:declare centrally in[workspace.lints], opt in with[lints] workspace = true, and enforce one module perusestatement. - API & Idiomatic Style:
Do NOT:accept&Vec<T>,&String, or&Box<T>, use check-then-unwrap (if x.is_some() { x.unwrap() }), or reach into a poisoned mutex.Do:accept&[T],&str, or&T, useif let Some(v) = xor.expect("invariant"), and propagate or panic on poisoned locks. - Cancellation:
Do NOT:awaitread_exact,write_all, orMutex::lockinside atokio::select!branch.Do:isolate in a spawned worker task or use cancel-safereadand single-writer queues. - Unsafe & Memory Soundness:
Do NOT:writeunsafewithout both a// SAFETY:comment and a technical/benchmark justification, cast viaptr as usize as *mut T, or execute code beforemain()viactor.Do:isolateunsafein minimal safe abstractions, useptr.addr()/ptr.with_addr(...), and initialize state explicitly frommain(). - FFI & Unwinding:
Do NOT:rely onpanic::catch_unwindfor normal control flow or pair it withpanic = "abort".Do:useResult/Optionfor recoverable failures and reservecatch_unwindstrictly for un-relied-upon FFI/entry-point defense-in-depth underpanic = "unwind". - Verification & SIMD:
Do NOT:enable unstable#![feature(portable_simd)]on stable targets or claim Miri proves safety acrossasm!, SIMD, or FFI.Do:use stablechunks_exactand runtime-detectedcore::archwith scalar fallbacks, and run native compiler sanitizers (-Zsanitizer=address,thread).
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.

