skills/rust-expert/SKILL.md
Core implicit Rust engineering skill. Use for Rust implementation, debugging, code review, refactors, compiler errors, ownership/lifetimes, traits/generics, async/concurrency internals, typed errors, API design, Cargo/toolchain/MSRV, crate selection, tests, performance, unsafe, and security. Excludes focused framework or product-surface work when a narrower Rust specialist skill applies.
npx skillsauth add bjornmelin/dev-skills rust-expertInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this as the default Rust engineering router. Inspect the repo first, load only the references needed for the task, then use compiler/test feedback as design evidence.
AGENTS.md, Cargo.toml,
Cargo.lock, rust-toolchain.toml, .cargo/config.toml, CI, justfile,
mise.toml, and nearby tests..clone(),
Arc<Mutex<_>>, broad trait bounds, unwrap, or unsafe.scripts/discover-rust-gates.mjs <repo-root>.Use these implicit specialist skills when the task clearly belongs there:
| Signal | Prefer |
| --- | --- |
| Command-line app, subcommands, flags, config precedence, JSON/stdout contracts | rust-cli-clap |
| Terminal UI, interactive dashboards, Ratatui widgets/layout/events | rust-tui-ratatui |
| Tauri v2, src-tauri, commands, capabilities, IPC, updater, mobile layout | rust-tauri-apps |
| HTTP APIs/services, Axum, Tower, Tokio server runtime, DB pools | rust-web-services |
| Broad architecture review or multi-domain Rust planning explicitly requested | rust-mega-eng |
If no specialist owns the task, stay in rust-expert.
Load the smallest needed set:
references/toolchain-cargo.md: editions, MSRV, resolver, lockfiles, features,
workspace policy, verification commands.references/ownership-async-errors.md: borrow checker, ownership,
lifetimes, async Send, task ownership, typed errors.references/crate-selection.md: preferred crates, dependency decision rules,
feature hygiene, source-refresh triggers.references/testing-quality.md: unit/integration/doctest/property/snapshot/
benchmark checks and reviewable test design.references/performance-security.md: measurement, allocations, unsafe/FFI,
supply chain, cargo-deny/audit, secrets and subprocesses.Existing repos: preserve detected contracts first. Do not change edition,
resolver, rust-version, lockfile policy, or exact toolchain pins unless the
task is explicitly a migration or the repo is missing required metadata.
Greenfield defaults:
edition = "2024".[workspace] resolver = "3" explicitly for virtual workspaces.rust-version and document the policy.Cargo.lock by default; for public libraries, also test latest
dependency resolution because consumers use Cargo.toml.rust-toolchain.toml version pins unless reproducibility,
nightly, embedded/custom targets, or release policy requires them.Start narrow, then broaden:
cargo check -p <crate>
cargo test -p <crate> <test_name>
cargo fmt --all -- --check
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo test --workspace --all-targets --all-features --locked
cargo test --doc --workspace --locked
Use cargo nextest run when configured. Add cargo hack, cargo deny,
cargo audit, cargo semver-checks, or release tooling only when the repo or
change surface warrants it.
scripts/discover-rust-gates.mjs [repo-root]: print likely Rust gates.scripts/check-reference-links.mjs <skill-dir...>: validate local skill links.scripts/check-trigger-evals.mjs <skill-dir...>: validate trigger eval JSON.development
Pre-PR multi-model review, parallel opus and codex exec adversarial lanes, then adversarial verification of merged findings. Read-only. Use before shipping nontrivial diffs.
tools
Independent gpt-5.6 diff review via the Codex CLI, normal or steerable adversarial with JSON findings. Use before shipping nontrivial changes.
development
Delegate implementation, investigation, or bulk work to gpt-5.6 codex via pinned codex exec. Use for clear-spec builds, migrations, debugging, or any task MODELS.md routes to codex.
development
Adversarial pre-mortem: imagine the plan failed, work backwards to surface risky assumptions + irreversible bets, then harden them. Proactively offer it (after the current request; confirm first) before a hard-to-reverse or one-way-door call (API, schema, framework, a hire), an all-upside plan, or unvalidated assumptions. Also on request.